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

Experimental CLI for tag expressions #282

Merged
merged 2 commits into from
Nov 28, 2017
Merged

Conversation

aslakhellesoy
Copy link
Contributor

Summary

Command-line tool that prints the location of scenarios matching a certain tag expression

Details

The tool reads a Cucumber event stream (produced by the gherkin command line tool) from STDIN and prints the locations (in "rerun.txt" format) to STDOUT

Motivation and Context

This tool can be used as a preprocessor before running cucumber to get a list of scenarios to execute before running cucumber.

While cucumber can filter scenarios with the --tags option, it is sometimes useful to perform this filtering before running cucumber so that several cucumber processes can be spawned in parallel.

This can speed up the execution for slow scenarios.

How Has This Been Tested?

Manually

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Caveats

When multiple cucumber processes are run in parallel, each process will produce an independent report. These reports will have to be combined in order to produce a single report, and this isn't trivial to do until there are reporters that are based on the Cucumber event protocol.

@mxygem
Copy link
Member

mxygem commented Oct 7, 2017

I really like this idea! I had thought about accomplishing the same thing via -f json -d -o output.json, parsing output.json for each tag, grabbing the needed data, and then splitting things out that way. Having this built in would be really helpful with that type of behavior!

@aslakhellesoy
Copy link
Contributor Author

This PR was created in response to this slack discussion. I think that was you @fordprior?

@aslakhellesoy aslakhellesoy merged commit 3768bf8 into master Nov 28, 2017
aslakhellesoy added a commit that referenced this pull request Nov 28, 2017
@aslakhellesoy aslakhellesoy deleted the tag-expressions-cli branch July 12, 2018 21:12
@lock
Copy link

lock bot commented Jul 12, 2019

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 Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants