Page tree

Skip to end of metadata
Go to start of metadata

In this section:


Test configurations define how DTP Engines test and analyze code, including which static analysis rules are enabled, which tests to run, and other analysis parameters.

dotTEST DTP Engine ships with built-in test configurations, but users can create and store their own test configurations in the DTP server. You can access the DTP server via the DTP plug-in. If you have administrator-level access in DTP Report Center, you can also create test configurations directly in DTP (administration> Engines> Test Configurations). 

User-defined test configurations that are stored in DTP can be downloaded from the DTP server and stored in the [INSTALL_DIR]/configs/user directory as *.properties files. 

Running a Test Configuration

You can specify which configuration will be run in one of the following ways:

  • Run dottestcli with the -config switch and specify a built-in, user-defined or  DTP-hosted test configuration:

    -config "builtin://Recommended Rules"
    -config "user://Foo Configuration"
    -config "dtp://Foo Team Configuration" 
    -config "dtp://"

    You can also provide a path or URL to the test configuration .properties file:

    -config "C:\Devel\Configs\"
    -config ""

    For example, your command line may resemble the following:

    dottestcli.exe -solution "C:\Devel\MyFooSolution\MySolution.sln" 
    -config "builtin://Demo" -report "C:\Report"
  • In the .properties file, specify the default configuration that will be run when the -config option is not used:

    dottest.configuration=user://Configuration Name

Viewing Available Test Configurations

Use the -listconfigs switch to print the available test configurations. 

Built-in Test Configurations

The following table includes the test configurations shipped in the [INSTALL]/configs/builtin directory.

Built-in Test ConfigurationDescription
Recommended RulesThe default configuration of recommended rules. Covers most Severity 1 and Severity 2 rules. Includes rules in the Flow Analysis Fast configuration. 
Find Duplicated CodeApplies static code analysis rules that report duplicate code. Duplicate code may indicate poor application design and lead to maintainability issues.
MetricsComputes values for  several code metrics. 
Flow AnalysisDetects complex runtime errors without requiring test cases or application execution. Defects detected include using uninitialized or invalid memory, null pointer dereferencing, array and buffer overflows, division by zero, memory and resource leaks, and dead code. This requires a special Flow Analysis license option.
Flow Analysis AggressiveIncludes rules for deep flow analysis of code. A significant amount of time may be required to run this configuration.
Flow Analysis FastIncludes rules for shallow depth of flow analysis, which limits the number of potentially acceptable defects from being reported.
Critical RulesIncludes most Severity 1 rules, as well as rules in the Flow Analysis Fast configuration.  
DemoIncludes rules for demonstrating various techniques of code analysis. May not be suitable for large code bases.
Find Memory IssuesIncludes rules for finding memory management issues in the code. 
Find Unimplemented ScenariosIncludes rules for finding unimplemented scenarios in the code. 
Find Unused Code Includes rules for identifying unused/dead code.
Check Code Compatibility against .NET [2.0, 3.0, 3.5, 4.0 Client Profile, 4.0 Full, 4.5.0, 4.5.1, 4.5.2, 4.6.0, 4.6.1, 4.6.2, 4.7.0]Includes a set of test configurations that validates the code’s compatibility with the specified version of .NET framework. 

CWE-SANS Top 25 Most Dangerous Programming

Includes rules that find issues classified as Top 25 Most Dangerous Programming Errors of the CWE-SANS standard. 
NIST SAMATEIncludes rules that find issues identified in the NIST SAMATE standard
OWASP Top 10 Security VulnerabilitiesIncludes rules that find issues identified in OWASP’s Top 10 standard
PCI Data Security StandardIncludes rules that find issues identified in PCI Data Security Standard 
Security AssessmentGeneral test configuration that finds security issues
IEC 62304 (Template) A template test configuration for applying the IEC 62304 Medical standard. 
Run NUnit TestsRuns NUnit tests that are found in the scope of analysis
Run NUnit Tests with coverageRuns NUnit tests that are found in the scope of analysis and monitors coverage
Calculate Application CoverageProcesses the application coverage data to generate a coverage.xml file. See Application Coverage for Web Applications.
Execute MSTests with CoverageExecutes MSTest tests and collects coverage. See Unit Testing.
Execute MSTestsExecutes MSTest tests. See Unit Testing.
Collect Static CoverageGenerates the static coverage data necessary for application coverage. See Application Coverage for Web Applications.

Creating Custom Rules

Use RuleWizard to create custom rules. To use the rule in the DTP Engine, it needs to be enabled in a test configuration and the custom rule file must be located in one of the following directories:

  • [INSTALL_DIR]\rules\user\
  • [DOCUMENTS DIR]\Parasoft\[engine]\rules where [DOCUMENTS DIR] refers to the "My Documents" directory in Windows.

  • No labels