cargo-nextest¶
Welcome to the home page for cargo-nextest, a next-generation test runner for Rust projects.
Features¶
- Clean, beautiful user interface. Nextest presents its results concisely so you can see which tests passed and failed at a glance.
- Up to 3× as fast as cargo test. Nextest uses a state-of-the-art execution model for faster, more reliable test runs.
- Identify slow and leaky tests. Use nextest to detect misbehaving tests, identify bottlenecks during test execution, and optionally terminate tests if they take too long.
- Filter tests using an embedded language. Use powerful filtersets to specify granular subsets of tests on the command-line, and to enable per-test overrides.
- Configure per-test settings. Automatically retry subsets of tests, mark them as heavy, or run them serially.
- Designed for CI. Nextest addresses real-world pain points in continuous integration scenarios:
- Use pre-built binaries for quick installation.
- Set up CI-specific configuration profiles.
- Reuse builds and partition test runs across multiple CI jobs. (Check out this example on GitHub Actions).
- Automatically retry failing tests, and mark them as flaky if they pass later.
- Print failing output at the end of test runs.
- Output information about test runs as JUnit XML, and in other formats.
- Cross-platform. Nextest works on Linux and other Unixes, macOS, and Windows, so you get its benefits no matter what platform you use.
Quick start¶
Install cargo-nextest for your platform using the pre-built binaries.
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.
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.