1. 1. Why and how to test software?
  2. 2. Testing pieces of code
    1. 2.1. Which functionality to write unit tests for
    2. 2.2. Using Rust's built-in unit tests
    3. 2.3. Writing unit-testable code
    4. 2.4. Mocking external dependencies with traits
    5. 2.5. Property testing
  3. 3. Testing whole systems
    1. 3.1. Cargo's integration tests
    2. 3.2. Documentation tests
    3. 3.3. Fuzz testing
    4. 3.4. Measuring test coverage
  4. 4. Benchmarking
    1. 4.1. Profiling
    2. 4.2. Using Rust nightly's bechmarking framework
    3. 4.3. Using the criterion framework

Testing Rust and building confidence in your code

Why and how to test software?

Testing pieces of code

Which functionality to write unit tests for

Using Rust's built-in unit tests

cf. https://doc.rust-lang.org/book/second-edition/ch11-03-test-organization.html#unit-tests

Writing unit-testable code

Mocking external dependencies with traits

Property testing

cf. https://docs.rs/proptest

Testing whole systems

Cargo's integration tests

cf. https://doc.rust-lang.org/book/second-edition/ch11-03-test-organization.html#integration-tests

Documentation tests

cf. https://doc.rust-lang.org/1.30.0/rustdoc/documentation-tests.html

Fuzz testing

cf. https://fuzz.rs/book/introduction.html

Measuring test coverage

Benchmarking

Profiling

Using Rust nightly's bechmarking framework

Using the criterion framework

cf. https://japaric.github.io/criterion.rs/book/index.html