JUnit XML — Timestamp, Hostname and Package Metadata
Every optional run-metadata attribute a JUnit suite may carry — timestamp, hostname, package, id — plus a properties block holding build and branch identifiers. Use it to test that a dashboard reads build context from the report instead of from its own environment.
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="checkout.SessionTest" tests="3" failures="0" errors="0" skipped="0" time="1.503" timestamp="2026-08-07T09:14:22" hostname="ci-runner-04" package="checkout" id="0">
<properties>
<property name="ci.build" value="4821"/>
<property name="ci.branch" value="release/2026.08"/>
<property name="os.name" value="Linux"/>
</properties>
<testcase classname="checkout.SessionTest" name="createsSessionForNewCart" time="0.666"/>
<testcase classname="checkout.SessionTest" name="restoresCartOnResume" time="0.202"/>
<testcase classname="checkout.SessionTest" name="rotatesSessionToken" time="0.635"/>
</testsuite>
</testsuites>
Specifications
- Seed
- 61200
- Dialect
- surefire
- Encoding
- UTF-8
- Line Endings
- LF
- Tests
- 3
- Failures
- 0
- Errors
- 0
- Skipped
- 0
- Passed
- 3
- Timestamp
- 2026-08-07T09:14:22
- Hostname
- ci-runner-04
- Package
- checkout
Testing contract
Expected to pass- Scenario
- Extract build context (branch, build number, host) from a JUnit report.
- Expected result
- ci.build=4821 and ci.branch=release/2026.08 are read from <properties>, and the suite timestamp 2026-08-07T09:14:22 is parsed as ISO 8601 without a zone.
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
“JUnit XML — Timestamp, Hostname and Package Metadata” is a deterministic Novus Examples fixture for Metadata testing, Conversion testing, Log parsing. Images, audio, video, and documents with documented metadata paired with deliberately stripped versions, for verifying extraction, preservation, redaction, and privacy-scrubbing behavior.
Documented properties for this file: seed 61200 · UTF-8 · LF. 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("outcome-timestamped-hostname.xml")
root = tree.getroot()
print(root.tag, [c.tag for c in root][:5])Related files
- xmlJUnit XML — @Playwright/Test Dialect (playwright)The same 12-case Novus Checkout run written the way @playwright/test 1.47 junit reporter writes it. Playwright puts the run totals on the <testsuites> root, names each suite after its spec file, and uses the bare describe title as classname. All eight dialect files in this group report 12 tests, 1 failure, 1 error and 1 skip, so a JUnit parser can be held to identical totals across every producer.

- xmlJUnit XML — Console Output in CDATACaptured stdout and stderr wrapped in CDATA, where the stdout text itself looks like XML markup. A parser must treat the CDATA content as opaque characters; one that re-parses it finds a <report> element that does not exist.

- xmlJUnit XML — File and Line AttributesCases annotated with the source file and line they were declared on, as pytest and several JS runners emit. This is what a code-review annotation bot needs to place a failure comment on the right line of the right file.

- xmlJUnit XML — Go-Junit-Report Dialect (go-junit-report)The same 12-case Novus Checkout run written the way go-junit-report 2.1 writes it. go-junit-report names each suite after a Go package and carries the toolchain version in a go.version property. All eight dialect files in this group report 12 tests, 1 failure, 1 error and 1 skip, so a JUnit parser can be held to identical totals across every producer.

- xmlJUnit XML — Gradle Dialect (gradle)The same 12-case Novus Checkout run written the way Gradle 8.9 Test task writes it. Gradle writes hostname and timestamp on every suite and an empty self-closing <properties/> element that some parsers mishandle. All eight dialect files in this group report 12 tests, 1 failure, 1 error and 1 skip, so a JUnit parser can be held to identical totals across every producer.

- xmlJUnit XML — Jest-Junit Dialect (jest-junit)The same 12-case Novus Checkout run written the way jest-junit 16 writes it. jest-junit repeats the whole "describe > it" title in both classname and name, which breaks dashboards that assume classname is a package. All eight dialect files in this group report 12 tests, 1 failure, 1 error and 1 skip, so a JUnit parser can be held to identical totals across every producer.

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