· python
Faster CI with Orchestrated Pytest Workers
Here at Close, our primary backend service has automated tests.
Quite a lot of them, nearly 58,000. While some things are easy to test in pure Python, the tests that actually give us the most confidence generally are API or service-level integration tests that avoid mocking and typically do actually hit datastores.
How long do all 58,000 integration tests take to run in CI? Yes, 58,000 integration tests, most of which do IO across multiple datastores, in under 3 minutes.
Let's go on a journey together... Close rolled out in 2013, but our test suite is actually even older!
Tests in CI were introduced in 2012, with a Jenkins build script and the nose testing library. We've since migrated to CircleCI then GitHub Actions, swapping to pytest along the way. But a lot of the same concepts are still relevant today.




