Skip to content
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

Parallel Tests using the CLI #664

Closed
klausbayrhammer opened this issue Jan 30, 2014 · 8 comments
Closed

Parallel Tests using the CLI #664

klausbayrhammer opened this issue Jan 30, 2014 · 8 comments

Comments

@klausbayrhammer
Copy link
Contributor

In order to execute our tests in parallel using the CLI we have created a new ParallelMain which supports

  • Running multiple .feature-files in parallel
  • A mechanism to configure formatters as before (e.g. -f pretty:out -f fully.qual.name:out) - each executer caches the calls to formatter/reporter and replays them after a feature is executed. So although multiple features are execute in parallel, only one formatter/reporter per type is written.
  • configurable number of executing-threads
  • configurable timout

We could provide a PR if you are interested.

@sukesh15
Copy link

How do i use ParallelMain? Would you be able to share an example for the same. We wanted to run cucumber tests in parallel using the CLI in our project.

@klausbayrhammer
Copy link
Contributor Author

As of yet we haven't extracted the code because we didn't know whether this feature should be a part of cucumber-jvm. If you are interested I could provide a PR.

@youngrafi
Copy link

This would be very useful. Current solutions I've found using JUnit require a subsequent merger of the reports, and besides, I've been using the CLI up until now, and would rather avoid switching to running through JUnit.

@baztian
Copy link

baztian commented Oct 1, 2014

@klausbayrhammer I am definitely interested in parallel execution of cucumber-jvm features. So please provide a pull request.

klausbayrhammer added a commit to klausbayrhammer/cucumber-jvm that referenced this issue Oct 6, 2014
* modifies FeatureBuilder to use absolute paths when resolving features using a direct path (as before) as well as a directory containing features (new)
* adds a ParallelCucumberMain which runs multiple .feature-files in parallel and contains a  mechanism to configure formatters as before (e.g. -f pretty:out -f fully.qual.name:out) - each executer caches the calls to formatter/reporter and replays them after a feature is executed.
@klausbayrhammer
Copy link
Contributor Author

0854dd4 is a first draft to executing tests in parallel via the CLI. Currently I'm not quite sure how to handle the different formats of feature-paths which can be used in the standard CLI. I've tried to use absolute paths in CucumberFeature.path to identify the features and use that paths in cucumber.api.cli.ParallelCucumberMain:77 but that changed the URI's in e.g. the json-formatter. However I appreciate all kind of feedback!

@danielwegener
Copy link

The recorder is a quite nice workaround to thread safety in the Runtime/Backend. This however puts expensive operations like classpath scanning and gluecode matching up to every scenario execution. I think these issues could better be solved in the cucumber core abstractions (see #630).

@klausbayrhammer
Copy link
Contributor Author

Parallel exeuction of scenarios will be tracked in #630

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants