-
-
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
Opt-in support for parallel execution #60
Comments
+1 for this one. TestNG has had this feature for a long time and the maven surefire plugin supports parallel tests out of the box: |
+1. would definitely help in shortening build times |
Will this be part of the platform, or the engine, or both? While thinking about better support for parallel execution in Spock, I identified some problems that should be handled by the testing framework.
My idea is that each test (class/method) could declare its use of global resources, e.g. This way the framework could offer the maximum concurrency while still offering providing tools to isolate problematic tests. There would be a list of predefined resources, such as Thoughts? Of course all names are open for change. |
I think an engine needs to decide on which level tests can be executed in parallel. However, there are quite a few similarities between different testing frameworks where the platform could provide support, e.g. via a base implementation that multiple test engines can use. I really like your reentrant lock idea! Is there already a |
@marcphilipp no Spock doesn't have it's own |
Any news on that topic? |
See the Maven instructions shown at jitpack URL above. If it works with Surefire? No idea. Keen on trying it out? |
@marcphilipp The https://github.com/junit-team/junit5/tree/experiments/parallel-execution branch is still based on 5.1-M2 ... it lacks the final |
I'll meet with @leonard84 this weekend. I'll try to merge master into the feature branch before. |
I've just updated the feature branch. Feel free to try it out using Jitpack. |
Issue: #60 Co-authored-by: Leonard Brünings <[email protected]>
Parallel testing is a big deal to us. I have experimented with your version and my first simple tests look real promising. Is there a ball park for when this might get merged into Junit5 and when an official release timeframe might be? If this is going to be real, I might forge ahead and begin really exercising it. |
@dlanaghen Thanks for experimenting with it and letting us know! We plan to include it as an experimental feature in 5.3 M1 which is currently scheduled for June 24. If no regressions or major issues are found, you can expect a RC and the GA release within two weeks from that date. |
@marcphilipp this is great news. With better parameterized testing features and your new multi-threaded test runner, you will have filled a couple of big holes in JUnit. Thanks for your work. |
@marcphilipp, great to hear, this (no parallelism) was a road blocker for us to adopt fully JUnit 5. |
This commit adds opt-in support for parallel test execution and capturing output to `System.out` and `System.err`. Both features are disabled by default but can be enabled and configured using configuration parameters. The implementation is based on the Fork/Join Framework and designed to be reusable by other test engines that extend HierarchicalTestEngine. The Jupiter API provides annotations to declare which shared resources a test needs to access and in which way. Moreover, the execution mode of a test can be influenced. In addition, a number of TestExecutionListeners have been made thread-safe. The documentation subproject is now configured to execute tests in parallel. All other subprojects will have to wait as Gradle currently blows up when used with parallel test execution. Resolves #60. Closes #1461. Co-authored-by: Leonard Brünings <[email protected]> Co-authored-by: Christian Stein <[email protected]>
This commit adds opt-in support for parallel test execution and capturing output to `System.out` and `System.err`. Both features are disabled by default but can be enabled and configured using configuration parameters. The implementation is based on the Fork/Join Framework and designed to be reusable by other test engines that extend HierarchicalTestEngine. The Jupiter API provides annotations to declare which shared resources a test needs to access and in which way. Moreover, the execution mode of a test can be influenced. In addition, a number of TestExecutionListeners have been made thread-safe. The documentation subproject is now configured to execute tests in parallel. All other subprojects will have to wait as Gradle currently blows up when used with parallel test execution. Resolves junit-team#60. Closes junit-team#1461. Co-authored-by: Leonard Brünings <[email protected]> Co-authored-by: Christian Stein <[email protected]>
Where is the documentation on how to use this? |
@markthegrea It is still on the snapshot version of the User-Guide, because it is integrated in version 5.3-RC1 of the Jupiter Engine: https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-parallel-execution When 5.3 is released, the current User-Guide will show it, too. |
This commit adds opt-in support for parallel test execution and capturing output to `System.out` and `System.err`. Both features are disabled by default but can be enabled and configured using configuration parameters. The implementation is based on the Fork/Join Framework and designed to be reusable by other test engines that extend HierarchicalTestEngine. The Jupiter API provides annotations to declare which shared resources a test needs to access and in which way. Moreover, the execution mode of a test can be influenced. In addition, a number of TestExecutionListeners have been made thread-safe. The documentation subproject is now configured to execute tests in parallel. All other subprojects will have to wait as Gradle currently blows up when used with parallel test execution. Resolves junit-team#60. Closes junit-team#1461. Co-authored-by: Leonard Brünings <[email protected]> Co-authored-by: Christian Stein <[email protected]>
Related to #90.
The text was updated successfully, but these errors were encountered: