-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
run_scenarios_matching_name.feature
71 lines (58 loc) · 1.64 KB
/
run_scenarios_matching_name.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Feature: Run feature elements matching a name with --name/-n
The `--name NAME` option runs only scenarios which match a certain
name. The NAME can be a substring of the names of Features, Scenarios,
Scenario Outlines or Example blocks.
Background:
Given a file named "features/first.feature" with:
"""
Feature: first feature
Scenario: foo first
Given missing
Scenario: bar first
Given missing
"""
Given a file named "features/second.feature" with:
"""
Feature: second
Scenario: foo second
Given missing
Scenario: bar second
Given missing
"""
Given a file named "features/outline.feature" with:
"""
Feature: outline
Scenario Outline: baz outline
Given outline step <name>
Examples: quux example
| name |
| a |
| b |
"""
Scenario: Matching Scenario names
When I run `cucumber -q --name foo`
Then it should pass with:
"""
Feature: first feature
Scenario: foo first
Given missing
Feature: second
Scenario: foo second
Given missing
2 scenarios (2 undefined)
2 steps (2 undefined)
"""
Scenario: Matching Scenario Outline names
When I run `cucumber -q --name baz`
Then it should pass with:
"""
Feature: outline
Scenario Outline: baz outline
Given outline step <name>
Examples: quux example
| name |
| a |
| b |
2 scenarios (2 undefined)
2 steps (2 undefined)
"""