In a previous blog post, we looked at how we sped up certain stages of the NetEye pipeline through parallelization. This boost not only lifted team spirits but, more importantly, ramped up the pace of delivering new features and bug fixes, giving everyone the motivation to keep enhancing the pipeline across different stages.
In another post by one of my teammates, we dug into the introduction of parallel testing in a dedicated stage. Once again, the idea is pretty simple: use parallelization to make testing faster by shifting tests from sequential to parallel during development. While working on a project, we also took the chance to rearrange tests and tweak them to ensure they’re isolated.
Sounds easy, right? Well, sort of.
Most tests require a pre-set environment, which we set up through what we call a “common setup.” Let’s quickly run through the pipeline stages:
parallel-common-setup
→parallel-test
→serial-common-setup
→serial-test
To move a test from the serial stage to the parallel one, we also have to move the related common setup. Unfortunately, this turned out to be too much work. Over several weeks, we only moved a few tests, making our efforts to introduce parallel testing seem wasted.
Something had to change. So we sat down and looked at how long each stage took:
Now did we really need to parallelize the common setups just to save a few minutes? The answer turned out to be no. With the same effort, we could’ve saved more time by moving tests without moving common setups. So we switched things up by instead running the serial common setups before the parallel tests:
parallel-common-setup
→serial-common-setup
→parallel-test
→serial-test
This way, we could focus on moving some tests right now and seeing immediate benefits. Of course, we’ll move the serial common setups in the future, too.
So, how are things looking now that a few months have passed?
Serial tests now complete in less than 30 minutes!
Out of a total of 349 tests, we’ve migrated 132 of them. There’s still a long road ahead, but we’ve already achieved significant results.
And with this we’ve demonstrated that another pipeline stage can be accelerated. Stay tuned for future updates as we continue to enhance other pipeline stages, all aimed at delivering features faster and further empowering our development efforts.
Did you find this article interesting? Does it match your skill set? Programming is at the heart of how we develop customized solutions. In fact, we’re currently hiring for roles just like this and others here at Würth Phoenix.