BullseyeCoverage Up Contents Search

covxml - Export as XML

covxml [options]


Converts coverage data to an XML format. By default, the XML is written to the standard output.

The XML format is described below.

The Root Element

<?xml version="1.0" encoding="UTF-8"?>
<BullseyeCoverage name="basename" dir="directory" buildId="buildId" version="6" xmlns="https://www.bullseye.com/covxml" summary-measurements>
<!-- sequence of <folder> and <src> elements -->
nameThe basename of the coverage file
dirThe source directory. The source and folder names are relative to this directory
buildIdIdentifies the last change made to the coverage file as a result of building

The folder Element

<folder name="basename" summary-measurements>
<!-- sequence of <folder> and <src> elements -->
namebasename of folder

The src Element

<src name="basename" mtime="n" summary-measurements>
<!-- sequence of <fn> elements -->
namebasename of source file
mtimetimestamp of source file in seconds since the Epoch

The fn Element

<fn name="function-name" summary-measurements>
<!-- sequence of <probe> elements -->
<!-- sequence of <block> elements -->
namefunction name

The probe Element

<probe line="n" column="n" col_seq="n" kind="kind" event="event"/>
lineSource file line number
column Beginning column number of the code measured by the probe, not counting whitespace. If not present, the value is zero.
col_seq Column sequence number. Uniquely identifies probes having the same line and column. If not present, the value is zero.
kindOne of: catch, condition, constant, decision, for-range-body, function, switch-label, try
eventOne of: none, false, true, full. Value none indicates no coverage. Value false indicates the condition or decision evaluated to false at least once, but never true. Value true indicates the condition or decision evaluated to true at least once, but never false. Value full indicates all possible coverage. For example, a decision covered both true and to false is indicated by full. When the kind attribute has value "constant", there is no event attribute.

The block Element

<block line="n" entered="entered"/>
lineSource file line number
entered If the block was entered, the value 1, otherwise 0.

The block element is provided to assist with importation to a system that accepts statement coverage or basic block coverage, but cannot use the condition/decision coverage provided by the probe element. You can ignore this element unless you have such a restriction. This information is similar to statement coverage but does not meet the requirement of statement coverage for safety-critical certification.

The block element indicates whether a block of contiguous statements was reached. The statements are either a function body, or substatements in a control structure reached by a conditional branch. A statement reached does not imply the statement completed or that subsequent statements were reached. The block elements are derived from condition/decision coverage as described in Instrumentation Model.

Some information available in the probe elements has no representation in the block elements. For example, the events listed below are not indicated.

The summary-measurements Attributes

fn_cov="n" fn_total="n" cd_cov="n" cd_total="n" d_cov="n" d_total="n"
fn_covnumber of functions invoked for the region
fn_totaltotal number of functions in the region
cd_covnumber of conditions and decisions invoked for the region
cd_totaltotal number of conditions and decisions in the region
d_covnumber of decisions invoked for the region
d_totaltotal number of decisions in the region

We recommend ignoring the decision coverage measurements, d_cov and d_total. Decision coverage may report uncovered code as covered. Use these measurements only to compare with results from other tools that cannot provide condition/decision coverage.


-fPath--file Path The coverage file is specified by Path. The default is test.cov.
-h--help Display a summary of options.
-oOutput--output Output Write XML to Output instead of standard output
-q--quiet Suppress warnings and the copyright message.
--no-banner Suppress startup banner
--xsl Include a style sheet reference. When used with -o/--output, include a processing instruction specifying a style sheet with name derived from Output by removing any suffix and appending .xsl. If the style sheet file does not exist, a sample style sheet is written. Note that some browsers do not allow processing XML stylesheets from the local file system. In this case, a blank page appears. Use the stylesheet over HTTP or HTTPS.

Environment Variables

COVFILEThe coverage file. Option -f (--file) overrides this setting.
COVXMLCFGConfiguration file. See FILES.


If the files listed below exist, they contain initial options separated by white space. Within such files, $NAME is replaced by the value of environment variable NAME.


Version History

File Version Software Version Date Changes
17.7.25Sep 2007
27.8.0Sep 2007 Remove root element attribute mtime, add attribute buildId
37.11.3Jan 2009 Add probe element attribute column
37.12.4Jun 2009 Remove probe element attribute seq, add attribute col_seq
48.0.16Feb 2011 Add root tag attribute xmlns
58.9.63Aug 2015BullseyeCoverage element contains top level measurements
68.20.0Oct 2020Add block element

Last update: 26 Jan 2022