Command Line Merge

Coverage Validator can be controlled from the command line prompt.

This allows you to create scripts that you can use to run repeatable tests.

This tutorial describes in detail how Example 2 merging code coverage from the previous tutorial works.

The command line is:

coverageValidator.exe -program "c:\new compiler\version2\testbed.exe" 
                      -directory "c:\new compiler\testarea" 
                      -saveSession "c:\test results\testbed.cvm" 
                      -refreshCoverage -refreshFunctions -refreshFilesAndLines 
                      -loadSession "c:\test results\session1.cvm" 
                      -mergeSessions -saveMergeResult "c:\test results\session2.cvm"

The above command line can be broken into its constituent items:

  • Start the application. -program “c:\new compiler\version2\testbed.exe”
  • Specify the directory in which the application should execute. -directory “c:\new compiler\testarea”
  • Showing the progress dialog whilst attaching to the process. -displayUI
    Alternatively the user interface could be hidden by specifying -hideUI.
  • A previously recorded session is loaded from c:\test results\session1.cvm. -loadSession “c:\test results\session1.cvm”
  • After the session is recorded it is saved in c:\test results\testbed.cvm. -saveSession “c:\test results\testbed.cvm”
  • The session is then merged with the previously loaded session. -mergeSessions
  • The resulting merged session is saved in c:\test results\session2.cvm. -saveMergeResult “c:\test results\session2.cvm”
  • All three tabs are refreshed after the session. -refreshCoverage -refreshFunctions -refreshFilesAndLines
  • The last tab refreshed is displayed, resulting in the Files and Lines tab being the current tab.

Command Line Builder

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.

Fully functional, free for 30 days