Skip to content
Novus Examples
xml16.2 KB

Coverage — JaCoCo with Several Session Records

A report merged from three separate JVM sessions, each recorded as its own <sessioninfo> with start and dump timestamps. The counters are already the merged totals, so summing per-session anything from this file is a mistake it exists to catch.

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"/>
  <sessioninfo id="ci-runner-07" start="1786000462100" dump="1786000534000"/>
  <sessioninfo id="ci-runner-11" start="1786000534100" dump="1786000601000"/>
  <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"/>
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
Sessions
3
Session Ids
ci-runner-04, ci-runner-07, ci-runner-11
Merged Exec Files
3

Testing contract

Expected to pass
Scenario
Read execution provenance from a merged JaCoCo report.
Expected result
Three sessions are listed with distinct ids and timestamps while the counters remain the single merged total, not a per-session figure.

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 with Several Session Records” 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-with-sessioninfo.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.