This section describes the XML tags used to export session data from Coverage Validator.
An exported XML file starts with a few details about Coverage Validator and the target program:
<XML>
<VALIDATORINFO>Coverage Validator information online</VALIDATORINFO>
<VALIDATOR>Coverage Validator name</VALIDATOR>
<VALIDATORVERSION>Version</VALIDATORVERSION>
<VALIDATORDATE>Build date</VALIDATORDATE>
<VALIDATORTIME>Build time</VALIDATORTIME>
<TITLE>Target program name</TITLE>
<EXITCODE>Program exit status code and description (if collected)</EXITCODE>
<INFO>Information about the report type</INFO>
Code fragments can be included as child tags of several of the tags used for the various types of exported XML data.
Exporting by class will just list individual codeFragment tags while exporting by file uses the codeFragments tags.
<codeFragments>
<codeFragment>...</codeFragment>
...
</codeFragments>
For example:
<codeFragments>
<codeFragment
function="CAboutDlg::CAboutDlg"
visitCount="0"
numLines="2"
numLinesVisited="0"
firstLine="156"
lastLine="159">
{ }
</codeFragment>
...
</codeFragments>
When exporting by file, the SOURCEFILE tags details coverage data for a given source code file and will contain all the code fragments
For example
<SOURCEFILE
file="c:\program files (x86)\software verify\c++ coverage validator\examples\nativeexample\nativeexample.cpp"
dll="C:\Program Files (x86)\Software Verify\Coverage Validator\examples\nativeExample\DebugNonLinkANSI9_0\nativeExample.exe"
numLines="32"
numLinesVisited="17"
numLinesUnhooked="0"
numFunctions="10"
numFunctionsVisited="4">
...
</SOURCEFILE>
When exporting by class, the CLASS tags details coverage data for a particular class and will contain all the code fragment children
For example
<CLASS name="CAboutDlg">
Class information identifies a file using the FILENAME tag:
<FILENAME file="c:\program files (x86)\software verification\c++ coverage validator\examples\nativeexample\nativeexample.cpp"/>
When exporting by function, the FUNCTION tags details coverage data for a particular function
<FUNCTION>function-name</FUNCTION>
The content of the FUNCTION tag changes when exporting XML with Include function visit counts enabled on the export dialog (command line option -exportIncludeFunctionVisitCounts).
When including function visit counts there are three child tags: NAME, VISIT_COUNT and LINE_VISIT_COUNT.
<FUNCTION>
<NAME>sortDatabaseTables</NAME>
<VISIT_COUNT>5</VISIT_COUNT>
<LINE_VISIT_COUNT>352054</LINE_VISIT_COUNT>
</FUNCTION>
The visit count is the number of times the function was called. The line visit count is the total count for the number of lines visited in the function during those calls.
When exporting by function, the LINE tags details coverage data for a particular function
<LINE>line-number</LINE>
The content of the LINE tag changes when exporting XML with Include line visit counts enabled on the export dialog (command line option -exportIncludeLineVisitCounts).
When including line visit counts there are two child tags: LINE_NUMBER and VISIT_COUNT.
<LINE>
<LINE_NUMBER>215</LINE_NUMBER>
<VISIT_COUNT>3</VISIT_COUNT>
</LINE>
The visit count is the number of times the function was called. The line visit count is the total count for the number of lines visited in the function during those calls.