Build and run tests for the local package.

Section: Tests and benches

Run the test suite

bash
bash
cargo test
Explanation

The default workflow for unit tests, integration tests, and doctests.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Tests and benches
Run a matching subset of tests
Filter tests by substring.
OpenIn sheetbashsame section
Show println output in tests
Pass test harness flags after `--`.
OpenIn sheetbashsame section
Run tests serially
Force one test thread.
OpenIn sheetbashsame section
Run benchmarks
Execute benchmark targets if configured.
OpenIn sheetbashsame section
Build tests without running them
Compile test artifacts only.
OpenIn sheetbash2 tag match
Type-check without producing binaries
Validate code quickly without final artifacts.
OpenIn sheetbash1 tag match