You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_runner: JUnit reporter omits the timestamp attribute on <testsuite> #64028
The JUnit reporter (node --test --test-reporter=junit) emits <testsuite> elements without the timestamp attribute defined by the JUnit/Ant XML schema. timestamp records, in ISO 8601, when the suite started; Node never writes it.
Why it matters
<testsuite timestamp> is how JUnit-consuming tools (CI dashboards, test-report viewers) anchor each suite on a time axis — for example, to order suites coming back from parallel/sharded runs, and to build per-suite history and trends across runs. Without it, consumers fall back to file mtime or the overall job time, which is coarser and can be misleading.
Node is also an outlier among JUnit producers: pytest (--junitxml), jest-junit, mocha-junit-reporter, and Maven Surefire all emit timestamp on <testsuite>. Node's reporter already emits time and hostname on <testsuite> (and file on <testcase>), but not timestamp.
In lib/internal/test_runner/reporter/junit.js, emit the suite start time as the timestamp attribute on each <testsuite>.
There is one open question — the value format:
Full ISO 8601 with timezone (e.g. 2026-06-20T12:34:56.789Z). This is what Date.prototype.toISOString() produces directly, it is unambiguous about the instant, and it is the direction newer tooling (pytest 8.x, Maven Surefire 3.5.5+) is moving.
Legacy no-timezone Ant form (e.g. 2026-06-20T12:34:56). This is the canonical de-facto format (Ant XMLJUnitResultFormatter; the strict windyroad JUnit XSD even pins it to \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} with no zone) and what jest-junit / mocha-junit-reporter currently emit, but it is ambiguous about the actual instant.
Activity
test_runner: add timestamp to JUnit reporter testsuites
test_runner: add timestamp to JUnit reporter testsuites
test_runner: add timestamp to JUnit reporter testsuites
test_runner: add timestamp to JUnit reporter testsuites
test_runner: add timestamp to JUnit reporter testsuites
test_runner: add timestamp to JUnit reporter testsuites