You can implement custom static analysis rules to support your organization's specific development policy. Custom rules are created with a separate tool called Parasoft Rule Wizard (not included with DTP; contact your Parasoft representative for information) and managed within the context of the rule map. The rule map is associated with test configurations that are executed by the analysis tool.

Custom rules can be stored in DTP, which enables you to view the custom rule in the test configuration administration page and enable/disable the rule for selected test configurations. The configurations stored in DTP can be ran by connected Parasoft code analysis and test execution tools (C/C++test, dotTEST, Jtest), which ensures coding consistency. Also see Test Configurations.

In this chapter:

Creating Custom Rules

Refer to the Rule Wizard documentation for instructions on creating custom rules (not included with DTP; contact your Parasoft representative for information). Rule Wizard outputs custom rules in a .rule file. Documentation for the rule is also created in Rule Wizard.

Uploading Custom Rules to DTP

  1. Choose Test Configurations from your user profile drop-down menu.

     
     
  2. Click the gear icon next to a tool to open the rule map configurations page.



  3. Choose a rule map from the drop-down menu and click the Upload/Download tab.



  4. In the Custom Rule section, click Select Files and browse fro the .rule file(s) you want to upload.



    Some rules created in Rule Wizard are complex, so the .rule file may be accompanied by an ext subfolder that contains an extension for the rule. You can compress the .rule file and extension folder into a .zip file and upload it to DTP. The .zip file will be decompressed and stored on the server.

    Downloading Custom Rules

    Click Download All Custom Rules to download any custom rule files associated with the rule map.

  5. Click Upload to finish uploading the .rule(s) so that they can be used by the Parasoft tool.
  6. Click the Rule Customization tab and locate the custom rule to verify that it has been uploaded. You can filter rules by typing in the search field or by enabling the Clones, Modified, or Custom filters. 

    If you added rule documentation when creating the rule, it will also appear.

Enabling Custom Rules

In order to use the custom rule, the test configuration it was added to must be associated with the rule map. See Associating Test Configurations with Rule Maps.

Enabling Custom Rules from a Parasoft Tool

You can also enable custom rules in Parasoft tools without including DTP to your workflow. Refer to the documentation for your Parasoft tool for instructions on how to define and use the custom rules in your projects.


  • No labels