@mabdullahsari In the single test class I have several tests which take a long time to run. Is it possible to run them in parallel?
Or I suppose I would have to split up my test class?
But even in that case, is it possible to run only a handful of test classes in parallel by filtering, say a folder of classes, rather than the entire test suite?
@CLab The test cases within a file belong to a single test. You can only run the tests in parallel, not the individual cases. Since you are talking about one test, there is no point in parallelizing that.
You need to create separate tests.
You should be able to run a specific test namespace is parallel, yeah.
@mabdullahsari Hi- so my test cases are now in separate classes/files.
How can I run a specific test namespace in parallel as you mentioned? What command do I use?
@mabdullahsari I wish that there was a way to mark two best answers, as without your conversation we wouldn't have come to the point. But yes I will change Best answer to @sinnbeck as his works. Thank you both for taking time from your day to help a novice out.
@clab I think you need to address the actual problem rather than the symptoms in this case.
You have slow tests. You should be looking at why your tests are slow; not trying to find workarounds to make them run faster by parallelising them. You still have slow tests; just now split across multiple classes.
So why do you have slow tests? Are they testing too much? Are they hitting external services (which they shouldn’t be)?
@martinbean Thanks Martin. Yes I understand. I will inspect them and fix them too. Splitting it up actually increased the speed 4 fold as the setup was very heavy when everything was in one. By splitting it up the setup could be optimized for each class which made it faster.