NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2909 most downloaded on crates.io
A next-generation test runner for Rust.
Last release 16 days ago
21 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
5 years old
170 releases · first in 2022
One column per quarter.
Nothing published for this version
You can now mark certain _groups_ of tests to be run with a limited amount of concurrency within the group. This can be used to run tests within a gro
You can now mark certain groups of tests to be run with a limited amount of concurrency within the group. This can be used to run tests within a group serially, similar to the serial_test crate.
For more about test groups, see Test groups and mutual exclusion.
A new show-config test-groups command shows test groups currently in effect. (show-config will be broadened to show other kinds of configuration in future releases.)
Nextest now warns you if you've defined a profile in the default- namespace that isn't already known. Any profile names starting with default- are reserved for future use.
Thanks Marcelo Nicolas Gomez Rivera for your first contribution!
On Unix platforms, nextest now uses a new double-spawn test execution mode. This mode resolves some race conditions around signal handling without an apparent performance cost.
This mode is not expected to cause any issues. However, if it does, you can turn it off by setting NEXTEST_DOUBLE_SPAWN=0 in your environment. (Please report an issue if it does!)
MSRV updated to Rust 1.64.
cargo nextest run -E 'deps(foo) queries now work again. Thanks Simon Paitrault for your first contribution!
cargo nextest run -E 'deps(foo) queries now work again. Thanks Simon Paitrault for your first contribution!Support for listing and running tests in examples with the --examples and --example command-line arguments. Thanks Jed Brown for your first contributi
--examples and --example <EXAMPLE> command-line arguments. Thanks Jed Brown for your first contribution!Nothing published for this version
On Unix platforms, a new experimental "double-spawn" approach to running test binaries has been added. With the double-spawn approach, when listing or
On Unix platforms, a new experimental "double-spawn" approach to running test binaries has been added. With the double-spawn approach, when listing or running tests, nextest will no longer spawn test processes directly. Instead, nextest will first spawn a copy of itself, which will do some initial setup work and then exec the test process.
The double-spawn approach is currently disabled by default. It can be enabled by setting NEXTEST_EXPERIMENTAL_DOUBLE_SPAWN=1 in your environment.
The double-spawn approach will soon be enabled the default.
Nextest now has initial support for handling SIGTSTP (Ctrl-Z) and SIGCONT (fg). On SIGTSTP (e.g. when Ctrl-Z is pressed), all running tests and timers are paused, and nextest is suspended. On SIGCONT (e.g. when fg is run), tests and timers are resumed.
Note that, by default, pressing Ctrl-Z in the middle of a test run can lead to nextest runs hanging sometimes. These nondeterministic hangs will not happen if both of the following are true:
Nextest is built with Rust 1.66 (currently in beta) or above. Rust 1.66 contains a required fix to upstream Rust.
Note that the pre-built binaries for this version are built with beta Rust to pick this fix up.
The double-spawn approach is enabled (see above) with NEXTEST_EXPERIMENTAL_DOUBLE_SPAWN=1.
Call for testing: Please try out the double-spawn approach by setting NEXTEST_EXPERIMENTAL_DOUBLE_SPAWN=1 in your environment. It has been extensively tested and should not cause any breakages, but if it does, please report an issue. Thank you!
Nextest is now built with Rust 1.65. This version of Rust is the first one to spawn processes using `posix_spawn` rather than fork/exec on macOS, whic
Nextest is now built with Rust 1.65. This version of Rust is the first one to spawn processes using posix_spawn rather than fork/exec on macOS, which should lead to performance benefits in some cases.
For example, on an M1 Mac Mini, with the clap repository at 520145e, and the command cargo nextest run -E 'not (test(ui_tests) + test(example_tests))':
This is a best-case scenario; tests that take longer to run will generally benefit less.
threads-required configuration now supports the
values "num-cpus", for the total number of logical CPUs available, and "num-test-threads", for the
number of test threads nextest is running with.retries = 0 now works correctly. Thanks xxchan for your first contribution!Nothing published for this version
Added a new `threads-required` configuration that can be specified as a per-test override. This can be used to limit concurrency for heavier tests, to
threads-required configuration that can be specified as a per-test override. This can be used to limit concurrency for heavier tests, to avoid overwhelming CPU or running out of memory.Overrides can now be restricted to certain platforms, using triples or cfg() expressions. For example, to add retries, but only on macOS:
Overrides can now be restricted to certain platforms, using triples or cfg() expressions. For example, to add retries, but only on macOS:
[[profile.default.overrides]]
platform = 'cfg(target_os = "macos")'
retries = 3
For an override to match, platform and filter (if specified) must both be true for a given test. While cross-compiling code, platform is matched against the host platform for host tests, and against the target platform for target tests.
Nextest now reads environment variables specified in the [env] section from .cargo/config.toml files. The full syntax is supported including force and relative.
Thanks to Waleed Khan for your first contribution!
Nextest now sets the CARGO_PKG_RUST_VERSION environment variable when it runs tests. For cargo test this was added in Rust 1.64, but nextest sets it across all versions of Rust.
On Unix platforms, if a process times out, nextest attempts to terminate it gracefully by sending it SIGTERM, waiting for a grace period of 10 seconds
On Unix platforms, if a process times out, nextest attempts to terminate it gracefully by sending it SIGTERM, waiting for a grace period of 10 seconds, and then sending it SIGKILL. A custom grace period can now be specified through the slow-timeout.grace-period parameter. For more information, see How nextest terminates tests.
Thanks to Ben Kimock for your first contribution!
Test retries now support fixed delays and exponential backoffs, with optional jitter. See Delays and backoff for more information. Thanks Tomas Olveck
Note to distributors: now that Rust 1.64 is out,
process_group_bootstrap_hackis no longer supported or required. Please remove the following environment variables if you've set them:
RUSTC_BOOTSTRAP=1RUSTFLAGS='--cfg process_group --cfg process_group_bootstrap_hack'
Support for a negative value for --test-threads/-j, matching support in recent versions of Cargo. A value of -1 means the number of logical CPUs minus
--test-threads/-j, matching support in recent versions of
Cargo. A value of -1 means the number of logical CPUs minus 1, and so on. Thanks Onigbinde
Oluwamuyiwa Elijah for your first contribution!--test-threads indicating that its default value is obtained
from the profile. Thanks jiangying for your first contribution!A new --hide-progress-bar option (environment variable NEXTEST_HIDE_PROGRESS_BAR) forces the progress bar to be hidden. Thanks Remo Senekowitsch for y
--hide-progress-bar option (environment variable NEXTEST_HIDE_PROGRESS_BAR) forces the
progress bar to be hidden. Thanks Remo Senekowitsch for your first
contribution!final-status-level config is set to flaky).Support for the --config argument, stabilized in Rust 1.63. This option is used to configure Cargo, not nextest. This argument is passed through to Ca
Support for the --config argument, stabilized in Rust 1.63. This option is used to configure
Cargo, not nextest. This argument is passed through to Cargo, and is also used by nextest to
determine e.g. the target runner for a platform.
--config is also how Miri communicates with nextest.
Target runners for cross-compilation now work with build archives. Thanks Pascal Kuthe for your first contribution!
For cargo nextest self update, added -f as a short-form alias for --force.
cargo nextest self update, added -f as a short-form alias for --force.Fixed regression in cargo-nextest 0.9.32 where it no longer produced any output if stderr wasn't a terminal.
cargo nextest run now has a new --no-run feature to build but not run tests. (This was previously achievable with cargo nextest list -E 'none()', but
cargo nextest run now has a new --no-run feature to build but not run tests. (This was previously achievable with cargo nextest list -E 'none()', but is more intuitive this way.)Nextest sets a new NEXTEST_RUN_ID environment variable with a UUID for a test run. All tests run within a single invocation of cargo nextest run will
NEXTEST_RUN_ID environment variable with a UUID for a test run. All tests run
within a single invocation of cargo nextest run will set the same run ID. Thanks mitsuhiko for
your first contribution!Fixed target runners specified as relative paths.
Fixed target runners specified as relative paths.
On Unix, cargo-nextest's performance had regressed (by 3x on clap) due to the change introduced in version 0.9.29 to put each test process into its own process group. In this version, this regression has been fixed, but only if you're using the pre-built binaries or building on Rust 1.64+ (currently in nightly).
Note to distributors: to fix this regression while building with stable Rust 1.62, set the following environment variables:
RUSTC_BOOTSTRAP=1RUSTFLAGS='--cfg process_group --cfg process_group_bootstrap_hack'This is temporary until the
process_set_process_groupfeature is stabilized in Rust 1.64.
On Unix, each test process is now put into its own [process group]. If a test times out or Ctrl-C is pressed, the entire process group is signaled. Th
On Unix, each test process is now put into its own process group. If a test times out or Ctrl-C is pressed, the entire process group is signaled. This means that most subprocesses spawned by tests are also killed.
However, because process groups aren't nested, if a test creates a process group itself, those groups won't be signaled. This is a relatively uncommon situation.
On Windows, each test process is now associated with a job object. On timeouts, the entire job object is terminated. Since job objects are nested in recent versions of Windows, this should result in all subprocesses spawned by tests being killed.
(On Windows, the Ctrl-C behavior hasn't changed. Nextest also doesn't do graceful shutdowns on Windows yet, though this may change in the future.)
Nextest can now parse Cargo configs specified via the unstable --config option.
Nextest now publishes binaries for aarch64-unknown-linux-gnu (#398) and x86_64-unknown-linux-musl (#399). Thanks messense and Teymour for your first contributions!
This is a quick hotfix release to ensure that the right tokio features are enabled under default-no-update.
This is a quick hotfix release to ensure that the right tokio features are enabled under
default-no-update.
This is a major architectural rework of nextest. We've tested it thoroughly to the best of our ability, but if you see regressions please report them!
This is a major architectural rework of nextest. We've tested it thoroughly to the best of our ability, but if you see regressions please report them!
If you encounter a regression, you can temporarily pin nextest to the previous version in CI. If you're on GitHub Actions and are using taiki-e/install-action, use this instead:
- uses: taiki-e/install-action@v1
- with:
tool: nextest
version: 0.9.26
cargo miri nextest run to run your tests with Miri.slow-timeout and the new leak-timeout config parameter.--tool-config-file allows tools that wrap nextest to specify custom config settings, while still prioritizing repository-specific configuration./dev/null (or NUL on Windows). Most tests do not read from standard input, but if a test does, it will no longer cause nextest to hang.LD_LIBRARY_PATH or equivalent. This should have no practical effect."target".This is a quick hotfix release to update the version of nextest-metadata, to which a breaking change was accidentally committed.
This is a quick hotfix release to update the version of nextest-metadata, to which a breaking change was accidentally committed.
The --platform-filter option is deprecated, though it will keep working for all versions within the nextest 0.9 series. Use -E 'platform(host)' or -E…
This is a major release with several new features.
Filter expressions are now ready for production. For example, to run all tests in nextest-runner and all its transitive dependencies within the workspace:
cargo nextest run -E 'deps(nextest-runner)'
This release includes a number of additions and changes to filter expressions.
kind(name-matcher): include all tests in binary kinds (e.g. lib, test, bench) matching name-matcher.binary(name-matcher): include all tests in binary names matching name-matcher.platform(host) or platform(target): include all tests that are built for the host or target platform, respectively.If a filter expression is guaranteed not to match a particular binary, it will not be listed by nextest. (This allows platform(host) and platform(target) to work correctly.)
If both filter expressions and standard substring filters are passed in, a test must match filter expressions AND substring filters to be executed. For example:
cargo nextest run -E 'package(nextest-runner)' test_foo test_bar
This will execute only the tests in nextest-runner that match test_foo or test_bar.
Nextest now supports per-test overrides. These overrides let you customize settings for subsets of tests. For example, to retry tests that contain the substring test_e2e 3 times:
[[profile.default.overrides]]
filter = "test(test_e2e)"
retries = 3
Currently, only retries are supported. In the future, more kinds of customization will be added.
NEXTEST_RETRIES controls the number of retries tests are run with. In terms of precedence, this slots in between the command-line --retries option and per-test overrides for retries.cargo nextest list now hides skipped tests and binaries by default. To print out skipped tests and binaries, use cargo nextest list --verbose.cargo nextest list now contains a new "status" key. By default, this is set to "listed", and for binaries that aren't run because they don't match expression filters this is set to "skipped".--platform-filter option is deprecated, though it will keep working for all versions within the nextest 0.9 series. Use -E 'platform(host)' or -E 'platform(target)' instead.cargo nextest run -- --skip and --exact now suggest using a filter expression instead.New config option profile. .test-threads controls the number of tests run simultaneously. This option accepts either an integer with the number of thr
profile.<profile-name>.test-threads controls the number of tests run simultaneously. This option accepts either an integer with the number of threads, or the string "num-cpus" (default) for the number of logical CPUs. As usual, this option is overridden by --test-threads and NEXTEST_TEST_THREADS, in that order.--test-threads option and the NEXTEST_TEST_THREADS environment variable now accept num-cpus as their argument.<failure> and <error> tags) now have invalid ANSI escape codes stripped from their output.On Windows, nextest now detects tests that abort due to e.g. an access violation (segfault) and prints their status as "ABORT" rather than "FAIL", alo
<failure> element (#311).WRITE_OUTPUT_ERROR.Benchmarks are now treated as normal tests. ([#283], thanks @tabokie for your contribution!).
Benchmarks are now treated as normal tests. (#283, thanks @tabokie for your contribution!).
Note that criterion.rs benchmarks are currently incompatible with nextest (#96) -- this change doesn't have any effect on that.
Added -F as a shortcut for --features, mirroring an upcoming addition to Cargo 1.62 (#287, thanks Alexendoo for your first contribution!)
On Unix, tests that fail due to a signal (e.g. SIGSEGV) will print out the name of the signal rather than the generic "FAIL".
cargo-nextest has a new "default-no-update" feature that will contain all default features except for self-update. If you're distributing nextest or installing it in CI, the recommended, forward-compatible way to build cargo-nextest is with --no-default-features --features default-no-update.Account for skipped tests when determining the length of the progress bar.
Nextest can now update itself! Once this version is installed, simply run cargo nextest self update to update to the latest version.
Nextest can now update itself! Once this version is installed, simply run cargo nextest self update to update to the latest version.
Note to distributors: you can disable self-update by building cargo-nextest with
--no-default-features.
Partial, emulated support for test binary arguments passed in after cargo nextest run -- (#265, thanks @tabokie for your contribution!).
For example, cargo nextest run -- my_test --ignored will run ignored tests containing my_test, similar to cargo test -- my_test --ignored.
Support is limited to test names, --ignored and --include-ignored.
Note to integrators: to reliably disable all argument parsing, pass in
--twice. For example,cargo nextest run -- -- <filters...>.
CARGO_BUILD_TARGET environment variable, and Cargo configuration as well. The --target option is still preferred.This is a test release.
Support for terminating tests if they take too long, via the configuration parameter slow-timeout.terminate-after. For example, to time out after 120
Support for terminating tests if they take too long, via the configuration parameter slow-timeout.terminate-after. For example, to time out after 120 seconds:
slow-timeout = { period = "60s", terminate-after = 2 }
This release contains a number of user experience improvements.
This release contains a number of user experience improvements.
final-status-level option which can be used to print out some statuses at the end of a run (defaults to none). On the command line, this can be overridden with the --final-status-level argument or NEXTEST_FINAL_STATUS_LEVEL in the environment.TEST_LIST_CREATION_FAILED).Nextest now sets `NEXTEST_LD_*` and `NEXTEST_DYLD_*` environment variables to work around macOS System Integrity Protection sanitization.
NEXTEST_LD_* and NEXTEST_DYLD_* environment
variables to work around
macOS System Integrity Protection sanitization.LD_LIBRARY_PATH and other similar variables do not recurse into subdirectories either.Improved support for reusing builds:
cargo nextest archive automatically archives test binaries and other relevant
files after building tests. Currently the .tar.zst format is supported.cargo nextest run --archive-file automatically extracts archives before running the tests within them.NEXTEST_BIN_EXE_<name> is set to the absolute path to a binary target's executable, taking path remapping into account. This is equivalent to CARGO_BIN_EXE_<name>, except this is set at runtime.cargo nextest list --list-type binaries-only now records information about non-test binaries as well.Fix for experimental feature filter expressions:
Fixes related to path remapping:
Fixes related to path remapping:
--workspace-remap and --target-dir-remap are now canonicalized.CARGO_MANIFEST_DIR in tests' runtime environment is set to the new directory.Support for reusing builds is now production-ready. Build on one machine and run tests on another, including cross-compiling and test partitioning.
Support for reusing builds is now production-ready. Build on one machine and run tests on another, including cross-compiling and test partitioning.
To see how builds can be reused in GitHub Actions, see this example.
Experimental support for filter expressions, allowing fine-grained specifications for which tests to run.
Thanks to Guiguiprim for their fantastic work implementing both of these.
Support for reading some configuration as environment variables. (Thanks [ymgyt] and [iskyzh] for their pull requests!)
cargo nextest list now contains a rust-build-meta key. This key currently contains the target directory, the base output directories, and paths to search for dynamic libraries in relative to the target directory.--binaries-dir-remap to --target-dir-remap and expect that the entire target directory is archived.Update regex to 1.5.5 to address GHSA-m5pq-gvj9-9vr8 (CVE-2022-24713).
regex to 1.5.5 to address GHSA-m5pq-gvj9-9vr8
(CVE-2022-24713).Thanks to Guiguiprim for their contributions to this release!
Thanks to Guiguiprim for their contributions to this release!
--platform-filter option filters tests by the platform they run on (target or host).cargo nextest list has a new --list-type option, with values full (the default, same as today) and binaries-only (list out binaries without querying them for the tests they contain).NEXTEST_PROCESS_MODE=process-per-test.Support abbreviating --release as -r ([Cargo #10133]).
--release as -r (Cargo #10133).Target runners of the form runner = ["bin-name", "--arg1", ...] are now parsed correctly ([#75]).
If parsing target runner configuration fails, warn and proceed without a target runner rather than erroring out.
Support Cargo configuration for target runners.
Updated nextest-runner to 0.1.2, fixing cyan coloring of module paths ([#52]).
The big new change is that release binaries are now available! Head over to Pre-built binaries for more.
The big new change is that release binaries are now available! Head over to Pre-built binaries for more.
Add a BufWriter around stderr for the reporter, reducing the number of syscalls and fixing issues around output overlap on Windows (#35). Thanks @fdnc
Running cargo nextest from within a crate now runs tests for just that crate, similar to cargo test. Thanks Yaron Wittenstein for reporting this!
Updated nextest-runner to 0.1.1, fixing builds on Rust 1.54.
Initial release. Happy Valentine's day!
Initial release. Happy Valentine's day!
Supported in this initial release:
Your coding agent can read these notes before it upgrades. Set up the MCP server →