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

Clobber all filter types when override one filter type in the environment options #748

Merged

Conversation

brasmusson
Copy link
Contributor

If using -Dcucumber.options="path/file.feature --name scenario_name", to run a specific scenario, then any tag filters (or name filters) specified in @CucumberOptions will be clobbered. However if instead using -Dcucumber.options="path/file.feature:line", to run a specific scenario, then the tag or name filters specified in @CucumberOptions will not be clobbered, and and "inconsistent filters" exception will occur. The same happens when using -Dcucumber.options="@rerun.txt", since the @rerun.txt will contain feature paths with line filters.

The explanation from an implementation viewpoint is that this is because, tag- and name-filters are put in the same filter list, whereas the line filters need to be kept together the their feature paths (each line filter is only applied to its one feature path), so the stored in the feature path list.

This PR makes the specification of feature paths will line filters, or specification using the @rerun.txt syntax, clobber the list with tag and name filters from the @CucumberOptions. And also that the specification of tag of name filters, strips the line filters from feature paths from @CucumberOptions.

Should a file with feature paths and line filters be specified in the @CucumberOptions, those line filters will not be stripped if specifying a tag or name filter in -Dcucumber.options. In part because while it is possible, the @rerun.txt was not primarily intended for this, and in part because it would more complicated to implement.

@aslakhellesoy aslakhellesoy merged commit df03361 into cucumber:master Oct 24, 2014
aslakhellesoy added a commit that referenced this pull request Oct 24, 2014
@brasmusson brasmusson deleted the runtime-options-filter-types branch October 24, 2014 07:13
@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

Successfully merging this pull request may close these issues.

2 participants