reporters
- Type:
- Default:
- CLI:
--reporters=<name> --reporters=<name1>(--reporteris also accepted as an alias)
Configure which reporters to use for test result output.
Built-in reporter names: default, dot, verbose, md, github-actions, junit, json, and blob.
This is a global option set in the root config and cannot be overridden per project in projects.
When no reporters are configured (neither in config nor via --reporters), Rstest defaults to ['md'] in AI agent environments and writes agent-friendly Markdown to stdout.
Usage
Basic example
Multiple reporters
Pass an array to combine console output with file reports for CI/CD pipelines:
Configuring reporters with options
Pass [reporterName, options] inside the reporters array to configure a reporter. See the Reporters guide for each built-in reporter's available options:
Custom reporters
Pass a module specifier (or [specifier, options]) whose default export is a class implementing Reporter, or pass an already constructed Reporter object directly (reporter classes cannot be passed directly). See the Reporter API reference for the Reporter interface, constructor signature, and TypeScript support.
Related documentation
- Reporters guide — usage examples and output formats for built-in reporters
- Reporter API reference — custom reporter implementation