Level Up Your Rust Testing With testcontainers and rstest
Writing software tests is hard. Whether you’re writing unit tests or integration tests or system tests, each presents unique challenges that generally only get harder as you go from unit to integration to system testing. To see how I differentiate these types of tests, see my post here. Writing unit tests in Rust is relatively straightforward, with built in support via #[test] annotations and test configuration support. The cargo new command even generates an initial test module and test for you: ...