Skip to content

Commit 5eae7ab

Browse files
committed
Document tag and name filter interaction
As noted in cucumber/docs#1023 it is not documented how tag and name filters interact.
1 parent c0ecd8f commit 5eae7ab

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

cucumber-core/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ cucumber.features= # comma separated list of feature paths.
3737
# example: path/to/features, classpath:com/example/features, path/to/example.feature:42, @path/to/rerun.txt
3838
3939
cucumber.filter.name= # a regular expression
40-
# only scenarios with matching names are executed.
41-
# example: ^Hello (World|Cucumber)$
40+
# only scenarios with matching names are executed.
41+
# combined with cucumber.filter.tags using "and" semantics.
42+
# example: ^Hello (World|Cucumber)$
4243
4344
cucumber.filter.tags= # a cucumber tag expression.
44-
# only scenarios with matching tags are executed.
45+
# only scenarios with matching tags are executed.
46+
# combined with cucumber.filter.name using "and" semantics.
4547
# example: @Cucumber and not (@Gherkin or @Zucchini)
4648
4749
cucumber.glue= # comma separated package names.

cucumber-core/src/main/java/io/cucumber/core/options/Constants.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ public final class Constants {
8888
* <p>
8989
* Filters scenarios by name based on the provided regex pattern e.g:
9090
* {@code ^Hello (World|Cucumber)$}. Scenarios that do not match the
91-
* expression are not executed.
91+
* expression are not executed. Combined with
92+
* {@value FILTER_TAGS_PROPERTY_NAME} using "and" semantics.
9293
* <p>
93-
* By default all scenarios are executed
94+
* By default, all scenarios are executed
9495
*/
9596
public static final String FILTER_NAME_PROPERTY_NAME = "cucumber.filter.name";
9697

@@ -99,9 +100,10 @@ public final class Constants {
99100
* <p>
100101
* Filters scenarios by tag based on the provided tag expression e.g:
101102
* {@code @Cucumber and not (@Gherkin or @Zucchini)}. Scenarios that do not
102-
* match the expression are not executed.
103+
* match the expression are not executed. Combined with
104+
* {@value FILTER_NAME_PROPERTY_NAME} using "and" semantics.
103105
* <p>
104-
* By default all scenarios are executed
106+
* By default, all scenarios are executed
105107
*/
106108
public static final String FILTER_TAGS_PROPERTY_NAME = "cucumber.filter.tags";
107109

cucumber-core/src/main/resources/io/cucumber/core/options/USAGE.txt

+2
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ cucumber.features= # comma separated paths to feature files.
137137

138138
cucumber.filter.name= # a regular expression
139139
# only scenarios with matching names are executed.
140+
# combined with cucumber.filter.tags using "and" semantics.
140141
# example: ^Hello (World|Cucumber)$
141142

142143
cucumber.filter.tags= # a cucumber tag expression.
143144
# only scenarios with matching tags are executed.
145+
# combined with cucumber.filter.name using "and" semantics.
144146
# example: @Cucumber and not (@Gherkin or @Zucchini)
145147

146148
cucumber.glue= # comma separated package names.

cucumber-junit-platform-engine/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ cucumber.ansi-colors.disabled= # true or false.
331331
332332
cucumber.filter.name= # a regular expression.
333333
# only scenarios with matching names are executed.
334+
# combined with cucumber.filter.tags using "and" semantics.
334335
# example: ^Hello (World|Cucumber)$
335336
# note: To ensure consistent reports between Cucumber and
336337
# JUnit 5 prefer using JUnit 5s discovery request filters
@@ -349,6 +350,7 @@ cucumber.features= # comma separated
349350
350351
cucumber.filter.tags= # a cucumber tag expression.
351352
# only scenarios with matching tags are executed.
353+
# combined with cucumber.filter.name using "and" semantics.
352354
# example: @Cucumber and not (@Gherkin or @Zucchini)
353355
# note: To ensure consistent reports between Cucumber and
354356
# JUnit 5 prefer using JUnit 5s discovery request filters

0 commit comments

Comments
 (0)