3 ms·
I just got around to skimming the release notes, and I'm curious about running tests in parallel. I'm looking forward to upgrading, and seeing if this has a mea
by japhyr 11y ago
I just got around to skimming the release notes, and I'm curious about running tests in parallel. I'm looking forward to upgrading, and seeing if this has a meaningful impact on my tests. I don't have a large number of tests yet; my project runs its full test suite in ~10 seconds at the moment. But I'm well aware this should grow significantly as my project matures.
Does anyone have any sense yet of how this affects the speed of the test suite in your real-world projects?
https://docs.djangoproject.com/en/1.9/releases/1.9/#running-tests-in-parallel https://docs.djangoproject.com/en/1.9/releases/1.9/#running-...
- cscharenberg 11y agoMassive speedups once you get to thousands of tests. We 12 minute runs for the 3 apps that are part of a release. When we went parallel it reduced it by 1/6 (6 test processes). Of course, we also had some slow tests we rewrote and had to fix some tests that did not play nice concurrently. But it was well worth it. I don't think you'll see a big benefit for a current 10-second run because of fixed cost of startup is some of that. But running tests in parallel may reveal some bad testing practices: leaving data behind or improper mocking that cause tests to fail in parallel. Fixing all that once you get to a massive set of tests is really painful and slow becuase you have to fix them ALL before switching your testing config. So that might be a benefit to turning it on soon and growing your tests already in an parallel environment.
- japhyr 11y agoThanks for the thoughtful response. I appreciate the perspective on what it means for large test suites, and why it's beneficial to think about this in early development stages as well.