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

nateb20221 pts0 comments

Home - cargo-nextest

Skip to content

Initializing search

nextest-rs/nextest

A next-generation test runner for Rust

Up to 3&times; faster than cargo test, with a modern<br>interface, per-test isolation, and first-class CI support.

Get started

Learn more

About

Platform-specific notes

Benchmarks

Stability policy

Contributing

Changelog

Usage

More features

Filterset DSL

Glossary

Configuration

User config

Integrations

Test coverage

Miri interpreter

Debuggers and tracers

Criterion benchmarks

cargo-mutants

USDT probes

Machine-readable output

Design

Clean, beautiful user interface

See which tests passed and failed at a glance.

Running tests

Up to 3x as fast as cargo test<br>Nextest uses a modern execution model for faster, more reliable test runs.

Benchmarks

Powerful test selection<br>Use a sophisticated expression language to select exactly the tests you need. Filter by name, binary, platform, or any combination.

Filtersets

Identify misbehaving tests<br>Treat tests as cattle, not pets. Detect and terminate slow tests. Loop over tests many times with stress testing.

Slow tests and timeouts

Customize settings by test<br>Automatically retry some tests, mark them as heavy, run them serially, and much more.

Per-test settings

Record, replay and rerun<br>Record every test run. Replay CI runs locally. Rerun failing tests. Export Perfetto traces for deep analysis.

Record, replay, and rerun

Designed for CI<br>Archive and partition tests across multiple workers, export JUnit XML, and use profiles for different environments.

Configuration profiles

Setup scripts<br>Run setup scripts before tests start with per-test scoping. Initialize databases, start services, and prepare fixtures.

Setup scripts

An ecosystem of tools<br>Collect test coverage. Do mutation testing. Spin up debuggers. Observe system behavior with DTrace and bpftrace probes.

Integrations

Cross-platform<br>Runs on Linux, Mac, Windows, and other Unix-like systems. Download binaries or build it from source.

Pre-built binaries

Open source, widely trusted<br>Powers Rust development at every scale, from independent open source projects to the world's largest tech companies.

License (Apache 2.0)

State-of-the-art, made with love<br>Nextest brings infrastructure-grade reliability to test runners, with care about getting the details right.

Sponsor on GitHub

Quick start&para;

Install cargo-nextest using the pre-built binaries, then run:

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.

Copyright 2021-2026 The Nextest Contributors.

Licensed under<br>CC BY 4.0.

Made with

Material for MkDocs.

test tests cargo nextest faster rust

Related Articles