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: ...

December 7, 2025 · 12 min · Ray Suliteanu

There's No Such Thing as 'Regression Testing'

How would you define “regression testing”? According to Wikipedia, Regression testing (rarely non-regression testing[1]) is re-running functional and non-functional tests to ensure that previously developed and tested software still performs after a change. In the modern age of test automation and continuous integration, tests are run (or should be) automatically by the build system. Whether testing functional or non-functional features, there really are only three categories of tests to run: Unit tests Integration tests System tests Let’s discuss each in turn. ...

June 10, 2023 · 5 min · Ray Suliteanu

Separating integration tests from unit tests

Update 2024-12-15 This blog is obviously very OO-centric, focusing on the notion of a class as the smallest “unit”. Obviously, in non-OO languages, what a “unit” is will vary e.g. it could be a compilation unit. But the idea still holds, that you are trying to test individual units of behavior without pulling in dependencies that may result in longer startup time, failures in the dependencies (which may be out of your control), or code that doesn’t exist yet (for TDD). ...

December 30, 2020 · 4 min · Ray Suliteanu