When I set my Maven build to run my integration tests in parallel, I see:
01:31:47 -------------------------------------------------------
01:31:47 T E S T S
01:31:47 -------------------------------------------------------
01:31:48 Concurrency config is parallel='classes', perCoreThreadCount=true, threadCount=20, useUnlimitedThreads=false
But then I don't see the progress of any of my tests. Eventually, they all finish and the output gets dumped out all at once.
01:41:42 Running com.my.test.TestClass
01:41:42 Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 69.706 sec
....
That test class finished after a minute yet it wasn't output until all the tests finished 10 minutes later.
How can I get the results of each class as it finishes to get output? It's hard to understand the progress of the build otherwise.
Once the parallel execution property is set (or enabled), the JUnit Jupiter engine will run the tests in parallel as per the configurations provided with the synchronization mechanisms.
The parameter forkCount defines the maximum number of JVM processes that maven-surefire-plugin will spawn concurrently to execute the tests. It supports the same syntax as -T in maven-core: if you terminate the value with a 'C', that value will be multiplied with the number of available CPU cores in your system.
Java command line when Run/Debug configuration is launched, the Surefire argline defined in maven pom. xml are automatically appended. This causes issues when the properties need to be overridden by specifying a system property in the VM options of the Run/Debug configuration.
Hope, I've got your question right. I think that's because tests that are being running in parallel can't really use the same console to notify their own progress, not technically, but conceptually it doesn't really make sense. Since maven processes the modules concurrently it possible that 2 tests running simultaneously will "share" the console. You'll just get the garbage in an output.
So instead, I guess you should take a look only on the overall results in the console and go for reports per module.
Surefire plugin responsible for running the tests generates reports per test.
There is also surefire report plugin
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With