cucumber 2.3.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +48 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +39 -0
- data/.travis.yml +4 -5
- data/Gemfile +3 -1
- data/History.md +18 -2
- data/LICENSE +1 -1
- data/README.md +5 -2
- data/cucumber.gemspec +2 -13
- data/examples/i18n/eo/features/adicio.feature +6 -6
- data/examples/i18n/eo/features/divido.feature +6 -6
- data/examples/i18n/eo/features/step_definitions/calculator_steps.rb +2 -2
- data/features/docs/cli/randomize.feature +91 -15
- data/features/docs/cli/retry_failing_tests.feature +32 -0
- data/features/docs/defining_steps/snippets.feature +1 -1
- data/features/docs/formatters/json_formatter.feature +2 -6
- data/features/docs/formatters/junit_formatter.feature +47 -1
- data/features/docs/writing_support_code/after_step_hooks.feature +53 -0
- data/features/docs/{defining_steps → writing_support_code}/transforms.feature +42 -7
- data/features/lib/step_definitions/cucumber_steps.rb +28 -0
- data/features/lib/step_definitions/retry_steps.rb +35 -0
- data/lib/cucumber/cli/configuration.rb +4 -0
- data/lib/cucumber/cli/options.rb +7 -2
- data/lib/cucumber/cli/rerun_file.rb +1 -1
- data/lib/cucumber/configuration.rb +4 -0
- data/lib/cucumber/events/finished_testing.rb +9 -0
- data/lib/cucumber/filters/randomizer.rb +6 -1
- data/lib/cucumber/filters/retry.rb +32 -0
- data/lib/cucumber/formatter/cucumber.css +0 -0
- data/lib/cucumber/formatter/cucumber.sass +0 -0
- data/lib/cucumber/formatter/event_bus_report.rb +1 -0
- data/lib/cucumber/formatter/json.rb +18 -8
- data/lib/cucumber/formatter/junit.rb +56 -42
- data/lib/cucumber/gherkin/data_table_parser.rb +17 -9
- data/lib/cucumber/gherkin/steps_parser.rb +13 -21
- data/lib/cucumber/platform.rb +1 -0
- data/lib/cucumber/rake/task.rb +1 -1
- data/lib/cucumber/rb_support/rb_hook.rb +1 -1
- data/lib/cucumber/rb_support/snippet.rb +1 -1
- data/lib/cucumber/runtime.rb +4 -5
- data/lib/cucumber/runtime/for_programming_languages.rb +2 -0
- data/lib/cucumber/runtime/step_hooks.rb +1 -1
- data/lib/cucumber/step_match.rb +1 -1
- data/lib/cucumber/version +1 -1
- data/spec/cucumber/cli/configuration_spec.rb +7 -0
- data/spec/cucumber/cli/options_spec.rb +14 -0
- data/spec/cucumber/cli/rerun_spec.rb +3 -7
- data/spec/cucumber/filters/retry_spec.rb +79 -0
- data/spec/cucumber/formatter/event_bus_report_spec.rb +9 -0
- data/spec/cucumber/formatter/json_spec.rb +1 -1
- data/spec/cucumber/formatter/junit_spec.rb +2 -2
- data/spec/cucumber/formatter/spec_helper.rb +6 -1
- data/spec/cucumber/rake/task_spec.rb +85 -0
- data/spec/cucumber/rb_support/snippet_spec.rb +2 -2
- metadata +19 -139
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cd101b22f43dfd823d81914b2e7bbcf3c26e545
|
4
|
+
data.tar.gz: e39d9e9d47fc18abc4f2534f6da6da5cb8bc32c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cadaad2e95ce0da02a2a12a4ac590af92eaa0424569cd393a7d0953159da1159401c402943be08fb51d9b2eec5661f4c75d889749716a647a88ae0d41f05376
|
7
|
+
data.tar.gz: 36b919d9c5a50da9426a058923a1821c1f3cdfea2ad63fda1c1a1651e6da141b3034cff95d38a9f4733598dd8eedcf447205c7427d64870f6aa45e1b6658cefd
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<!-- These sections are meant as guidance for you, to help you give the kind of information we'll need to help with your issue. If a section doesn't seem to fit, just skip it.
|
2
|
+
|
3
|
+
In general: Please provide as much information as you can to help us solving your problem -->
|
4
|
+
|
5
|
+
## Summary
|
6
|
+
|
7
|
+
<!--- Provide a general summary description of the issue -->
|
8
|
+
|
9
|
+
## Expected Behavior
|
10
|
+
|
11
|
+
<!--- If you're describing a bug, tell us what should happen -->
|
12
|
+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
13
|
+
<!--- Feel free to use Given / Then / Then if that helps, but please add some plain-language context too -->
|
14
|
+
|
15
|
+
## Current Behavior
|
16
|
+
|
17
|
+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
18
|
+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
19
|
+
|
20
|
+
<!--- If you have got some output place it in the code block below. Otherwise remove it. -->
|
21
|
+
~~~
|
22
|
+
~~~
|
23
|
+
|
24
|
+
## Possible Solution
|
25
|
+
|
26
|
+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
27
|
+
<!--- or ideas how to implement the addition or change -->
|
28
|
+
|
29
|
+
## Steps to Reproduce (for bugs)
|
30
|
+
|
31
|
+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
32
|
+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
33
|
+
1.
|
34
|
+
2.
|
35
|
+
3.
|
36
|
+
4.
|
37
|
+
|
38
|
+
## Context & Motivation
|
39
|
+
|
40
|
+
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
41
|
+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
42
|
+
|
43
|
+
## Your Environment
|
44
|
+
|
45
|
+
<!--- If you're reporting a bug, include as many relevant details about the environment you experienced the bug in -->
|
46
|
+
* Version used:
|
47
|
+
* Operating System and version:
|
48
|
+
* Link to your project:
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<!-- These sections are meant as guidance for you. If something doesn't fit, you can just skip it. -->
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
|
5
|
+
<!--- Provide a general summary description of your changes -->
|
6
|
+
|
7
|
+
## Details
|
8
|
+
|
9
|
+
<!--- Describe your changes in detail -->
|
10
|
+
|
11
|
+
## Motivation and Context
|
12
|
+
|
13
|
+
<!--- Why is this change required? What problem does it solve? -->
|
14
|
+
<!--- If it fixes an open issue, please link to the issue here. -->
|
15
|
+
|
16
|
+
## How Has This Been Tested?
|
17
|
+
|
18
|
+
<!--- Please add tests for changes to the code, otherwise we probably won't merge it -->
|
19
|
+
|
20
|
+
<!--- Please describe in detail how you tested your changes. -->
|
21
|
+
<!--- Include details of your testing environment, tests ran to see how -->
|
22
|
+
<!--- your change affects other areas of the code, etc. -->
|
23
|
+
|
24
|
+
## Screenshots (if appropriate):
|
25
|
+
|
26
|
+
## Types of changes
|
27
|
+
|
28
|
+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
29
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
30
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
31
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
32
|
+
|
33
|
+
## Checklist:
|
34
|
+
|
35
|
+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
36
|
+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
37
|
+
- [ ] I've added tests for my code
|
38
|
+
- [ ] My change requires a change to the documentation.
|
39
|
+
- [ ] I have updated the documentation accordingly.
|
data/.travis.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
sudo: false
|
2
2
|
|
3
3
|
rvm:
|
4
|
+
- 2.3.0
|
4
5
|
- 2.2
|
5
6
|
- 2.1
|
6
7
|
- 2.0
|
@@ -11,14 +12,12 @@ rvm:
|
|
11
12
|
branches:
|
12
13
|
only:
|
13
14
|
- master
|
15
|
+
- resolve-issue-882
|
14
16
|
- v1.3.x-bugfix
|
17
|
+
- v2.x-bugfix
|
15
18
|
|
16
19
|
before_install:
|
17
20
|
- gem update bundler
|
18
21
|
|
19
22
|
notifications:
|
20
|
-
email:
|
21
|
-
- cukes-devs@googlegroups.com
|
22
|
-
webhooks:
|
23
|
-
urls: # gitter
|
24
|
-
- https://webhooks.gitter.im/e/dc010332f9d40fcc21c4
|
23
|
+
email: false
|
data/Gemfile
CHANGED
@@ -8,6 +8,8 @@ unless ENV['CUCUMBER_USE_RELEASED_CORE']
|
|
8
8
|
gem 'cucumber-core', :path => core_path
|
9
9
|
gem 'cucumber-wire', :path => wire_path
|
10
10
|
else
|
11
|
-
gem 'cucumber-core', :git => "
|
11
|
+
gem 'cucumber-core', :git => "https://github.com/cucumber/cucumber-ruby-core.git", :branch => 'v1.x-bugfix'
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
gem 'mime-types', '~>2.99'
|
data/History.md
CHANGED
@@ -1,9 +1,25 @@
|
|
1
|
-
## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v2.
|
1
|
+
## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v2.x-bugfix)
|
2
2
|
|
3
3
|
### New Features
|
4
4
|
|
5
5
|
### Bugfixes
|
6
6
|
|
7
|
+
## [v2.4.0](https://github.com/cucumber/cucumber-ruby/compare/v2.3.3...v2.4.0)
|
8
|
+
|
9
|
+
### New Features
|
10
|
+
|
11
|
+
* Update to Gherkin v4.0 (@brasmusson)
|
12
|
+
|
13
|
+
### Bugfixes
|
14
|
+
|
15
|
+
* Use HTTPS instead of Git as transport protocol ([#960](https://github.com/cucumber/cucumber-ruby/pull/960))
|
16
|
+
* Make random order stable and platform independent ([#974](https://github.com/cucumber/cucumber-ruby/pull/974), closes [#971](https://github.com/cucumber/cucumber-ruby/issues/971))
|
17
|
+
* Run scenarios in fully random order ([#970](https://github.com/cucumber/cucumber-ruby/pull/970) @threedaymonk)
|
18
|
+
* Adding Test Step in AfterStep hook. ([#931](https://github.com/cucumber/cucumber-ruby/pull/931) @t-morgan)
|
19
|
+
* Handle even more exotic rerun file formats seen in the wild ([#928](https://github.com/cucumber/cucumber-ruby/pull/928) @mcrmfc)
|
20
|
+
* Allow Rake task to accept multiple profiles. ([#907](https://github.com/cucumber/cucumber-ruby/pull/907) @jasonkarns)
|
21
|
+
* Let the JUnit formatter handle running test cases for different features interweaved ([#952](https://github.com/cucumber/cucumber-ruby/issues/952) @brasmusson)
|
22
|
+
|
7
23
|
## [v2.3.3](https://github.com/cucumber/cucumber-ruby/compare/v2.3.2...v2.3.3)
|
8
24
|
|
9
25
|
Added a message pointing users to [The Great Cucumber and BDD Census of 2016](https://cucumber.typeform.com/to/kjrSc2?audience=cucumber-ruby) to the installer message. Please take a few moments to help us all learn more about how you're using Cucumber and BDD.
|
@@ -160,7 +176,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
|
|
160
176
|
## [v2.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.5...v2.0.0.rc.1)
|
161
177
|
|
162
178
|
### Removed Features
|
163
|
-
|
179
|
+
|
164
180
|
* Removed support for IronRuby (@tooky @mattwynne)
|
165
181
|
|
166
182
|
### New Features
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
|
7
7
|
# Cucumber
|
8
8
|
|
9
|
-
|
10
9
|
Cucumber is a tool for running automated tests written in plain language. Because they're
|
11
10
|
written in plain language, they can be read by anyone on your team. Because they can be
|
12
11
|
read by anyone, you can use them to help improve communication, collaboration and trust on
|
@@ -23,6 +22,10 @@ Where to get more info:
|
|
23
22
|
|
24
23
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber.
|
25
24
|
|
25
|
+
## Code of Conduct
|
26
|
+
|
27
|
+
Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber [code of conduct](https://github.com/cucumber/cucumber/blob/master/CODE_OF_CONDUCT.md).
|
28
|
+
|
26
29
|
## Copyright
|
27
30
|
|
28
|
-
Copyright (c)
|
31
|
+
Copyright (c) Aslak Hellesøy and Contributors. See LICENSE for details.
|
data/cucumber.gemspec
CHANGED
@@ -10,21 +10,10 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.homepage = "http://cukes.info"
|
11
11
|
s.platform = Gem::Platform::RUBY
|
12
12
|
s.required_ruby_version = ">= 1.9.3"
|
13
|
-
s.
|
14
|
-
|
15
|
-
Please take a few minutes to fill out our survey and help us understand how BDD and Cucumber are used in the wild.
|
16
|
-
|
17
|
-
http://tinyurl.com/zk9jyrf
|
18
|
-
|
19
|
-
Thanks!
|
20
|
-
|
21
|
-
♡ The Cucumber Team ♡
|
22
|
-
}
|
23
|
-
|
24
|
-
s.add_dependency 'cucumber-core', '~> 1.4.0'
|
13
|
+
s.add_dependency 'cucumber-core', '~> 1.5.0'
|
25
14
|
s.add_dependency 'builder', '>= 2.1.2'
|
26
15
|
s.add_dependency 'diff-lcs', '>= 1.1.3'
|
27
|
-
s.add_dependency 'gherkin', '~>
|
16
|
+
s.add_dependency 'gherkin', '~> 4.0'
|
28
17
|
s.add_dependency 'multi_json', '>= 1.7.5', '< 2.0'
|
29
18
|
s.add_dependency 'multi_test', '>= 0.1.2'
|
30
19
|
s.add_dependency 'cucumber-wire', '~> 0.0.1'
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# language: eo
|
2
2
|
Trajto: Adicio
|
3
3
|
Por eviti stultajn erarojn
|
4
|
-
Kiel stultulo
|
5
|
-
Mi volas
|
4
|
+
Kiel stultulo pri matematiko
|
5
|
+
Mi volas adicii du nombrojn
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Kaj mi entajpas <nombro_2> en
|
7
|
+
Kazo-skizo: Adiciu du nombrojn
|
8
|
+
Komence mi entajpas <nombro_1> en la kalkulilon
|
9
|
+
Kaj mi entajpas <nombro_2> en la kalkulilon
|
10
10
|
Se mi premas <butono>
|
11
|
-
Do la rezulto
|
11
|
+
Do la rezulto estu <rezulto>
|
12
12
|
|
13
13
|
Ekzemploj:
|
14
14
|
| nombro_1 | nombro_2 | butono | rezulto |
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# language: eo
|
2
2
|
Trajto: Divido
|
3
3
|
Por eviti stultajn erarojn
|
4
|
-
Uzantoj
|
4
|
+
Uzantoj kapablu kalkuli frakciojn
|
5
5
|
|
6
|
-
|
7
|
-
* mi
|
8
|
-
* mi
|
9
|
-
* mi premis
|
10
|
-
* la rezulto
|
6
|
+
Kazo: Simplaj nombroj
|
7
|
+
* mi entajpas 3 en la kalkulilon
|
8
|
+
* mi entajpas 2 en la kalkulilon
|
9
|
+
* mi premis divide
|
10
|
+
* la rezulto estu 1.5
|
@@ -11,7 +11,7 @@ end
|
|
11
11
|
After do
|
12
12
|
end
|
13
13
|
|
14
|
-
Given /mi entajpas (\d+) en
|
14
|
+
Given /mi entajpas (\d+) en la kalkulilon/ do |n|
|
15
15
|
@calc.push n.to_i
|
16
16
|
end
|
17
17
|
|
@@ -19,6 +19,6 @@ When /mi premas (\w+)/ do |op|
|
|
19
19
|
@result = @calc.send op
|
20
20
|
end
|
21
21
|
|
22
|
-
Then /la rezulto
|
22
|
+
Then /la rezulto estu (.*)/ do |result|
|
23
23
|
@result.should == result.to_f
|
24
24
|
end
|
@@ -9,17 +9,36 @@ Feature: Randomize
|
|
9
9
|
you can reproduce that run by using the seed that's printed at the end of
|
10
10
|
the test run.
|
11
11
|
|
12
|
+
For a given seed, the order of scenarios is constant, i.e. if step A runs
|
13
|
+
before step B, it will always run before step B even if other steps are
|
14
|
+
skipped.
|
15
|
+
|
12
16
|
Background:
|
13
|
-
Given a file named "features/
|
17
|
+
Given a file named "features/bad_practice_part_1.feature" with:
|
14
18
|
"""
|
15
|
-
Feature: Bad practice
|
19
|
+
Feature: Bad practice, part 1
|
16
20
|
|
17
21
|
Scenario: Set state
|
18
22
|
Given I set some state
|
19
23
|
|
20
|
-
Scenario: Depend on state
|
24
|
+
Scenario: Depend on state from a preceding scenario
|
25
|
+
When I depend on the state
|
26
|
+
"""
|
27
|
+
And a file named "features/bad_practice_part_2.feature" with:
|
28
|
+
"""
|
29
|
+
Feature: Bad practice, part 2
|
30
|
+
|
31
|
+
Scenario: Depend on state from a preceding feature
|
21
32
|
When I depend on the state
|
22
33
|
"""
|
34
|
+
And a file named "features/unrelated.feature" with:
|
35
|
+
"""
|
36
|
+
Feature: Unrelated
|
37
|
+
|
38
|
+
@skipme
|
39
|
+
Scenario: Do something unrelated
|
40
|
+
When I do something
|
41
|
+
"""
|
23
42
|
And a file named "features/step_definitions/steps.rb" with:
|
24
43
|
"""
|
25
44
|
Given(/^I set some state$/) do
|
@@ -29,6 +48,9 @@ Feature: Randomize
|
|
29
48
|
Given(/^I depend on the state$/) do
|
30
49
|
raise "I expect the state to be set!" unless $global_state == "set"
|
31
50
|
end
|
51
|
+
|
52
|
+
Given(/^I do something$/) do
|
53
|
+
end
|
32
54
|
"""
|
33
55
|
|
34
56
|
Scenario: Run scenarios in order
|
@@ -37,28 +59,82 @@ Feature: Randomize
|
|
37
59
|
|
38
60
|
@spawn
|
39
61
|
Scenario: Run scenarios randomized
|
40
|
-
When I run `cucumber --order random:
|
62
|
+
When I run `cucumber --order random:41544 -q`
|
41
63
|
Then it should fail
|
42
64
|
And the stdout should contain exactly:
|
43
65
|
"""
|
44
|
-
Feature: Bad practice
|
45
|
-
|
46
|
-
Scenario: Depend on state
|
66
|
+
Feature: Bad practice, part 1
|
67
|
+
|
68
|
+
Scenario: Depend on state from a preceding scenario
|
47
69
|
When I depend on the state
|
48
70
|
I expect the state to be set! (RuntimeError)
|
49
71
|
./features/step_definitions/steps.rb:6:in `/^I depend on the state$/'
|
50
|
-
features/
|
72
|
+
features/bad_practice_part_1.feature:7:in `When I depend on the state'
|
73
|
+
|
74
|
+
Feature: Unrelated
|
75
|
+
|
76
|
+
@skipme
|
77
|
+
Scenario: Do something unrelated
|
78
|
+
When I do something
|
79
|
+
|
80
|
+
Feature: Bad practice, part 2
|
81
|
+
|
82
|
+
Scenario: Depend on state from a preceding feature
|
83
|
+
When I depend on the state
|
84
|
+
I expect the state to be set! (RuntimeError)
|
85
|
+
./features/step_definitions/steps.rb:6:in `/^I depend on the state$/'
|
86
|
+
features/bad_practice_part_2.feature:4:in `When I depend on the state'
|
87
|
+
|
88
|
+
Feature: Bad practice, part 1
|
51
89
|
|
52
90
|
Scenario: Set state
|
53
91
|
Given I set some state
|
54
92
|
|
55
93
|
Failing Scenarios:
|
56
|
-
cucumber features/
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
94
|
+
cucumber features/bad_practice_part_1.feature:6
|
95
|
+
cucumber features/bad_practice_part_2.feature:3
|
96
|
+
|
97
|
+
4 scenarios (2 failed, 2 passed)
|
98
|
+
4 steps (2 failed, 2 passed)
|
99
|
+
|
100
|
+
Randomized with seed 41544
|
101
|
+
|
102
|
+
"""
|
103
|
+
|
104
|
+
@spawn
|
105
|
+
Scenario: Run scenarios randomized with some skipped
|
106
|
+
When I run `cucumber --tags ~@skipme --order random:41544 -q`
|
107
|
+
Then it should fail
|
108
|
+
And the stdout should contain exactly:
|
63
109
|
"""
|
110
|
+
Feature: Bad practice, part 1
|
111
|
+
|
112
|
+
Scenario: Depend on state from a preceding scenario
|
113
|
+
When I depend on the state
|
114
|
+
I expect the state to be set! (RuntimeError)
|
115
|
+
./features/step_definitions/steps.rb:6:in `/^I depend on the state$/'
|
116
|
+
features/bad_practice_part_1.feature:7:in `When I depend on the state'
|
117
|
+
|
118
|
+
Feature: Bad practice, part 2
|
119
|
+
|
120
|
+
Scenario: Depend on state from a preceding feature
|
121
|
+
When I depend on the state
|
122
|
+
I expect the state to be set! (RuntimeError)
|
123
|
+
./features/step_definitions/steps.rb:6:in `/^I depend on the state$/'
|
124
|
+
features/bad_practice_part_2.feature:4:in `When I depend on the state'
|
125
|
+
|
126
|
+
Feature: Bad practice, part 1
|
127
|
+
|
128
|
+
Scenario: Set state
|
129
|
+
Given I set some state
|
130
|
+
|
131
|
+
Failing Scenarios:
|
132
|
+
cucumber features/bad_practice_part_1.feature:6
|
133
|
+
cucumber features/bad_practice_part_2.feature:3
|
64
134
|
|
135
|
+
3 scenarios (2 failed, 1 passed)
|
136
|
+
3 steps (2 failed, 1 passed)
|
137
|
+
|
138
|
+
Randomized with seed 41544
|
139
|
+
|
140
|
+
"""
|
@@ -0,0 +1,32 @@
|
|
1
|
+
@wip
|
2
|
+
Feature: Retry failing tests
|
3
|
+
|
4
|
+
Retry gives you a way to get through flaky tests that usually pass after a few runs.
|
5
|
+
This gives a development team a way forward other than disabling a valuable test.
|
6
|
+
|
7
|
+
- Specify max retry count in option
|
8
|
+
- Output information to the screen
|
9
|
+
- Output retry information in test report
|
10
|
+
|
11
|
+
Questions:
|
12
|
+
use a tag for flaky tests? Global option to retry any test that fails?
|
13
|
+
|
14
|
+
Background:
|
15
|
+
Given a scenario "Flakey" that fails once, then passes
|
16
|
+
And a scenario "Shakey" that fails twice, then passes
|
17
|
+
And a scenario "Solid" that passes
|
18
|
+
And a scenario "No Dice" that fails
|
19
|
+
|
20
|
+
Scenario:
|
21
|
+
When I run `cucumber -q --retry 1`
|
22
|
+
Then it should fail with:
|
23
|
+
"""
|
24
|
+
4 scenarios (2 passed, 2 failed)
|
25
|
+
"""
|
26
|
+
|
27
|
+
Scenario:
|
28
|
+
When I run `cucumber -q --retry 2`
|
29
|
+
Then it should pass with:
|
30
|
+
"""
|
31
|
+
4 scenarios (3 passed, 1 failed)
|
32
|
+
"""
|