test_runner: add timestamp to JUnit reporter testsuites#64029
Open
Han5991 wants to merge 2 commits into
Open
Conversation
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>
Collaborator
|
Review requested:
|
Signed-off-by: sangwook <rewq5991@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the standard JUnit
timestampattribute (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:startlazily (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
Zvs the legacy no-timezone Ant form) is an open question — see #64028. This currently emitsDate.prototype.toISOString()(UTC,Z).Fixes: #64028