Back to Mocha

XUnit

docs-next/src/content/docs/reporters/xunit.mdx

11.7.6444 B
Original Source

Alias: XUnit, xunit

The XUnit reporter outputs an XUnit-compatible XML document, often applicable in CI servers.

By default, it will output to the console. To write directly to a file, use --reporter-option output=filename.xml.

To specify custom report title, use --reporter-option suiteName="Custom name".

The reporter shows absolute file paths by default. To show relative paths instead, use --reporter-option showRelativePaths.