Coverage Validator can be controlled from the command line prompt.
This tutorial describes in detail how to merge multiple code coverage sessions from the command line.
Merge multiple session files at once is useful when you’ve run many different tests (all on the same executable) and wish to aggregate the coverage results so that you can spot parts of your testing that are missing code coverage.
If you have more than two coverage sessions to merge we recommend using -mergeMultiple as it is much faster than repeatedly running Coverage Validator to merge two coverage sessions at a time.
The command line is:
coverageValidator.exe -mergeMultiple "c:\test results\merge_multiple.txt" -saveMergeResult "c:\test results\mergedResults.cvm"
The above command line can be broken into its constituent items:
The -mergeMultiple option specifies a file that lists each code coverage session to be merged. Specify one file per line.
An example merge multiple file:
c:\test results\cv_help.cvm c:\test results\cv_red.cvm c:\test results\cv_green.cvm c:\test results\cv_blue.cvm c:\test results\cv_magenta.cvm c:\test results\cv_cyan.cvm c:\test results\cv_this_file_doesnt_exist.cvm
This command line merges every session listed in c:\test results\cv_merge_multiple.txt, then saves the result in c:\test results\mergedResults.cvm. Finally Coverage Validator is closed.
Files that cannot be read are ignored – there is no error message if a file cannot be read.
If you find writing command line tiresome, and you’d like some help we have created a command line builder tool to make the process of creating command lines a lot easier.