forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dry_run.feature
86 lines (70 loc) · 2.41 KB
/
dry_run.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Feature: Dry Run
Dry run gives you a way to quickly scan your features without actually running them.
- Invokes formatters without executing the steps.
- This also omits the loading of your support/env.rb file if it exists.
Scenario: With a failing step
Given a file named "features/test.feature" with:
"""
Feature: test
Scenario:
Given this step fails
"""
And the standard step definitions
When I run `cucumber --dry-run --publish-quiet`
Then it should pass with exactly:
"""
Feature: test
Scenario: # features/test.feature:2
Given this step fails # features/step_definitions/steps.rb:4
1 scenario (1 skipped)
1 step (1 skipped)
"""
Scenario: With message formatter
Given a file named "features/test.feature" with:
"""
Feature: test
Scenario:
Given this step passes
"""
And the standard step definitions
When I run `cucumber --dry-run --publish-quiet --format message`
Then it should pass
And output should be valid NDJSON
And the output should contain NDJSON with key "status" and value "SKIPPED"
Scenario: In strict mode
Given a file named "features/test.feature" with:
"""
Feature: test
Scenario:
Given this step fails
"""
And the standard step definitions
When I run `cucumber --dry-run --strict --publish-quiet`
Then it should pass with exactly:
"""
Feature: test
Scenario: # features/test.feature:2
Given this step fails # features/step_definitions/steps.rb:4
1 scenario (1 skipped)
1 step (1 skipped)
"""
Scenario: In strict mode with an undefined step
Given a file named "features/test.feature" with:
"""
Feature: test
Scenario:
Given this step is undefined
"""
When I run `cucumber --dry-run --strict`
Then it should fail with:
"""
Feature: test
Scenario: # features/test.feature:2
Given this step is undefined # features/test.feature:3
Undefined step: "this step is undefined" (Cucumber::Core::Test::Result::Undefined)
features/test.feature:3:in `this step is undefined'
Undefined Scenarios:
cucumber features/test.feature:2 # Scenario:
1 scenario (1 undefined)
1 step (1 undefined)
"""