Skip to content

test_runner: remove failure attribute from JUnit reporter - #66072

Open
AlexCannonball wants to merge 1 commit into
nodejs:mainfrom
AlexCannonball:fix-junit-element
Open

AlexCannonball wants to merge 1 commit into
nodejs:mainfrom
AlexCannonball:fix-junit-element

Conversation

@AlexCannonball

@AlexCannonball AlexCannonball commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Description

This Pull Request is a continuation of the abandoned #59685 by @devholic22, addressing the issue where the JUnit reporter incorrectly embedded the failure message as an attribute on <testcase> elements, which violates the official JUnit specification.

Original authorship has been preserved via the Co-authored-by trailer in the commit, based on the original changes from @devholic22's patch: https://github.com/devholic22/node/commit/7cca5c1e7beca16341daa3a4fc9d6275d04b3ba2.patch

Links

Fixes: #59593 (a part related to the XML testcase:failure attribute value)
Supersedes: #59685

This commit aligns the Node.js test runner's JUnit XML output with the
official JUnit specification by removing the non-standard failure
attribute from elements.

Signed-off-by: Aliaksandr <42497203+AlexCannonball@users.noreply.github.com>
Co-authored-by: devholic22 <hyunjoon.tech@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 Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.25%. Comparing base (ecd365e) to head (bc5e877).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66072   +/-   ##
=======================================
  Coverage   90.25%   90.25%           
=======================================
  Files         789      789           
  Lines      271482   271481    -1     
  Branches    51820    51816    -4     
=======================================
+ Hits       245030   245033    +3     
+ Misses      16926    16925    -1     
+ Partials     9526     9523    -3     
Files with missing lines Coverage Δ
lib/internal/test_runner/reporter/junit.js 95.32% <ø> (+0.55%) ⬆️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JUnit XML failure element and attribute are incorrect when using node:assert

2 participants