nextest-rs/nextest
A next-generation test runner for Rust.
✨ Added
- Nextest now sets the following [environment variables](https://nexte.st/docs/configuration/env-vars) during the list phase, not just the run phase:
- `NEXTEST_VERSION`
- `NEXTEST_REQUIRED_VERSION`
- `NEXTEST_RECOMMENDED_VERSION`
- `NEXTEST_RUN_ID`
- `NEXTEST_BINARY_ID`
- `NEXTEST_WORKSPACE_ROOT`
📋 Changed
- When `--cargo-metadata` is passed without `--binaries-metadata`, and the Cargo metadata contains exactly one default member (for example, metadata generated with `--manifest-path path/to/package/Cargo.toml`), nextest now anchors the build scope to that member's `Cargo.toml` rather than widening it to the entire workspace. ([#3409])
- `--workspace-remap` now requires both `--cargo-metadata` and `--binaries-metadata`. The combination of `--workspace-remap` and `--cargo-metadata` cannot work without `--binaries-metadata`, so nextest now reports this as an error up front. ([#3409])
- [#3409]: https://github.com/nextest-rs/nextest/pull/3409
- [#3410]: https://github.com/nextest-rs/nextest/pull/3410
🐛 Fixed
- Filterset expressions like `not(test(foo))`, `all()and(test(foo))`, and `all()or(test(foo))`, where `not`, `and`, or `or` is immediately followed by an opening parenthesis, now parse correctly. Previously, a separating space was required. ([#3367])
- [#3367]: https://github.com/nextest-rs/nextest/pull/3367
📋 Changed
- CLI `--help` descriptions, configuration-reference docs, and JSON schema descriptions now use consistent language and voice. ([#3366])
🐛 Fixed
- Filterset expressions like `not(test(foo))`, `all()and(test(foo))`, and `all()or(test(foo))`, where `not`, `and`, or `or` is immediately followed by an opening parenthesis, now parse correctly. Previously, a separating space was required. ([#3367])
- [#3366]: https://github.com/nextest-rs/nextest/pull/3366
- [#3367]: https://github.com/nextest-rs/nextest/pull/3367
✨ Added
- Following up from the recently-added schema for repository configuration, nextest now also provides a [JSON Schema](https://nexte.st/docs/user-config/reference#user-configuration-schema) for [user configuration](https://nexte.st/docs/user-config/). The schema for the running version can be obtained by running `cargo nextest self schema user-config`. ([#3351])
📋 Changed
- The `max-progress-running` user-config setting no longer accepts numeric strings like `"8"` (an undocumented fallback). The supported values remain a non-negative integer (e.g. `8`) or `"infinite"`. ([#3350])
- [#3350]: https://github.com/nextest-rs/nextest/pull/3350
- [#3351]: https://github.com/nextest-rs/nextest/pull/3351
Fixed an issue with a from-crates.io build.
✨ Added
- Nextest now provides a [JSON Schema](https://nexte.st/docs/configuration/reference#repository-configuration-schema) for repository configuration at `.config/nextest.toml`, enabling validation and IDE autocompletion via the [Tombi](https://tombi-toml.github.io/tombi) language server.
- Thanks [ya7010](https://github.com/ya7010) for your first contribution, and for maintaining Tombi!
- (Note that the Taplo language server is not supported due to a [crash bug](https://github.com/tamasfe/taplo/pull/779). The schema has been tested to work with Tombi.)
- For target triples that nextest doesn't have built-in information about, nextest now invokes `rustc --print=cfg --target=<triple>` to resolve platform information before falling back to heuristic detection. This is particularly useful for custom builds of the Rust toolchain. ([#3331])
- Thanks [mhatzl](https://github.com/mhatzl) for your first contribution!
📋 Changed
- [User config](https://nexte.st/docs/user-config/) platform overrides are now always evaluated against the build target: the platform nextest was compiled for. Previously, the build target was used in some cases and the host platform in others. ([#3285])
🐛 Fixed
- `cargo nextest store export` and `cargo nextest store export-chrome-trace` now verify the [store format version](https://nexte.st/docs/features/record-replay-rerun/) before exporting, matching the behavior of `cargo nextest replay` and the rerun commands. ([#3287])
- [#3285]: https://github.com/nextest-rs/nextest/pull/3285
- [#3287]: https://github.com/nextest-rs/nextest/pull/3287
- [#3314]: https://github.com/nextest-rs/nextest/pull/3314
- [#3331]: https://github.com/nextest-rs/nextest/pull/3331
✨ Added
- A new `GLOBAL_TEST_GROUP` constant (`"@global"`), representing the implicit global test group that all tests belong to unless assigned to a custom group.
✨ Added
- A new `group()` filterset predicate for CLI filter expressions. This allows filtering tests by their assigned [test group](https://nexte.st/docs/configuration/test-groups/). For example, `group(my-group)` matches tests in the `my-group` group, and `not group(@global)` matches tests in any non-global group.
- A new `KnownGroups` type for validating group names during filterset compilation.
📋 Changed
- `nextest-metadata` updated to 0.14.1.
✨ Added
- Nextest now supports a [`group()` filterset predicate](https://nexte.st/docs/configuration/test-groups/#enumerating-tests-in-a-test-group) for CLI filter expressions, allowing tests to be listed or run by their assigned [test group](https://nexte.st/docs/configuration/test-groups/). ([#3273])
- For example, to run all tests in a specific group:
- ```bash
- cargo nextest run -E 'group(my-group)'
- ```
- To list all tests that aren't in the default global group:
- ```bash
- cargo nextest list -E 'not group(@global)'
- + 2 more
🐛 Fixed
- When `--status-level fail` is set, slow test notifications were previously displayed in a corrupt format (the duration and test name were shown, but the status was omitted). Slow notifications are now correctly hidden. ([#3236])
- On Windows, pressing `t` for test status info no longer shows the output twice; nextest now only reacts to key-press events, ignoring key-release events. ([#3225])
🔒 Security
- Update `rand` to 0.10.1 for [RUSTSEC-2026-0097](https://rustsec.org/advisories/RUSTSEC-2026-0097) / [GHSA-cq8v-f236-94qc](https://github.com/advisories/GHSA-cq8v-f236-94qc). Note that based on the advisory description, this unsoundness does not appear to affect nextest, since none of the covered `rand` versions have the `log` feature turned on.
- Update `rustls-webpki` to 0.103.10.
- [#3225]: https://github.com/nextest-rs/nextest/pull/3225
- [#3236]: https://github.com/nextest-rs/nextest/pull/3236
- [#3273]: https://github.com/nextest-rs/nextest/pull/3273
📋 Changed
- winnow updated to 1.0.0.
Update aws-lc-sys to 0.39.0 to address [GHSA-394x-vwmw-crm3]. [GHSA-394x-vwmw-crm3]: https://github.com/advisories/GHSA-394x-vwmw-crm3
Update aws-lc-sys to 0.39.0 to address [GHSA-394x-vwmw-crm3]. [GHSA-394x-vwmw-crm3]: https://github.com/advisories/GHSA-394x-vwmw-crm3
Update aws-lc-sys to 0.39.0 to address [GHSA-394x-vwmw-crm3]. [GHSA-394x-vwmw-crm3]: https://github.com/advisories/GHSA-394x-vwmw-crm3
✨ Added
- [Setup scripts](https://nexte.st/docs/configuration/setup-scripts/) and [wrapper scripts](https://nexte.st/docs/configuration/wrapper-scripts/) can now specify per-command environment variables via the `env` field in the command configuration. ([#3001])
- For example:
- ```toml
- [scripts.setup.script1]
- command = {
- command-line = "cargo run -p setup-test-db",
- env = {
- DB_PATH = "sqlite:/path/to/source.db",
- + 16 more
🐛 Fixed
- Nextest now works with the new build directory layout ([`-Zbuild-dir-new-layout`](https://blog.rust-lang.org/2026/03/13/call-for-testing-build-dir-layout-v2/)), and with the build directory being separate from the target directory ([`build.build-dir`](https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir)). ([#3168], [#3169])
📋 Changed
- When [retries](https://nexte.st/docs/features/retries/) are enabled, nextest no longer shows `TRY 1 SLOW` messages for the first attempt. `TRY N SLOW` is still shown for subsequent attempts.
📦 Miscellaneous
- Self-update (`cargo nextest self update`) now uses ureq instead of reqwest and replaces the `ring` dependency with `aws-lc-rs`. This may require you to install CMake if you're on a less-commonly-used platform. ([#3141])
📦 Internal improvements
- Breaking change to the [recording format](https://nexte.st/docs/features/record-replay-rerun/): recordings now include test group and slot information, enabling Chrome trace export from recordings. ([#3158])
- [#3001]: https://github.com/nextest-rs/nextest/pull/3001
- [#3141]: https://github.com/nextest-rs/nextest/pull/3141
- [#3148]: https://github.com/nextest-rs/nextest/pull/3148
- [#3158]: https://github.com/nextest-rs/nextest/pull/3158
- [#3163]: https://github.com/nextest-rs/nextest/pull/3163
- [#3168]: https://github.com/nextest-rs/nextest/pull/3168
- [#3169]: https://github.com/nextest-rs/nextest/pull/3169
✨ Added
- A new `build_directory` field on `RustBuildMetaSummary`. When Cargo's `build.build-dir` is configured, the build directory (for intermediate artifacts) differs from the target directory. This is `None` when parsing metadata from older nextest versions, in which case consumers should treat it as equal to `target_directory`.
- A new `build_script_info` field on `RustBuildMetaSummary`, keyed by package ID. This is `None` when parsing metadata from older nextest versions.
- The values of this map are `BuildScriptInfoSummary` structs, which currently contain an `envs` field consisting of environment variables set by `cargo::rustc-env` directives.
📋 Changed
- `base_output_directories`, `build_script_out_dirs`, and `linked_paths` are now documented as relative to the build directory rather than the target directory.
📋 Changed
- `nextest-metadata` updated to 0.14.0.
- MSRV updated to Rust 1.91.
✨ Added
- [Setup scripts](https://nexte.st/docs/configuration/setup-scripts/) and [wrapper scripts](https://nexte.st/docs/configuration/wrapper-scripts/) can now specify per-command environment variables via the `env` field in the command configuration. ([#3001])
- For example:
- ```toml
- [scripts.setup.script1]
- command = {
- command-line = "cargo run -p setup-test-db",
- env = {
- DB_PATH = "sqlite:/path/to/source.db",
- + 16 more
🐛 Fixed
- Nextest now works with the new build directory layout ([`-Zbuild-dir-new-layout`](https://blog.rust-lang.org/2026/03/13/call-for-testing-build-dir-layout-v2/)), and with the build directory being separate from the target directory ([`build.build-dir`](https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir)). ([#3168], [#3169])
📋 Changed
- When [retries](https://nexte.st/docs/features/retries/) are enabled, nextest no longer shows `TRY 1 SLOW` messages for the first attempt. `TRY N SLOW` is still shown for subsequent attempts.
📦 Miscellaneous
- Self-update (`cargo nextest self update`) now uses ureq instead of reqwest and replaces the `ring` dependency with `aws-lc-rs`. This may require you to install CMake if you're on a less-commonly-used platform. ([#3141])
📦 Internal improvements
- Breaking change to the [recording format](https://nexte.st/docs/features/record-replay-rerun/): recordings now include test group and slot information, enabling Chrome trace export from recordings. ([#3158])
- [#3001]: https://github.com/nextest-rs/nextest/pull/3001
- [#3141]: https://github.com/nextest-rs/nextest/pull/3141
- [#3148]: https://github.com/nextest-rs/nextest/pull/3148
- [#3158]: https://github.com/nextest-rs/nextest/pull/3158
- [#3163]: https://github.com/nextest-rs/nextest/pull/3163
- [#3168]: https://github.com/nextest-rs/nextest/pull/3168
- [#3169]: https://github.com/nextest-rs/nextest/pull/3169
✨ Added
- [Setup scripts](https://nexte.st/docs/configuration/setup-scripts/) and [wrapper scripts](https://nexte.st/docs/configuration/wrapper-scripts/) can now specify per-command environment variables via the `env` field in the command configuration. ([#3001])
- For example:
- ```toml
- [scripts.setup.script1]
- command = {
- command-line = "cargo run -p setup-test-db",
- env = {
- DB_PATH = "sqlite:/path/to/source.db",
- + 15 more
🐛 Fixed
- Nextest now works with the new build directory layout ([`-Zbuild-dir-new-layout`](https://blog.rust-lang.org/2026/03/13/call-for-testing-build-dir-layout-v2/)), and with the build directory being separate from the target directory ([`build.build-dir`](https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir)). ([#3168], [#3169])
📦 Miscellaneous
- Self-update (`cargo nextest self update`) now uses ureq instead of reqwest and replaces the `ring` dependency with `aws-lc-rs`. This may require you to install CMake if you're on a less-commonly-used platform. ([#3141])
📦 Internal improvements
- Breaking change to the [recording format](https://nexte.st/docs/features/record-replay-rerun/): recordings now include test group and slot information, enabling Chrome trace export from recordings. ([#3158])
- [#3001]: https://github.com/nextest-rs/nextest/pull/3001
- [#3141]: https://github.com/nextest-rs/nextest/pull/3141
- [#3148]: https://github.com/nextest-rs/nextest/pull/3148
- [#3158]: https://github.com/nextest-rs/nextest/pull/3158
- [#3163]: https://github.com/nextest-rs/nextest/pull/3163
- [#3168]: https://github.com/nextest-rs/nextest/pull/3168
- [#3169]: https://github.com/nextest-rs/nextest/pull/3169
✨ Added
- [Setup scripts](https://nexte.st/docs/configuration/setup-scripts/) and [wrapper scripts](https://nexte.st/docs/configuration/wrapper-scripts/) can now specify per-command environment variables via the `env` field in the command configuration. ([#3001])
- For example:
- ```toml
- [scripts.setup.script1]
- command = {
- command-line = "cargo run -p setup-test-db",
- env = {
- DB_PATH = "sqlite:/path/to/source.db",
- + 15 more
🐛 Fixed
- Nextest now works with the new build directory layout ([`-Zbuild-dir-new-layout`](https://blog.rust-lang.org/2026/03/13/call-for-testing-build-dir-layout-v2/)), and with the build directory being separate from the target directory ([`build.build-dir`](https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir)). ([#3168], [#3169])
📦 Miscellaneous
- Self-update (`cargo nextest self update`) now uses ureq instead of reqwest and replaces the `ring` dependency with `aws-lc-rs`. This may require you to install CMake if you're on a less-commonly-used platform. ([#3141])
📦 Internal improvements
- Breaking change to the [recording format](https://nexte.st/docs/features/record-replay-rerun/): recordings now include test group and slot information, enabling Chrome trace export from recordings. ([#3158])
- [#3001]: https://github.com/nextest-rs/nextest/pull/3001
- [#3141]: https://github.com/nextest-rs/nextest/pull/3141
- [#3148]: https://github.com/nextest-rs/nextest/pull/3148
- [#3158]: https://github.com/nextest-rs/nextest/pull/3158
- [#3163]: https://github.com/nextest-rs/nextest/pull/3163
- [#3168]: https://github.com/nextest-rs/nextest/pull/3168
- [#3169]: https://github.com/nextest-rs/nextest/pull/3169
