Rules created in RuleWizard must be saved to a location accessible to the code analysis execution tool and enabled accordingly. Saving and enabling rules varies depending on the series of Parasoft tools being used to execute the rules. In this section:

Saving and Enabling Rules for C/C++test, dotTEST, and Jtest

  1. Choose File> Save or File> Save As and save the rule to the [INSTALL_DIR]\rules\user\ directory.
    For Windows, you may need to save the rule to the following directory: [DOCUMENTS DIR]\Parasoft\[tool]\rules where [DOCUMENTS DIR] refers to the "My Documents" directory in Windows. 
  2. Enable the rule by adding it to a test configuration. Test configurations can be managed and executed locally or distributed from Parasoft Development Testing Platform (DTP) for local execution. See the documentation for the analysis tool and/or DTP documentation for details.

Saving and Enabling Rules for SOAtest

  1. Choose File> Save or File> Save As to save the rule with a .rule file extension into the static analysis rule directory. For example: 

    <workspace_location>/.metadata/.plugins/com.parasoft.xtest.standards.eclipse.core.web/urules
  2. If you want to store rules in a different location, specify your preferred User Rules directory in the Parasoft Preferences panel of the code analysis execution tool:
    1. Choose Parasoft> Preferences and select Configurations.
    2. Enable the User Rules option and specify the preferred directory.
  3. Choose Parasoft> Test Configurations and choose the configuration that you want to implement the rule. 
  4. Choose the Static> Rules Tree tab. If the new rule requires a new category, you must create it by editing the rule map file:
    1. Click Edit Rulemap and open the Categories tab.
    2. Click New and enter the category ID and description. 
    3. Click OK to save the new category.
  5. Click Import and specify the rule(s) you want to import.
  6. Click OK and enable the rule in the test configuration.
  7. Click Apply to save changes.
  • No labels