Skip to content

[TRUNK-17577] Recommend cypress-junit-plugin for file path support#435

Open
samgutentag wants to merge 2 commits intomainfrom
sam/cypress-junit-file-paths
Open

[TRUNK-17577] Recommend cypress-junit-plugin for file path support#435
samgutentag wants to merge 2 commits intomainfrom
sam/cypress-junit-file-paths

Conversation

@samgutentag
Copy link
Member

@samgutentag samgutentag commented Feb 17, 2026

Summary

  • Updated Cypress framework guide to recommend @saucelabs/cypress-junit-plugin as the primary JUnit reporter for proper file path attribution
  • Cypress's built-in Mocha reporter produces XML where the file attribute lives on a sibling <testsuite> rather than a parent, preventing Trunk from associating file paths and Code Owners with test cases
  • Added collapsible XML structure explanation showing the sibling vs. hierarchical issue
  • Built-in reporter preserved as an alternative with clear tradeoff explanation and upload warning documentation

Context

Customer (Gusto) discovered that Cypress's built-in Mocha JUnit reporter doesn't include file paths on <testcase> elements. Dylan Frankland (Trunk) confirmed the hierarchical attribute inheritance requirement and approved recommending the Sauce Labs plugin as a nudge, not a requirement.

Test plan

  • Verify <details> collapsible block renders correctly in GitBook
  • Confirm XML code block syntax highlighting works in GitBook
  • Verify hint block renders with info styling
  • Check that the Sauce Labs plugin npm package name is correct (@saucelabs/cypress-junit-plugin)
  • Verify all existing sections (Disable Retries, Try It Locally, Next Step) are unchanged

Related

Generated with Claude Code

samgutentag and others added 2 commits February 17, 2026 13:53
Updates the Cypress framework guide to recommend the Sauce Labs
cypress-junit-plugin as the primary JUnit reporter, since Cypress's
built-in Mocha reporter produces XML that prevents Trunk from
associating file paths and Code Owners with test cases. The built-in
reporter is preserved as an alternative with a clear tradeoff note.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a details/summary block explaining why the built-in Mocha reporter
causes the "missing file or filepath" warning, with an annotated XML
example showing the sibling vs. hierarchical structure issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@samgutentag samgutentag changed the title Recommend cypress-junit-plugin for file path support [TRUNK-17577] Recommend cypress-junit-plugin for file path support Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant