Skip to content
Novus Examples
xml16.7 KB

Coverage — JaCoCo Multi-Module <group>

The aggregate form a multi-module build produces: packages nested inside a <group> rather than directly under <report>. Parsers with a hardcoded report/package path find nothing here and report a module with no coverage at all.

Preview — first 50 linesxml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd">
<report name="novus-checkout-service">
  <sessioninfo id="ci-runner-04" start="1786000401000" dump="1786000462000"/>
  <group name="checkout-service">
    <package name="src/cart">
      <class name="src/cart/pricing" sourcefilename="pricing.js">
        <method name="unitPrice" desc="()V" line="2">
          <counter type="INSTRUCTION" missed="0" covered="12"/>
          <counter type="LINE" missed="0" covered="3"/>
          <counter type="COMPLEXITY" missed="0" covered="1"/>
          <counter type="METHOD" missed="0" covered="1"/>
        </method>
        <method name="quantityMultiplier" desc="()V" line="8">
          <counter type="INSTRUCTION" missed="0" covered="12"/>
          <counter type="LINE" missed="0" covered="3"/>
          <counter type="COMPLEXITY" missed="0" covered="1"/>
          <counter type="METHOD" missed="0" covered="1"/>
        </method>
        <method name="roundHalfUp" desc="()V" line="13">
          <counter type="INSTRUCTION" missed="0" covered="12"/>
          <counter type="LINE" missed="0" covered="3"/>
          <counter type="COMPLEXITY" missed="0" covered="1"/>
          <counter type="METHOD" missed="0" covered="1"/>
        </method>
        <method name="applyTax" desc="()V" line="19">
          <counter type="INSTRUCTION" missed="0" covered="12"/>
          <counter type="LINE" missed="0" covered="3"/>
          <counter type="COMPLEXITY" missed="0" covered="1"/>
          <counter type="METHOD" missed="0" covered="1"/>
        </method>
        <method name="bulkRate" desc="()V" line="25">
          <counter type="INSTRUCTION" missed="0" covered="12"/>
          <counter type="LINE" missed="0" covered="3"/>
          <counter type="COMPLEXITY" missed="0" covered="1"/>
          <counter type="METHOD" missed="0" covered="1"/>
        </method>
        <method name="convertCurrency" desc="()V" line="31">
          <counter type="INSTRUCTION" missed="12" covered="0"/>
          <counter type="LINE" missed="3" covered="0"/>
          <counter type="COMPLEXITY" missed="1" covered="0"/>
          <counter type="METHOD" missed="1" covered="0"/>
        </method>
        <counter type="INSTRUCTION" missed="16" covered="160"/>
        <counter type="BRANCH" missed="2" covered="6"/>
        <counter type="LINE" missed="4" covered="40"/>
        <counter type="COMPLEXITY" missed="1" covered="9"/>
        <counter type="METHOD" missed="1" covered="5"/>
        <counter type="CLASS" missed="0" covered="1"/>
      </class>
334 lines total — download for the full file.

Specifications

Seed
61200
Source Files
4
Lines Found
140
Lines Hit
127
Line Pct
90.71
Branches Found
24
Branches Hit
17
Branch Pct
70.83
Functions Found
20
Functions Hit
18
Line Endings
LF
Format
JaCoCo XML
Has Group Element
true
Group Name
checkout-service
Nesting Depth
report > group > package > class

Testing contract

Expected to pass
Scenario
Locate packages in a JaCoCo report that nests them inside a <group>.
Expected result
Both packages are found one level deeper than usual and the report-level LINE counter still reads covered=127.

What is a .xml file?

XML (Extensible Markup Language) is a verbose, self-describing markup language using nested tags, attributes, and namespaces to represent structured, hierarchical data. It supports schemas, entities, and validation and underlies many document and data formats. It remains common in enterprise, publishing, and interchange contexts.

How to use this file

Use an example XML file to test parsers, namespace and schema validation, XPath queries, and protection against entity-expansion and external-entity attacks.

How to use this file for testing

“Coverage — JaCoCo Multi-Module <group>” is a deterministic Novus Examples fixture for Conversion testing, Code parsing, Schema validation. The same content exported across many formats and linked as a group, so you can convert one and diff against the expected twin.

Documented properties for this file: seed 61200 · LF · JaCoCo XML. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Test and coverage reports document their totals (suites, cases, passes, failures, skips, covered lines) in the spec table. Point your CI dashboard, coverage gate, or report converter at the file and assert those counts survive; format twins carry identical numbers so a conversion can be scored exactly.

Code examples

import xml.etree.ElementTree as ET

tree = ET.parse("jacoco-group-aggregate.xml")
root = tree.getroot()
print(root.tag, [c.tag for c in root][:5])

Generated by generation/testing.py. Free for any use, no attribution required — license.