Skip to content
Novus Examples
xml16 KB

Coverage — JaCoCo Method-Level Counters

Per-method INSTRUCTION, LINE, COMPLEXITY and METHOD counters for all 20 methods, 2 of which were never entered. This is the detail a "which functions are untested" report needs and the level at which most converters stop.

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"/>
  <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>
    <sourcefile name="pricing.js">
332 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
Methods
20
Methods Covered
18
Per Method Counters
4

Testing contract

Expected to pass
Scenario
List the methods a run never entered, from JaCoCo method counters.
Expected result
Exactly 2 methods have METHOD missed=1 covered=0 and are reported as untested.

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 Method-Level Counters” 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-method-detail.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.