Skip to content

Glossary: Rust Beyond the Basics

cargo test

Also written: cargo test name

Builds and runs all tests (unit, integration and doc tests). Adding part of a name, as in `cargo test discount`, runs only matching tests.

Where the book teaches it

Related terms

unit testintegration testdoc test