Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

Hacker News Top Tools

Summary

Cargo-nextest is a next-generation test runner for Rust that offers up to 3x faster test execution, per-test isolation, and first-class CI support.

No content available
Original Article
View Cached Full Text

Cached at: 07/09/26, 07:35 AM

# Home Source: [https://nexte.st/](https://nexte.st/) ## A next\-generation test runner for Rust Up to 3× faster than`cargo test`, with a modern interface, per\-test isolation, and first\-class CI support\. - **Clean, beautiful user interface** --- ![](https://nexte.st/static/cover.png) See which tests passed and failed at a glance\. [Running tests](https://nexte.st/docs/running/) - **Up to 3x as fast as cargo test** --- Nextest uses a modern[execution model](https://nexte.st/docs/design/how-it-works/)for faster, more reliable test runs\. [Benchmarks](https://nexte.st/docs/benchmarks/) - **Powerful test selection** --- Use a sophisticated[expression language](https://nexte.st/docs/filtersets/)to select exactly the tests you need\. Filter by name, binary, platform, or any combination\. [Filtersets](https://nexte.st/docs/filtersets/) - **Identify misbehaving tests** --- Treat tests as cattle, not pets\. Detect and handle[slow tests](https://nexte.st/docs/features/slow-tests/)\. Loop over tests many times with[stress testing](https://nexte.st/docs/features/stress-tests/)\. [Slow tests and timeouts](https://nexte.st/docs/features/slow-tests/) - **Customize settings by test** --- Automatically[retry](https://nexte.st/docs/features/retries/)some tests, mark them as[heavy](https://nexte.st/docs/configuration/threads-required/), run them[serially](https://nexte.st/docs/configuration/test-groups/), and much more\. [Per\-test settings](https://nexte.st/docs/configuration/per-test-overrides/) - **Record, replay and rerun** --- [Record](https://nexte.st/docs/features/record-replay-rerun/)every test run\.[Replay](https://nexte.st/docs/features/record-replay-rerun/replay/)CI runs locally\.[Rerun](https://nexte.st/docs/features/record-replay-rerun/rerun/)failing tests\. Export[Perfetto traces](https://nexte.st/docs/features/record-replay-rerun/perfetto-chrome-traces/)for deep analysis\. [Record, replay, and rerun](https://nexte.st/docs/features/record-replay-rerun/) - **Designed for CI** --- [Archive](https://nexte.st/docs/ci-features/archiving/)and[partition](https://nexte.st/docs/ci-features/partitioning/)tests across multiple workers, export[JUnit XML](https://nexte.st/docs/machine-readable/junit/), and use[profiles](https://nexte.st/docs/configuration/#profiles)for different environments\. [Configuration profiles](https://nexte.st/docs/configuration/#profiles) - **Setup scripts** --- Run[setup scripts](https://nexte.st/docs/configuration/setup-scripts/)before tests start with per\-test scoping\. Initialize databases, start services, and prepare fixtures\. [Setup scripts](https://nexte.st/docs/configuration/setup-scripts/) - **An ecosystem of tools** --- Collect[test coverage](https://nexte.st/docs/integrations/test-coverage/)\. Do[mutation testing](https://nexte.st/docs/integrations/cargo-mutants/)\. Spin up[debuggers](https://nexte.st/docs/integrations/debuggers-tracers/)\. Observe system behavior with[DTrace and bpftrace probes](https://nexte.st/docs/integrations/usdt/)\. [Integrations](https://nexte.st/docs/integrations/) - **Cross\-platform** --- Runs on Linux, Mac, Windows, and other Unix\-like systems\. Download binaries or build it[from source](https://nexte.st/docs/installation/from-source/)\. [Pre\-built binaries](https://nexte.st/docs/installation/pre-built-binaries/) - **Open source, widely trusted** --- Powers Rust development at every scale, from independent open source projects to the world's largest tech companies\. [License \(Apache 2\.0\)](https://github.com/nextest-rs/nextest/blob/main/LICENSE-APACHE) - **State\-of\-the\-art, made with love** --- Nextest brings[infrastructure\-grade reliability](https://nexte.st/docs/design/why-process-per-test/)to test runners,[with*care*](https://nexte.st/docs/design/architecture/runner-loop/)about getting the details right\. [Sponsor on GitHub](https://github.com/sponsors/sunshowers) ## Quick start[¶](https://nexte.st/#quick-start) Install cargo\-nextest using the[pre\-built binaries](https://nexte.st/docs/installation/pre-built-binaries/), then run: Note Doctests are currently[not supported](https://github.com/nextest-rs/nextest/issues/16)because of limitations in stable Rust\. For now, run doctests in a separate step with`cargo test \-\-doc`\.

Similar Articles

Could Cargo's scheduler be better?

Lobsters Hottest

The article investigates improvements to Cargo's scheduler by analyzing its behavior through benchmarks of Rust build tasks and exploring alternative scheduling algorithms.

Cargo-Geiger

Hacker News Top

cargo-geiger is a Rust cargo plugin that lists statistics about unsafe code usage in a crate and its dependencies, providing input for auditing.

A Vision for Cargo

Lobsters Hottest

A blog post presenting a vision for improving Cargo, covering workflows like dependency management, build performance, adaptability, and maintenance, and inviting community input.