In this section:
To create a custom test configuration, you need to:
To create a custom configuration locally, you need to copy a selected built-in configuration to the User directory, and then customize the duplicated configuration.
Click Parasoft in the menu bar and choose Options (Visual Studio) or Preferences (Eclipse). Then select Configuration.
Right-click the test configuration you want to duplicate, then choose Duplicate Locally.
The configuration will be added to the User directory and nested in a parent directory matching the source.
Right-click the duplicate configuration and choose Edit to open the Test Configuration Editor in you browser.
NOTE: The Test Configuration Editor is handled by a separate web server process and may be blocked if a strict firewall is installed on your machine. In such case, allow the process to run when prompted.
Choosing Edit as text opens a textual representation of the configuration in a simple configuration editor (deprecated).
The Scope tab contains a set of filters that you can configure to define the parts of the code that the test configuration should cover. You must connect the C/C++test to source control in order to collect scope information. Click Save to preserve any changes you make on this tab.
Expand the Time filters settings to set time-based filters at the file or line level. The time filters enable you to restrict the scope of analysis to a specific date range or period. If the scope.scontrol
setting is set to true
and the source control settings for C/C++test are configured, the modification time is set from the source control history. If scope.local
is set to true
, then the modification time is set form the file system of the machine running analysis. See Scope and Authorship Settings for details.
You can configure the following settings:
File-level settings
Check all files | Default. Enable this option to include all files in the scope of the analysis the user has access to. |
---|---|
Check locally-modified files | Enable this option to only check locally modified files. For this option to take effect, ensure that connection to your source control system is properly configured and authorship is computed based on data from that source control system. See the prerequisites in Defining Additional Scope Filters. |
Check files modified within a date range | Enable this option and specify a date range to include in the scope. Files that were modified or added within the specified range will be checked. |
Check files modified within last n days | Enable this option and specify the number of days to include in the scope. Files that were modified or added within the specified number of days will be checked. |
Check files modified between the current working branch and | Enable this option to only analyze files that are different between the current working branch and the reference branch. This allows you to speed up analysis by excluding unchanged files from the test scope. You need to configure one of the following options to specify which branch is used as reference:
For this option to take effect, ensure that connection to your source control system is properly configured and authorship is computed based on data from that source control system. See the prerequisites in Defining Additional Scope Filters. This option is only supported for Git SCM. |
If a scope filter is configured in both Test Configuration Editor and the .properties file, the configuration specified in the .properties file will override the settings configured in the GUI. See Defining Additional Scope Filters for details.
Line-level Settings
Check all lines | Default. Enable this option to include all lines of code in the scope of the analysis the user has access to. |
---|---|
Check locally-modified lines | Enable this option to only check locally modified lines. For this option to take effect, ensure that connection to your source control system is properly configured and authorship is computed based on data from that source control system. See Configuring Authorship and Connecting to Source Control. |
Check lines modified since | Enable this option and specify a cut-off date to include in the scope. Lines of code that were modified or added within the specified range will be checked. |
Check lines modified witin last n days | Enable this option and specify the number of days to include in the scope. Lines of code that were modified or added within the specified number of days will be checked. |
Expand the File path filters section to specify file path patterns to include and/or exclude from analysis. Relative paths within a workspace/solution.
The following settings are available:
Accepted paths (wildcard) | Specify a comma-separated list of files to include. Wildcards are supported (e.g., *.cpp, *.java, *.cs). |
---|---|
Rejected paths (wildcard) | Specify a comma-separated list of files to exclude. Wildcards are supported (e.g., *.cpp, *.java, *.cs). |
Expand the Advanced discloser triangle to use regular expressions to set the file path filters. The following settings are available:
Accepted paths (regex) | Specify a regular expression. Files that match the pattern will be included in the analysis. |
---|---|
Rejected paths (regex) | Specify a regular expression. Files that match the pattern will be excluded in the analysis. |
Expand the File content filters section to specify regular expressions that exclude specific types of files based on content, e.g., auto-generated files.
A potential conflict may occur if you use both filter types at the same time. |
Expand the Author filters section to limit the scope of analysis to specific authors. If the scope.scontrol
setting is set to true
and the source control settings are configured, then file authorship is taken from the source control system. If the scope.xmlmap
is set to true
and the XML map settings are configured, then files authorship is taken from the map.
The following options are available:
Include only files owned by authors | Enable this option to only include files owned by the authors specified in the List of authors field. |
---|---|
Include only lines owned by authors | Enable this option to only include lines of code owned by the authors specified in the List of authors field. |
List of authors | Specify a comma-separated list of authors whose code should be analyzed. |
Expand the File size filters section to limit the scope of analysis based on file size.
Expand the Code block options section to define specific blocks of code to include or exclude from the analysis.
A potential conflict may occur if you use both filter types at the same time. |
Include only lines in certain blocks | Enable this option to include only the code defined by the Starting and Ending marker fields in the analysis. |
---|---|
Starting marker | Specify a regular expression to mark the start of the code block that should be analyzed. |
Ending marker | Specify a regular expression to mark the beginning of the code block that should be analyzed. |
Skip files without these markers | Enable this option skip files that do not include patterns that match the Starting and Ending marker fields. |
Click the Static Analysis tab to enable/disable the static analysis rules the configuration uses. This page shows all the supported rules. Click Save to preserve any changes you make on this tab.
Enable or disable the Enable static analysis checkbox to enable/disable static and flow analysis.
You can use the search bar to find a specific rule or rule category. You can also use the drop-down menu to filter by category and browse for a rule.
Enable the Show Enabled Only option to only show the enabled rules.
Rules are grouped by category. Expand a category and enable the rule to use it in the test configuration.
Click the Enable [number] of rule(s) or Disable [number] of rule(s) button to quickly enable or disable all rules in the configuration.
Click on a rule to open the documentation panel.
You can also open the rule documentation in new browser tab.
Click on the documentation icon to open all documentation for the enabled rules in a new browser tab.
If the rule can be configured, parameters can be set in the rule options panel. Click on a rule and click the Rule Parameters tab to configure the rule. The options available are specific to each rule.
Click the Metrics tab to enable/disable the metrics collected and calculated during analysis. Click Save to preserve any changes you make on this tab.
You can perform the following actions:
Click the Unit Tests tab to access controls for unit test execution and coverage data collection.
You can enable/disable the collection of unit test results and coverage analysis.
Click the Static Settings Analysis tab allows you to configure your static analysis and flow-based analysis. Click Save to preserve any changes you make on this tab.
Expand the Advanced Settings section to configure the following options:
Expand the Flow Analysis Advanced Settings section to configure settings related to performance, reporting verbosity, null-checking method parameterization, and resources checked.
See Configuring Flow Analysis for details.
Click on the General Settings tab to view and edit the name and location of the test configuration. Click Save to preserve any changes you make on this tab.
Enter a name in the Folder field to change the location of the test configuration. Entering the name of an existing folder moves the test configuration to that location in the test configuration tree. If the name you specify doesn't exist, a new folder will be created and the test configuration moved into it. You can also nest folders by placing a forward slash (/) between folder names.
Click Parasoft in the menu bar and choose Options (Visual Studio) or Preferences (Eclipse).
Then select Configuration.
Right-click the Built-in or User test configuration you want to duplicate, then choose Duplicate on DTP.
The configuration will be added to the DTP directory and uploaded to the DTP server (see Connecting to DTP)