Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #3877 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

The output xml didn't confirm to Cobertura DTD

Reported by: yllan@… Owned by: jdsiiro
Priority: normal Milestone:
Component: gcovr Version:
Keywords: Cc:


According to the DTD ( which gcovr included, the root element (coverage node) should have attribute "line-rate", "branch-rate", "version" and "timestamp." But the xml output of gcovr didn't have these attributes.

Because the lack of these attributes, Bamboo cobertura plug-in didn't work well with gcovr output.

I have a simple workaround by adding "line-rate" and "branch-rate" to the root node. (No version and timestamp though, but it works with Bamboo Cobertura plug-in.) You could check my code here:


Change History

comment:1 Changed 5 years ago by wehart

  • Status changed from new to closed
  • Resolution set to fixed

I've merged these changes into the gcovr trunk.

I wasn't able to download the DTD to confirm the format needed for 'version' and 'timestamp'. We can add those attributes later if needed.

comment:2 Changed 5 years ago by jdsiiro

Referenced in changeset [2553]:

Adding timestamp and version attributes to the gcovr XML report (as documented in #3877).

  • it looks like the standard Cobertura output reports number of seconds since the epoch for the timestamp and a doted decimal version string.
  • gcovr reports seconds since the epoch and "gcovr "+__version__ (e.g. "gcovr 2.2") to differentiate it from a pure Cobertura report. Please file a ticket if applications have difficulty reading the XML.

Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.