Skip to content

test_runner: add classname hierarchy for JUnit reporter#60220

Open
mag123c wants to merge 1 commit into
nodejs:mainfrom
mag123c:feature/junit-classname-hierarchy
Open

test_runner: add classname hierarchy for JUnit reporter#60220
mag123c wants to merge 1 commit into
nodejs:mainfrom
mag123c:feature/junit-classname-hierarchy

Conversation

@mag123c

@mag123c mag123c commented Oct 12, 2025

Copy link
Copy Markdown
Contributor

Fixes: #59417

Implements classname hierarchy for the JUnit XML reporter.
Previously, all tests had classname="test".
Now the classname reflects the suite hierarchy (e.g., classname="Math.Addition" for nested suites).

@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 Oct 12, 2025
@atlowChemi
atlowChemi requested review from MoLow and pmarchini October 12, 2025 20:10
@codecov

codecov Bot commented Oct 12, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.14%. Comparing base (7bee754) to head (b8c6928).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #60220    +/-   ##
========================================
  Coverage   90.13%   90.14%            
========================================
  Files         741      743     +2     
  Lines      242246   242429   +183     
  Branches    45628    45664    +36     
========================================
+ Hits       218350   218538   +188     
+ Misses      15397    15392     -5     
  Partials     8499     8499            
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 97.93% <100.00%> (+0.01%) ⬆️
lib/internal/test_runner/tests_stream.js 93.02% <100.00%> (+0.06%) ⬆️

... and 64 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.

@mag123c
mag123c force-pushed the feature/junit-classname-hierarchy branch from f738875 to 5e2a5d3 Compare October 13, 2025 00:26
@CuriousStork

Copy link
Copy Markdown

Hello @MoLow @pmarchini

Could you take a look? Thank you.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 20, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 20, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mag123c
mag123c force-pushed the feature/junit-classname-hierarchy branch from 5e2a5d3 to 175d312 Compare January 26, 2026 00:48
@CuriousStork

Copy link
Copy Markdown

Hello @MoLow

Could you take a look? Thank you.

@mag123c
mag123c force-pushed the feature/junit-classname-hierarchy branch from 175d312 to e245584 Compare April 4, 2026 03:59
@MoLow MoLow added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 5, 2026
@MoLow

MoLow commented Apr 5, 2026

Copy link
Copy Markdown
Member

@mag123c, please avoid pushing new commits if unnececary as it requires an entire CI cycle every time

@github-actions github-actions Bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Apr 5, 2026
@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor
Failed to start CI
- Validating Jenkins credentials
✔  Jenkins credentials valid
- Querying data for job/node-test-pull-request/71009/
[SyntaxError: Unexpected token '<', ..."    
  https://github.com/nodejs/node/actions/runs/24002251583

@MoLow MoLow added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Apr 5, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 5, 2026
@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor
Failed to start CI
- Validating Jenkins credentials
✔  Jenkins credentials valid
- Querying data for job/node-test-pull-request/71009/
[SyntaxError: Unexpected token '<', ..."    
  https://github.com/nodejs/node/actions/runs/24002689464

@github-actions github-actions Bot added the request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. label Apr 5, 2026
@avivkeller

Copy link
Copy Markdown
Member

@mag123c Please rebase

@mag123c
mag123c force-pushed the feature/junit-classname-hierarchy branch from e245584 to ddab7fe Compare July 24, 2026 06:33
@mag123c

mag123c commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main, thanks @avivkeller.

@avivkeller

Copy link
Copy Markdown
Member

Can you amend your first commit, it must have a "Signed-off-by" trailer.

Signed-off-by: mag123c <diehreo@gmail.com>
@mag123c
mag123c force-pushed the feature/junit-classname-hierarchy branch from ddab7fe to b8c6928 Compare July 26, 2026 05:56
@mag123c

mag123c commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Done, added the sign-off. Thanks @avivkeller!

@atlowChemi atlowChemi added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Jul 26, 2026
@github-actions github-actions Bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jul 26, 2026
@github-actions

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@atlowChemi atlowChemi removed the request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. label Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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.

Can't set classname for testcase element in JUnit XML when using node:test

8 participants