I reproduced this on Katalon Studio 11.6.0 and measured where the time goes.
Setup: one test suite with 4 short API test cases (one POST and a status check each). I ran it three times back to back, changing only the suite’s Execution Information. The public Petstore server returned HTTP 500, so the tests failed, but each test still made its one request, so the timing is valid.
| Setting |
Real time (run start to last process exit) |
Duration in Katalon’s JUnit_Report.xml |
| Parallel off |
28.0 s |
9.5 s |
| Parallel on, Max Concurrent Instances 1 |
61.4 s |
48.8 s |
| Parallel on, Max Concurrent Instances 4 |
67.0 s |
39.8 s |
Why parallel is slower
- With Enable Parallel Execution ticked, the suite runs with
"orchestration":"ISOLATED_PROCESS" (as seen in plan.jsonl in my report folder). Katalon starts a new Java process for the before-suite listeners, one for each test case, and one for the after-suite listeners. That is 6 processes for 4 tests, each with its own folder and console0.log in the report, all started by katalon.exe. The docs say the same: “Katalon Studio runs each test case in its own process” (Run test cases in parallel in a test suite).
- Here a test-case process needed about 6 s before its test started (the first one in a run about 15 s). The tests themselves took under 5 s each (up to 8 s when 4 ran at once). With parallel off, that start-up is paid once for the whole suite. In parallel mode, every test case pays it.
- Max Concurrent Instances defaults to 1. Then every test case still gets its own process, but they run one after another, so you only get the extra start-ups: 28 s became 61 s. That is probably what happened in the first post (5.2 s to 29 s).
- With 4 at once, the processes slowed each other down while starting: start-up went from about 6 s to 28-30 s each.
Run 3 (Max Concurrent Instances 4), per process. “START” is the time in each process’s own console0.log; start-up is from JVM start to the first listener call.
process JVM started "START" logged exited start-up
before-suite listeners 16:09:06.9 16:09:18.9 16:09:19.8 12.9 s
Test 1 16:09:21.0 16:09:47.4 16:09:57.6 28.1 s
Test 2 16:09:22.4 16:09:49.0 16:09:58.0 28.5 s
Test 3 16:09:22.6 16:09:49.7 16:09:58.7 29.1 s
Test 4 16:09:22.6 16:09:50.6 16:09:58.9 29.9 s
after-suite listeners 16:09:59.7 16:10:12.0 16:10:13.0 13.1 s
Why Katalon’s total is lower than the real time
In run 3, the duration in JUnit_Report.xml starts at 16:09:19.1, after the first process had already booted and logged START, and ends at 16:09:58.9, when the last test case finished. It leaves out the 13 s boot of the first process and the whole after-suite listener process. The run actually went from 16:09:06 to 16:10:13. I did not test collections, but the 25 s vs 52 s difference discussed above looks like the same kind of gap.
What to do
- For short tests such as API calls, keep Enable Parallel Execution off.
- Parallel only pays off when each test runs much longer than a process takes to start (about 6 s alone on this machine, about 30 s with 4 starting together).
- Parallel with Max Concurrent Instances 1 only adds start-up time.
Suggestions for the ticket for @nghi.phan
- Reuse a pool of worker processes for the test cases instead of starting a new JVM for each one.
- Include process start-up and the listener processes in the reported duration, or show the real elapsed time next to it.
- Warn when parallel is on and Max Concurrent Instances is 1.
How I measured: a test listener that writes, in every process, the JVM start time (ManagementFactory.getRuntimeMXBean().getStartTime()), a timestamp at each Before/After hook, and the exit time from a shutdown hook. The times line up with each process’s own console0.log. The screenshots below are from that listener , one per run.
Short version :Katalon’s timer leaves out much of the time spent starting a new Java process for each test, so a parallel run that really took 67 s was reported as 39.8 s.
Tests used