-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start getting acceptance tests for retry working
There's a puzzle here with the output on the second scenario, with two retries. I've detailed what I think the summary should be, but there seems to be a passing scenario missing from the results totals. Did I make a mistake, or is the code still wrong?
- Loading branch information
Showing
3 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,52 @@ | ||
@wip | ||
Feature: Retry failing tests | ||
|
||
Retry gives you a way to get through flaky tests that usually pass after a few runs. | ||
This gives a development team a way forward other than disabling a valuable test. | ||
|
||
- Specify max retry count in option | ||
- Output information to the screen | ||
- Output retry information in test report | ||
|
||
Questions: | ||
use a tag for flaky tests? Global option to retry any test that fails? | ||
|
||
Background: | ||
Given a scenario "Flakey" that fails once, then passes | ||
And a scenario "Shakey" that fails twice, then passes | ||
And a scenario "Solid" that passes | ||
And a scenario "No Dice" that fails | ||
|
||
Scenario: | ||
|
||
@wip | ||
Scenario: Retry once, so Flakey starts to pass | ||
When I run `cucumber -q --retry 1` | ||
Then it should fail with: | ||
""" | ||
4 scenarios (2 passed, 2 failed) | ||
7 scenarios (5 failed, 2 passed) | ||
""" | ||
|
||
Scenario: | ||
@wip | ||
Scenario: Retry twice, so Shakey starts to pass too | ||
|
||
First try: | ||
Flacey x | ||
Shakey x | ||
Solid ✔︎ | ||
No Dice x | ||
=> 4 scenarios (1 passed, 3 failed) | ||
|
||
First retry: | ||
Flakey ✔︎ | ||
Shakey x | ||
No Dice x | ||
=> 7 scenarios (2 passed, 5 failed) | ||
|
||
Second retry: | ||
Shakey ✔︎ | ||
No Dice x | ||
=> 9 scenarios (3 passed, 6 failed) | ||
|
||
When I run `cucumber -q --retry 2` | ||
Then it should pass with: | ||
Then it should fail with: | ||
""" | ||
9 scenarios (6 failed, 3 passed) | ||
""" | ||
4 scenarios (3 passed, 1 failed) | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters