Introduction
Running tests in containers helps you check if your code works correctly in a clean, isolated environment. It avoids problems caused by differences in computers or setups.
When you want to test your application in the same environment it will run in production.
When you need to run tests without installing dependencies on your local machine.
When you want to share the exact test environment with your team to avoid 'it works on my machine' issues.
When you want to automate tests in a continuous integration system using containers.
When you want to quickly try out changes without affecting your main system.