Welcome to the home page for cargo-nextest, a next-generation test runner for Rust projects.
- Clean, beautiful user interface. Nextest presents its results concisely so you can see which tests passed and failed at a glance.
- Up to 3× as fast as cargo test. Nextest uses a state-of-the-art execution model for faster, more reliable test runs.
- Identify slow and leaky tests. Use nextest to detect misbehaving tests, identify bottlenecks during test execution, and optionally terminate tests if they take too long.
- Filter tests using an embedded language. Use powerful filter expressions to specify granular subsets of tests on the command-line, and to enable per-test overrides.
- Configure per-test overrides. Automatically retry subsets of tests, mark them as heavy, or run them serially.
- Designed for CI. Nextest addresses real-world pain points in continuous integration scenarios:
- Use pre-built binaries for quick installation.
- Set up CI-specific configuration profiles.
- Reuse builds and partition test runs across multiple CI jobs. (Check out this example on GitHub Actions).
- Automatically retry failing tests, and mark them as flaky if they pass later.
- Print failing output at the end of test runs.
- Output information about test runs as JUnit XML.
- Cross-platform. Nextest works on Linux and other Unixes, Mac and Windows, so you get the benefits of faster test runs no matter what platform you use.
- ... and more coming soon!
Install cargo-nextest for your platform using the pre-built binaries.
Run all tests in a workspace:
cargo nextest run
For more detailed installation instructions, see Installation.
Note: Doctests are currently not supported because of limitations in stable Rust. For now, run doctests in a separate step with
cargo test --doc.
|Crate||crates.io||rustdoc (latest version)||rustdoc (main)|
|cargo-nextest, the main test binary|
|nextest-runner, core nextest logic|
|nextest-metadata, parsers for machine-readable output|
|nextest-filtering, parser and evaluator for filter expressions|
|quick-junit, JUnit XML serializer|
The source code for nextest and this site are hosted on GitHub, at https://github.com/nextest-rs/nextest.
Contributions are welcome! Please see the CONTRIBUTING file for how to help out.
This document is licensed under CC BY 4.0. This means that you are welcome to share, adapt or modify this material as long as you give appropriate credit.