A forked JUnit XML formatter for Cucumber that extends the default internal formatter from @cucumber/cucumber (v10+) by adding file name and line numbers to each test case. Current stable version is 0.7.1. Accepts a stream of Cucumber messages and outputs JUnit XML. Requires @cucumber/messages as a peer dependency. Distinguishes itself from the built-in formatter by including scenario source location, which aids in test report debugging and CI integration.
npm install cucumber-junit-xml-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup importing the formatter and piping messages to generate JUnit XML output.
Pipe the output from Cucumber's message stream, e.g., using @cucumber/cucumber's formatters option or programmatic API.
Check compatibility with your @cucumber/messages version; use peer dependency @cucumber/messages: * but test against known versions.
Pin to exact version if you rely on specific XML formatting.
Use default import: import CucumberJunitXmlFormatter from 'cucumber-junit-xml-formatter'
Install @cucumber/messages: npm install @cucumber/messages
No dependency data recorded yet.