Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Static Analysis Rule Maps - the difference between 9.x and 10.x and migration from 9.x and 10.x

Janusz
Janusz Posts: 17

Static Analysis Rule Maps - the difference between 9.x and 10.x and migration from 9.x and 10.x

Rule maps functionality allows users to customize properties (such as category or severity) of static analysis rules.
In addition, the rule map interface also allows you to upload custom rules.
DTP 5.3.2 (Engines 10.3.2) includes the ability to implement multiple rule maps.

Rule Map Support: What’s the Difference between 9.x and 10.x?
Rule mapping functionality has been available in Parasoft language tool (C++test, Jtest, dotTest) since the 9.x series. The implementation in those version, however, use a slightly different approach than the current 10.x family of tools.

The following section describes the differences:

9.x rule maps
Definition: The rule map is a rulemap.xml file that defines rule properties customizations.
Custom Rules: Custom Rules are not a part of the rule map. They are stored next to the rulemap.xml file.
Storage: The rulemap.xml file is stored in Team Server. Each rule map is stored in a separate user account. Authorization Team Server users can read/write rule maps from their accounts.
Application to rules: Rule maps are automatically applied to any test configuration used by the engine (when the engine is associated with Team Server user account).

10.x rule maps
Definition: The rule map is an entity with
a name, owners (users who can edit the rule map), rule customizations (rulemap.xml), and custom rule files.
Custom Rules: Custom Rules are part of the rule map entity.
Storage: The rule map is stored in Report Center.
Authorization: All users can view the rule maps defined on the DTP server, but only owners can modify the rule map.
Application to rules: Rule maps are applied only to test configurations associated with the rule map.

DTP 5.3.2 still supports storing and serving rule maps for 9.x engines in Team Server, so you can use rule maps with the 9.x tools. Rule maps associated with the 10.x engines, however, are stored in DTP Report Center.

The following instructions describe how to migrate rule maps associated with 9.x tools to the current 10.x tools (from Team Server to Report Center).

Migrating Rule Maps from 9.x and 10.x
For each Team Server account from which you want to migrate rule maps and custom rules:

  1. Go to Team Server account storage and download a rulemap.xml file and custom rule files (if any).
    Note: You can download these files from the Team Server web GUI or through the 9.x GUI (Parasoft > Explore > Team Server).
  2. In DTP, choose Test Configurations from the Report Center> Settings menu and click on an engine name (DTP Engine for .NET, C/C++ or Java) in the left panel.
  3. In the rule map editor, create a new rule map entity, specify its name and owners.
  4. Click the Upload/Download tab of the newly created rule map and upload the rulemap.xml file in the **Rule mapping (e.g. rulemap.xml) **section and upoad the custom rule files in the **Custom Rules **section.
  5. Click on the Rule Customization tab. This tab shows all the rules, including customized and custom rules.
  6. Verify that your expected customizations took place by enabling the Modified, Custom, or Cloned option at the top the table to filter the rule list.
  7. (Optional step) You can also migrate test configurations from Team Server to Report Center: Download the .properties files from your 9.x tools and upload them in the Report Center > Settings > Test Configurations area.
  8. Configure the test configurations to use the newly created/migrated rule map by either making changes to each test configuration or by editing the rule map:
  9. Edit each test configuration:
  10. Click on a test configuration and select the desired rule map name to be used in the "Static Analysis - Rules" tab at the top of the rules table.
  11. Verify that the rule customizations have been applied to the rules in the table
  12. Click Save.
  13. Edit a rule map (this option is only available for rule map owners):
  14. In the Associated Test Configuration section, move the desired test configurations to the associated configurations (left) panel
  15. Click Save.

After making these changes, the rule map (i.e. rule customizations and custom rules) will be applied when the specific test configuration is executed by the engine 10.x.

Repeat the above steps for all Team Server user accounts you would like to migrate rule maps from. Please note that if any two Team Server accounts contain the same rulemap.xml files and custom rules, you should reuse the existing rule map, rather than creating a new rule map in DTP 10.x.

Tagged:

Tagged