CheckOps
cargo-nextest
cargo-nextest is an Apache-2.0 next-generation test runner for Rust, up to 3x faster than cargo test per its site, with per-test process isolation, retries, partitioning, JUnit output and a filterset DSL.
- Unit Testing
- Rust
- Open source
- Free
- Test Runner
- Command Line
- Unit testing
- Integration testing
- Release & CI gates
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
cargo-nextest is a next-generation test runner for Rust. Its website describes it as up to three times faster than cargo test, with a modern interface, per-test isolation and first-class CI support. The repository also contains the libraries behind it: nextest-runner for core logic, nextest-metadata for calling nextest from other tools, and nextest-filtering for its filterset language.
The key design difference from cargo test is that nextest runs each test in its own process. Cargo’s built-in harness runs tests from one binary as threads in a single process, so a test that crashes, leaks global state or hangs can affect others. Nextest’s process-per-test model isolates tests, lets it schedule tests across all binaries at once for better parallelism, and makes features such as per-test timeouts and retries reliable.
The README notes a very low minimum Rust version for running nextest (Rust 1.41, though not tested that far back) and requires a recent stable Rust (1.91 at the time of review) to build it. Pre-built binaries are available for major platforms, so CI does not need to compile it. The latest release, cargo-nextest 0.9.151, was published on 3 November 2026.
The documentation covers a wide range of features: retries and flaky-test detection, slow-test warnings and timeouts, record-and-replay of test runs (including rerunning only failures and Perfetto traces), leaky-test detection, stress tests, archiving builds to run tests on another machine, partitioning and sharding across CI jobs, test priorities, heavy tests that take several slots, mutual exclusion and rate limiting, setup scripts and wrapper scripts. Integrations include VS Code, RustRover, coverage tools, Miri, Criterion benchmarks, cargo-mutants and JUnit XML output.
How it compares: cargo test is built in and also runs doctests, which nextest does not yet run (teams typically run cargo test --doc separately). Nextest is a drop-in replacement for most other tests, configured through .config/nextest.toml with named profiles, for example a ci profile with retries and JUnit output.
In the quality loop, nextest speeds up unit and integration test runs locally and in CI, and its retries, flaky-test reporting and sharding make it a strong foundation for Rust release gates.
The source code is at nextest-rs/nextest on GitHub under the Apache-2.0 licence, with about 3,400 stars; the most recent commit was on 8 November 2026.
Features
- Process per test: Isolates crashes, global state and hangs, and enables reliable timeouts.
- Faster scheduling: Runs tests across all test binaries in parallel; the site cites up to 3x speed-ups.
- Retries and flaky detection: Retry failing tests and report which ones passed only on retry.
- Filtersets: A DSL such as
-E 'package(core) and test(/parse/)'selects exactly which tests run. - Profiles: Named configurations in
.config/nextest.toml, for example separate local and CI settings. - Partitioning and archives: Shard runs across CI machines and reuse builds on other machines.
- Timeouts and slow tests: Warn about slow tests and terminate hung ones.
- Machine-readable output: JUnit XML and other formats for CI dashboards.
Pros
- Better CI ergonomics: Retries, sharding and JUnit output are built in.
- Drop-in adoption: Most projects can switch with
cargo nextest runand no code changes. - Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 8 November 2026.
- Community: About 3,400 GitHub stars.
Cons
- No doctests: Doctests still need
cargo test --doc. - Process overhead: Spawning a process per test adds overhead for suites of extremely tiny tests (usually outweighed by better parallelism).
- Extra tool to install: CI images need the nextest binary.
- Shared-state assumptions: Tests that rely on running in the same process (for example shared in-memory singletons) need adjustment.
Usage and Links (Example)
Install a pre-built binary (see the docs for your platform) or via Cargo, then run tests:
cargo install cargo-nextest --locked
cargo nextest run
Select tests with a filterset and re-run failures:
cargo nextest run -E 'package(billing) & test(/invoice/)'
cargo nextest run --no-fail-fast
A CI profile with retries, timeouts and JUnit output in .config/nextest.toml:
[profile.ci]
retries = 2
fail-fast = false
slow-timeout = { period = "60s", terminate-after = 3 }
[profile.ci.junit]
path = "junit.xml"
cargo nextest run --profile ci --partition count:1/4
cargo test --doc # doctests still run with cargo test
Practical tips:
- Track tests that only pass on retry and fix them, rather than raising retry counts.
- Use partitioning to split long suites across parallel CI jobs.
- Combine with cargo-llvm-cov for coverage; it has documented nextest support.
Resources:
Pricing
cargo-nextest is free and open source under the Apache-2.0 licence.
Recommended for?
- Rust teams with large workspaces or slow test suites.
- CI owners who need retries, sharding and JUnit reports.
- Projects with flaky or hanging tests that benefit from isolation and timeouts.
- Not a fit on its own for doctests, which still need
cargo test --doc.
Conclusion
cargo-nextest has become the standard upgrade over cargo test for serious Rust projects, thanks to process isolation, faster scheduling and excellent CI features.
Adopt it with a CI profile, keep running doctests separately, and you get quicker, more reliable Rust test runs.
Compare
CheckOps pages that put cargo-nextest next to related tools. There is no paid placement on these lists.
Roundups
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with cargo-nextest side by side.
Rrstestrstest is an Apache-2.0 fixture-based and parameterised testing framework for Rust, offering pytest-style fixtures, #[case] tables, value matrices and async support on top of cargo test.Compare with cargo-nextest
Pproptestproptest is a Hypothesis-inspired property-based testing framework for Rust, with composable strategies, automatic shrinking and persisted regression files.Compare with cargo-nextest
Iinstainsta is an Apache-2.0 snapshot testing library for Rust by Armin Ronacher, with assert_snapshot! macros, serde-based formats, redactions, inline snapshots and the cargo insta review tool.Compare with cargo-nextest
Ccargo-mutantscargo-mutants is an MIT-licensed mutation testing tool for Rust that injects bugs into your code and reports which ones your tests miss, with nextest support, sharding and diff-based runs.Compare with cargo-nextest
Ccargo-llvm-covcargo-llvm-cov is a cargo subcommand (Apache-2.0 or MIT) for LLVM source-based code coverage in Rust, supporting cargo test, cargo run and cargo nextest with precise line and region coverage.Compare with cargo-nextest
Ccargo-tarpaulincargo-tarpaulin is an Apache-2.0 code coverage tool for Rust projects, with ptrace and LLVM engines and HTML, LCOV, Cobertura XML and JSON reports plus Coveralls and Codecov support.Compare with cargo-nextest