-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUnit 5 with Maven Surefire does not run parallel
tests
#1424
Comments
|
parallel
tests
Closing this issue -- please report new issues at https://maven.apache.org/surefire/issue-tracking.html Jupiter 5.3 will support parallel test execution as an opt-in feature. See https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-parallel-execution for details. |
Could you provide at least one example? Because I was not able to run tests in parallel. |
@13Dima13 To use the new experimental feature, just remove all Maven config and add a
|
@marcphilipp : I see the still scripts are running in Parallel even after I removed junit-platform.properties from resource folder. I had challenge of running UI automation scripts in parallel and i followed your steps and it worked awesome but after removing also i still see that scripts are running in parallel on my Jenkins slave machine but when i build the project on my local machine scripts are running sequentially as expected. What could be the reason for this behavior on jenkins slave machine. |
@BalurQA I'm not sure. Are you running your tests in a different way on Jenkins? Is the file still around in its workspace? |
overview
I'm trying to use JUnit5 and Surefire to run tests on parallel threads.
I have a test that will just run multiple test methods and print out the thread name, to check that the test methods are on different threads.
In my POM I use the recommended versions of all junit and surefire packages and dependencies.
If I run
mvn clean test
the tests methods run, but they all run sequentially on themain
thread.If I run
mvn clean surefire:test
the test does not run at all.In issue #1341 the fix was to use
junit-platform-surefire-provider
1.2.0-SNAPSHOT. I'm using the released 1.2.0 version from april 2018 and it's still not working. There is no information on that issue about whether the tests are actually running parallelised.reproduction code
I included reproduction code in this gist: https://gist.github.com/jennyowen/563dbf93315e357bdf9e0bb2e098600b
versions
Apache Maven 3.3.9
Java openjdk8
maven-surefire-plugin 2.21.0
junit-platform-surefire-provider 1.2.0
junit-jupiter-engine 5.2.0
junit-jupiter-api 5.2.0
related issues
#809 #1341
The text was updated successfully, but these errors were encountered: