I'm trying to use Apple's tools to speed up testing by running tests in parallel. One way to do this is to enable "Execute in parallel (if possible)" from the Test Plan UI.
Unfortunately, when I try that, some number of our tests end up failing intermittently.
It's likely this has something to do with how our test code is set up, but it seems to be related to how the parallelization is optimized by pulling test classes out of test targets. For our test suite, we found that as long as the test targets are not broken up, the tests run fine.
So what we'd like to be able to do is to run the test targets in parallel while keeping the classes and tests in each target bundled together during test execution.
That is, suppose we have 3 test targets in a Test Plan:
- Target1
- Target2
- Target3
Each test target has some number of test classes and tests.
What I'd like to be able to do is to use Apple's Parallelization tools to execute these tests in parallel, but while keeping all the test classes together.
So, for example, if we ran this configuration with 2 parallel shards, it might look like:
- Shard1: Target1, Target2
- Shard2: Target3
I haven't been able to find a way to accomplish this. Is there a known solution or workaround?