Skip to content

test_runner: add timestamp to JUnit reporter testsuites - #64029

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
Han5991:feat/test-runner-junit-timestamp
Jun 22, 2026
Merged

nodejs-github-bot merged 2 commits into
nodejs:mainfrom
Han5991:feat/test-runner-junit-timestamp

Conversation

@Han5991

@Han5991 Han5991 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Adds the standard JUnit timestamp attribute (ISO 8601) to <testsuite> elements, which the reporter was omitting. Major CI tools (Jenkins / GitLab / Azure DevOps) use it to order suites from parallel runs and to build test-trend history, and other producers (pytest, jest-junit, mocha-junit-reporter, Maven Surefire) all emit it.

The suite start time is derived as end-minus-duration, because the runner reports a suite's test:start lazily (when its first subtest reports) — stamping at that moment would otherwise record a time close to the suite's end.

The exact value format (full ISO-8601 with Z vs the legacy no-timezone Ant form) is an open question — see #64028. This currently emits Date.prototype.toISOString() (UTC, Z).

Fixes: #64028

Emit the standard JUnit timestamp (ISO 8601) on <testsuite> elements,
which the reporter was omitting. The suite start time is reconstructed
as end-minus-duration, because the runner reports a suite's test:start
lazily (when its first subtest reports), which would otherwise record a
time close to the suite's end.

Fixes: nodejs#64028
Signed-off-by: sangwook <rewq5991@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jun 20, 2026
Signed-off-by: sangwook <rewq5991@gmail.com>
@MoLow MoLow added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Jun 21, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 21, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@JakobJingleheimer JakobJingleheimer added commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Jun 22, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jun 22, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 546b596 into nodejs:main Jun 22, 2026
76 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 546b596

@Han5991
Han5991 deleted the feat/test-runner-junit-timestamp branch June 28, 2026 12:32
richardlau pushed a commit that referenced this pull request Jul 3, 2026
Emit the standard JUnit timestamp (ISO 8601) on <testsuite> elements,
which the reporter was omitting. The suite start time is reconstructed
as end-minus-duration, because the runner reports a suite's test:start
lazily (when its first subtest reports), which would otherwise record a
time close to the suite's end.

Fixes: #64028
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: #64029
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
aduh95 pushed a commit that referenced this pull request Jul 8, 2026
Emit the standard JUnit timestamp (ISO 8601) on <testsuite> elements,
which the reporter was omitting. The suite start time is reconstructed
as end-minus-duration, because the runner reports a suite's test:start
lazily (when its first subtest reports), which would otherwise record a
time close to the suite's end.

Fixes: #64028
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: #64029
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jul 9, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | minor | `26.3.1` → `26.5.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v26.5.0`](https://github.com/nodejs/node/releases/tag/v26.5.0): 2026-07-08, Version 26.5.0 (Current), @&#8203;richardlau

[Compare Source](nodejs/node@v26.3.1...v26.5.0)

##### Notable Changes

##### New release key

Welcome to our newest releaser, [Stewart X Addison](https://github.com/sxa). Future Node.js releases may be signed with his [release key](https://github.com/nodejs/node/blob/main/README.md#release-keys), `655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD`.

##### Other notable changes

- \[[`55f48446c7`](nodejs/node@55f48446c7)] - **(SEMVER-MINOR)** **buffer**: implement blob.textStream() (Matthew Aitken) [#&#8203;64036](nodejs/node#64036)
- \[[`b373202efc`](nodejs/node@b373202efc)] - **(SEMVER-MINOR)** **esm**: add `--experimental-import-text` flag (Efe) [#&#8203;62300](nodejs/node#62300)
- \[[`39e0c14455`](nodejs/node@39e0c14455)] - **(SEMVER-MINOR)** **perf\_hooks**: sample delay per event loop iteration (Pablo Erhard) [#&#8203;62935](nodejs/node#62935)
- \[[`999a83c937`](nodejs/node@999a83c937)] - **(SEMVER-MINOR)** **stream**: expose ReadableStreamTee (Matteo Collina) [#&#8203;64195](nodejs/node#64195)
- \[[`4e0236dc3d`](nodejs/node@4e0236dc3d)] - **(SEMVER-MINOR)** **tls**: report negotiated TLS groups (Filip Skokan) [#&#8203;64119](nodejs/node#64119)

##### Commits

- \[[`87648c0a6c`](nodejs/node@87648c0a6c)] - **benchmark**: trim down the argon2 sets (Filip Skokan) [#&#8203;64218](nodejs/node#64218)
- \[[`a483bfd3f0`](nodejs/node@a483bfd3f0)] - **buffer**: remove unreachable overflow check in atob (haramjeong) [#&#8203;60161](nodejs/node#60161)
- \[[`6d14279688`](nodejs/node@6d14279688)] - **buffer**: add fast api for isUtf8 and isAscii (Gürgün Dayıoğlu) [#&#8203;64169](nodejs/node#64169)
- \[[`55f48446c7`](nodejs/node@55f48446c7)] - **(SEMVER-MINOR)** **buffer**: implement blob.textStream() (Matthew Aitken) [#&#8203;64036](nodejs/node#64036)
- \[[`a67d9a7a44`](nodejs/node@a67d9a7a44)] - **build**: allow linting node.1 (Aviv Keller) [#&#8203;64157](nodejs/node#64157)
- \[[`06c1fbc25b`](nodejs/node@06c1fbc25b)] - **build**: enable Maglev for riscv64 (Jamie Magee) [#&#8203;62605](nodejs/node#62605)
- \[[`518309c363`](nodejs/node@518309c363)] - **build**: suppress clang errors building libffi on Windows (René) [#&#8203;64222](nodejs/node#64222)
- \[[`6a80ab485c`](nodejs/node@6a80ab485c)] - **build**: add manually-dispatched stress-test workflow (Joyee Cheung) [#&#8203;64118](nodejs/node#64118)
- \[[`f4e7bf1f1c`](nodejs/node@f4e7bf1f1c)] - **build**: pin envinfo versions in github actions (Joyee Cheung) [#&#8203;64117](nodejs/node#64117)
- \[[`66f6ac0d86`](