Coverage Validator can be controlled from the command line prompt.
This tutorial describes in detail how to collect code coverage for an application then export the data in HTML, XML and Cobertura formats from the command line.
Sharing your code coverage data without needing the other person to use Coverage Validator is really useful. You can export as HTML for posting on the company intranet. You can export as XML or Cobertura formats for consumption by other testing tools.
The command line is:
coverageValidator.exe -program "c:\test results\testbed.exe" -exportAsHTML "c:\test results\test100.html" -exportAsHTML_BOM UTF16 -exportVisitedLines:On -exportUnvisitedLines:On -exportVisitedFunctions:On -exportUnvisitedFunctions:On -exportDetailedReport:On -exportDoColourCode:On -exportFileFormatCRLF -exportSourceCode:On -exportType SummaryAndCoverage -hideUI
The above command line can be broken into its constituent items:
This command line runs the test program. When the test program closes the code coverage results are finalised then export in HTML to c:\test results\test100.html. Each source code file has coverage reported in it’s own HTML file linked from the main file test100.html. Finally Coverage Validator is closed.
The command line is:
coverageValidator.exe -program "c:\test results\testbed.exe" -exportAsXML "c:\test results\test100.xml" -hideUI
The above command line can be broken into its constituent items:
This command line runs the test program. When the test program closes the code coverage results are finalised then export in XML to c:\test results\test100.xml. Finally Coverage Validator is closed.
The command line is:
coverageValidator.exe -program "c:\test results\testbed.exe" -exportAsXMLCobertura "c:\test results\test100.xml" -hideUI
The above command line can be broken into its constituent items:
This command line runs the test program. When the test program closes the code coverage results are finalised then export in Coberatura XML to c:\test results\test100.xml. Finally Coverage Validator is closed.
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.