cargo-nextest
Next-generation test runner for Rust, replacing cargo test. cargo-nextest runs tests in separate processes (preventing test pollution), provides rich terminal output with progress indicators, 2-3x faster test execution through parallel process-based running, retry failed tests, partition tests across CI machines, and output JUnit XML for CI test reporting. Now the standard Rust test runner for serious projects.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local test runner — no network calls. Process isolation improves security of test execution by preventing test cross-contamination.
⚡ Reliability
Best When
You have a growing Rust agent test suite and want faster CI execution, better test isolation, and richer output — cargo-nextest is the modern standard for Rust testing.
Avoid When
Your test suite is small (<100 tests) or you rely on doctests — cargo test is sufficient for small suites, and nextest doesn't run doctests.
Use Cases
- • Run Rust agent test suites 2-3x faster than cargo test through parallel process-based execution with better I/O handling
- • Isolate agent test failures — nextest runs each test in its own process, preventing one test's global state from affecting others
- • Retry flaky agent tests with --retries flag — identify and automatically retry intermittently failing tests in CI
- • Partition agent CI test runs across multiple machines with --partition for faster CI pipelines on large test suites
- • Get rich CI reporting with JUnit XML output — integrate Rust agent test results with GitHub Actions, CircleCI, or any JUnit-aware CI
Not For
- • Doctests — cargo-nextest does not run Rust doctests (cargo test --doc); run doctests separately with cargo test --doc
- • Projects where cargo test is fast enough — for small test suites, the overhead of nextest's process-per-test model may exceed benefits
- • Teams without cargo installed — nextest is a cargo plugin; requires a Rust toolchain
Interface
Authentication
Local CLI tool — no external auth or network calls.
Pricing
Apache 2.0 / MIT dual-licensed open source. Install with cargo install cargo-nextest or download binary.
Agent Metadata
Known Gotchas
- ⚠ cargo-nextest does NOT run doctests — must run 'cargo test --doc' separately to test documentation examples; CI pipelines must include both nextest and doc tests
- ⚠ Tests that rely on process-level global state (lazy statics, thread-locals) may behave differently since each test gets a fresh process — this is usually a feature, not a bug
- ⚠ nextest's process-per-test model means test startup cost is higher for very fast tests — for suites of microsecond-level benchmarks, cargo test may be faster
- ⚠ Test filtering uses different syntax than cargo test — 'cargo nextest run test_name' vs 'cargo test test_name'; integration into CI scripts needs updating
- ⚠ archive/partition features require nextest.toml configuration — partition only works correctly when test count matches the actual partition count used across CI machines
- ⚠ --test-threads (default: number of CPUs) may overwhelm systems with high parallelism for I/O-bound agent integration tests; set lower with --test-threads 4 for database-heavy tests
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for cargo-nextest.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-07.