Skip to main content
Bun’s test runner supports multiple reporters to format test output. Choose the reporter that best fits your workflow.

Available reporters

Default reporter

The default reporter shows detailed test results:

Dot reporter

Minimal output showing dots for each test:
Useful for:
  • CI environments with log size limits
  • Large test suites where detailed output is noisy
  • Quick feedback during development

JUnit reporter

Generates JUnit XML format for CI integration:
Creates junit.xml:

Only failures reporter

Shows only failing tests:
Useful for:
  • Large test suites where you only care about failures
  • CI environments
  • Debugging specific failures

Using reporters

Single reporter

Multiple reporters

Use multiple reporters simultaneously:

Reporter configuration

Configure in bunfig.toml

JUnit reporter output

Specify output file:

CI integration

GitHub Actions

Publish test results:

GitLab CI

Jenkins

CircleCI

Custom output

Redirect to file

Save test output to a file:

JSON output

For programmatic consumption:
Coming soon.

Reporter behavior

Color output

Reporters automatically detect TTY and disable colors in non-interactive environments:

Progress indication

Default reporter shows progress:

Error formatting

Errors include:
  • Error message
  • Stack trace
  • Source location
  • Diff (for equality assertions)

Performance metrics

All reporters show:
  • Number of passed/failed tests
  • Number of test files
  • Total execution time
  • Number of assertions

Watch mode reporters

In watch mode, reporters show incremental updates:

Troubleshooting

No output file created

Ensure you specify --reporter-outfile:

Invalid XML in JUnit output

Ensure test names don’t contain invalid XML characters. Bun automatically escapes them.

Colors not working

Force color output:
Or disable: