Run multiple test cases simultaneously

Hi @antt ,

In theory, it is possible.
Setup 4 testSuites with each testSuite one test case (from testCase 1 to testCase 4).
Add testCase 5 to any of those 4 testSuites, preferably to the one that takes the longest (e.g. to testSuite n° 4).

Add these testSuites to a test suite collection and enable “Parallel” Execution mode (set max. concurrent instances to 4).
This will make each testCase from 1 to 4 run in parallel. As soon the first testCase in testSuite n° 4 is done it will start up testCase 5 in that same testSuite.
But of course you want to be sure that testCase 1, 2 and 3 are also finished before you start this testCase 5. To do that, you could either write a very long sleep before you start testCase 5 (not so elegant) or use some cross-test-suite variable to flag whether all testCase 1-3 are finished. Example: for testSuite n°1, 2 and 3 write a tearDown script that will create variable to an excel. Example for testSuite 1 a property “testCase1Finished” with value “true”. (Why in a tearDown and not just at the end of your testCase? Imagine the testCase 2 fails at one point, it might never reach that line of code where you write your “true” and your testCase 5 will wait unnecessarily long)
In the testCase 5 you then need to write some script to read those values from the excel(s) in a while loop and only continue with your testCase 5 when all 3 values are “true” (testCase 4 was done sequentially in your testSuite 4). This also implies a reset to “false” of these 3 variables, preferably at the startup of each testSuite.

This is not ideal. Writing to 1 excel in parallel is not recommendable, so you should for each testCase have a dedicate excel to avoid concurrency issues. Not really sure anymore whether a read of the excel might interfere with the write… And in general, parallel runs might behave different than expected like mentioned above. But if your whole project just consist of these 5 (small) test cases you might pull it off this way (and I think it might be do-able without a Katalon Runtime Engine license, but not sure on that).

Note: You could also set testCase5 to a dedicated testSuite n°5 and set the max. concurrent instances to 4, but you’d still face the problem that a run of testCase 5 will be initiated before ALL other testCase 1to4 are done.

On how to write properties to an excel for potential use between test suites, see my post here: