cargo-nextest¶
Welcome to the home page for cargo-nextest, a next-generation test runner for Rust projects.
Features¶
- Clean, beautiful user interface

See which tests passed and failed at a glance.
- Up to 3x as fast as cargo test
Nextest uses a modern execution model for faster, more reliable test runs.
- Powerful test selection
Use a sophisticated expression language to select exactly the tests you need. Filter by name, binary, platform, or any combination.
- Identify misbehaving tests
Treat tests as cattle, not pets. Detect and terminate slow tests. Loop over tests many times with stress testing.
- Customize settings by test
Automatically retry some tests, mark them as heavy, run them serially, and much more.
- Designed for CI
Archive and partition tests across multiple workers, export JUnit XML, and use profiles for different environments.
- An ecosystem of tools
Collect test coverage. Do mutation testing. Spin up debuggers. Observe system behavior with DTrace and bpftrace probes.
- Cross-platform
Runs on Linux, Mac, Windows, and other Unix-like systems. Download binaries or build it from source.
- Open source, widely trusted
Powers Rust development at every scale, from independent open source projects to the world's largest tech companies.
- State-of-the-art, made with love
Nextest brings infrastructure-grade reliability to test runners, with care about getting the details right.
Quick start¶
Install cargo-nextest for your platform using the pre-built binaries.
For most Rust projects, nextest works out of the box. To run all tests in a workspace:
cargo nextest run
Note: Doctests are currently not supported because of limitations in stable Rust. For now, run doctests in a separate step with
cargo test --doc.
Crates in this project¶
| 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 filtersets | |||
| quick-junit, JUnit XML serializer | |||
| datatest-stable, custom test harness for data-driven tests | |||
| future-queue, run queued futures with global and group limits |
Contributing¶
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.
License¶
The source code for nextest is licensed under the MIT and Apache 2.0 licenses.
For information about code signing, see Code signing policy.
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.