Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Plain run:

Use -- to separate arguments for the cargo test subcommand and the test application:

By default multiple tests are run in parallel in threads. To disable parallelism, set the number of threads to one:

Print stdout also for passed tests:

Run a subset of tests by name:

Only function whose name matches .*my_text.* will be run.

Ignore some tests by default:

#[cfg(test)]
mod tests {

    #[test]
    #[ignore]
    fn my_test() {
        // code that takes an hour to run
    }
}

To run ignored tests: