Skip to content

feat(reports): JUnit XML with per-file suites, classname and system-out - #1051

Merged
Chemaclass merged 1 commit into
mainfrom
feat/1016-junit-classname-suites
Aug 10, 2026
Merged

feat(reports): JUnit XML with per-file suites, classname and system-out#1051
Chemaclass merged 1 commit into
mainfrom
feat/1016-junit-classname-suites

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1016

The JUnit report was a single flat <testsuite> with no classname, a constant message="Test failed" and no captured output, so Jenkins, GitLab, Azure and dorny/test-reporter collapsed every run into one undifferentiated bucket.

💡 Changes

  • One <testsuite> per test file with its own counts, time and timestamp; aggregate totals move to <testsuites>
  • Every <testcase> gets classname (dotted file path), name, file and time; <failure message> carries the first informative line of the real message with type="AssertionFailed" and the full text in the body
  • The test's captured output is retained as a new reports column (spooled across the --parallel fork boundary, fix(reports): every report format is empty under --parallel #1004 guard) and emitted as <system-out> when non-empty
  • Per-testcase seconds are formatted in pure bash with a literal dot, removing the per-testcase awk fork the 7 test failures on Bash 5.3 macOS (nix-shell) #912 locale workaround existed for; existing ANSI/control/XML escaping unchanged

One <testsuite> per test file (own counts, time, timestamp) instead of a
single flat suite, because per-suite grouping is the unit Jenkins,
GitLab, Azure and dorny/test-reporter organise results by. Every
<testcase> carries classname (dotted file path), name, file and time.

<failure> now puts the first informative line of the real message in the
message attribute (skipping the "✗ Failed:" banner that repeats the
name) with type="AssertionFailed" and the full text in the body. The
test's captured output is retained through a new reports column --
spooled across the --parallel fork boundary like the rest -- and lands
in <system-out> when non-empty.

Per-testcase times are now formatted in pure bash with a literal dot,
which removes the per-testcase awk fork the #912 locale workaround
guarded.

Closes #1016
@Chemaclass Chemaclass added the enhancement New feature or request label Aug 10, 2026
@Chemaclass Chemaclass self-assigned this Aug 10, 2026
@Chemaclass
Chemaclass merged commit 0ab7bac into main Aug 10, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the feat/1016-junit-classname-suites branch August 10, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant