By default, the report generated by C/C++test only includes results from the last analysis run. This allows you to ensure that reported results are obtained in a consistent setup, including the environment and the test configuration used to perform testing.
You can configure C/C++test to generate a cumulative report that includes a summary of outcomes form multiple test runs. A cumulative report does not replace regular reports for individual runs, but can provide you with an additional overview of your testing process. This may be especially valuable for merging coverage results, because it is not possible to compute cumulative code metrics by adding up coverage values (expressed in percentage) from reports for individual runs.
To generate a cumulative report for multiple runs:
- Go to Execution> Runtime tab in your test configuration.
- Enable the Archive test and coverage results option to enable storing results as a results archive.
By default, the results archive is located in the
.cpptest/archive subfolder of the current project. To provide a path to a custom location, go to Execution> Runtime> Archive location. This may be useful for more advanced scenarios, such as sharing the archive across multiple projects.
If you enable this option for different test configurations, their results will be stored in the same results archive. For example, unit testing coverage (Run Unit Tests ) and application coverage (Load Application Coverage) will be merged.
- Execute the test configuration(s). After each run, test and coverage results will be reported as in the regular workflow, as well as stored in the results archive.
- When all the runs are complete, select Parasoft> Test Configurations> Builtin> Utilities> Load Archived Results in your IDE menu to load the archived results into C/C++test.
The archive location specified in the Load Archived Results configuration must match the location specified in the test configurations you used to perform testing (by default, the
.cpptest/archive subfolder of the current project).
If the result for a unit test case was archived more than once, C/C++test will only load the most recent result.
- Generate a report (see Generating Reports). If the archived results are loaded, the report presents merged test and/or coverage results.
- Ensure that the data you store in the results archive is the data you want to include in the cumulative report. This may require removing or cleaning the contents of the archive when needed.
- Merging results from multiple runs is designed to provide you with additional information about your testing process, but it does not replace regular reporting for individual runs. In particular, the "Detailed Test Execution Report" option is not supported for the cumulative report. Reports for individual test runs remain the primary source of information about your testing process.