cargo test
Execute the unit and integration tests of a Rust package.
- Only run tests containing a specific string in their names:
cargo test {testname}
- Set the number of simultaneous running test cases:
cargo test -- --test-threads={count}
- Require that `Cargo.lock` is up to date:
cargo test --locked
- Test artifacts in release mode, with optimizations:
cargo test --release
- Test all packages in the workspace:
cargo test --workspace
cargo test --package {package}
- Run tests without hiding output from test executions:
cargo test -- --nocapture
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).