cargo-test

Execute the unit and integration tests of a Rust package.

TLDR

Only run tests containing a specific string in their names

$ cargo test [testname]
copy

Set the number of simultaneous running test cases

$ cargo test -- --test-threads=[count]
copy

Require that Cargo.lock is up to date

$ cargo test --locked
copy

Test artifacts in release mode, with optimizations

$ cargo test --release
copy

Test all packages in the workspace

$ cargo test --workspace
copy

Run tests for a package

$ cargo test --package [package]
copy

Copied to clipboard
free 100$ digital ocean credit