Usage
This section covers usage, features and options for cargo-nextest.
Basic usage
To build and run all tests in a workspace, cd into the workspace and run:
cargo nextest run
For more information about running tests, see Running tests.
Limitations
The nextest execution model means that each individual test is executed as a separate process. Tests that depend on being executed within the same process may not work correctly.
To work around this, consider combining those tests into one so that nextest runs them as a unit, or excluding those tests from nextest.
- There’s no way to mark a particular test binary as excluded from nextest.
- The
--skip
and--exact
test filter options are currently not supported by nextest. - Doctests are currently not supported because of limitations in stable Rust. Locally and in CI, after
cargo nextest run
, usecargo test --doc
to run all doctests.