-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 Platform] Enable parallel execution of features #2604
Conversation
Reviewing this from my phone I don't see any immediate problems. It does look like you may have to run |
Thanks for looking into this. I will run 'mvn spotless:apply' and fix the formatting issues. |
@mpkorstanje I have applied the formatting changes using spotless and pushed those changes |
Codecov Report
@@ Coverage Diff @@
## main #2604 +/- ##
============================================
+ Coverage 84.66% 84.68% +0.02%
+ Complexity 2710 2696 -14
============================================
Files 321 320 -1
Lines 9499 9516 +17
Branches 906 908 +2
============================================
+ Hits 8042 8059 +17
- Misses 1126 1127 +1
+ Partials 331 330 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've (finally) been able to review this on my PC. Thanks for waiting!
It looks like there is some test coverage missing. Consider adding a test to FeatureResolverTest
that tests a feature with a Feature -> Rule -> Scenario Outline -> Examples -> Example
in it to verify that all the nodes have the SAME_THREAD
option.
The documentation also seems to be a bit hesitant in mentioning that this restores the JUnit 4 behaviour of executing all scenarios in a feature on the same thread. Consider rewriting the documentation to make this more clear.
Finally please up the CHANGELOG.md
file.
Owh and feel free to ignore the failures from the semver check. I'll fix those prior to merging. |
…E to PARALLEL_EXECUTION_MODE_FEATURE_PROPERTY_NAME * added additional tests to cover changes made in NodeDescriptor and PickleDescriptor * modified README.md with proper phrases and introduced references to Junit4 behaviour * added an entry in the CHANGELOG.md
@mpkorstanje I have pushed the changes now. Thanks again 👍 |
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
Cheers! |
Thanks a lot @mpkorstanje for guiding me to add this and taking your time to refactor the commits. Cheers! |
How is this implemented? There is no documentation I am able to find. I am chasing same problem - want to run scenario in sequence but feature in parallel. |
@ch-akash the documentation was updated as part of this PR. If you look at the changes in the PR, I'm sure you'll be able to find the documentation. |
I saw the readme file, checked on Cucumber's official documentation for parallel execution and even in this PR I did not find the solution as in how is it achieved and what are the steps to be taken. I checked this PR but it has no 'Steps to do' or migration guide. As far as I checked. Any direct link to this documentation? The checklist says doc updated but where is it? |
@ch-akash if you have really gone through the PR you might’ve found the solution. You need to use the Junit5 property |
@ch-akash This is an opensource project that mostly runs on peoples spare time. Unfortunately writing detailed migration guides and step by step tutorials is a time consuming effort. However if you read the JUnit Platform README and the JUnit 5 documentation from top to bottom all the information you need should be there. If this is too much at once consider looking for a JUnit 5 tutorial first before moving into the JUnit 5 and Cucumber documentation. |
Many thanks @mpkorstanje and @sambathkumar-sekar for replying. I respect the time you gave to my comment. I will try it and will go through the documentation first if I have doubts. Best regards. |
🤔 What's changed?
New feature as described here -> #2602
Added new configuration constant for conifguration property
cucumber.execution.execution-mode.scenario
Added
getExecutionModeForScenario()
method on CucumberOptions to retrieve the config valueAdded overriding
getExecutionMethod()
for NodeDescriptor & PickleDescriptor to create a execution layer for scenariosModified constructor of NodeDescriptor class to accept a new Configuration Parameter argument
Modified
createFeatureDescriptor(Feature feature)
inFeatureResolver
class to include configuration parameters as an argument for NodeDescriptor class⚡️ What's your motivation?
New Feature -> #2602
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.