| 1 |
@issue |
| 2 |
@mistaken |
| 3 |
Feature: Issue 573 Select scenarios fails with empty Scenarios |
| 4 |
|
| 5 |
@setup |
| 6 |
Scenario: Test Setup |
| 7 |
Given a new working directory |
| 8 |
And a file named "features/steps/steps.py" with: |
| 9 |
""" |
| 10 |
from behave import step |
| 11 |
|
| 12 |
@step('a step passes') |
| 13 |
def step_passes(context): |
| 14 |
pass |
| 15 |
""" |
| 16 |
And a file named "features/syndrome.feature" with: |
| 17 |
""" |
| 18 |
Feature: Alice |
| 19 |
Scenario: Empty (no steps) |
| 20 |
|
| 21 |
Scenario: Not Empty (with steps) |
| 22 |
When a step passes |
| 23 |
""" |
| 24 |
And a file named "behave.ini" with: |
| 25 |
""" |
| 26 |
[behave] |
| 27 |
show_skipped = false |
| 28 |
show_timings = false |
| 29 |
""" |
| 30 |
|
| 31 |
Scenario: Select scenarios by name in dry-run mode |
| 32 |
When I run "behave -f plain --name="Not Empty \(with steps\)" --dry-run features/" |
| 33 |
Then the command output should contain: |
| 34 |
""" |
| 35 |
Feature: Alice |
| 36 |
Scenario: Not Empty (with steps) |
| 37 |
When a step passes ... untested |
| 38 |
""" |
| 39 |
And it should pass with: |
| 40 |
""" |
| 41 |
0 features passed, 0 failed, 0 skipped, 1 untested |
| 42 |
0 scenarios passed, 0 failed, 1 skipped, 1 untested |
| 43 |
0 steps passed, 0 failed, 0 skipped, 0 undefined |
| 44 |
""" |
| 45 |
|
| 46 |
Scenario: Select scenarios by name and run them |
| 47 |
When I run "behave -f plain --name="Not Empty \(with steps\)" features/" |
| 48 |
Then the command output should contain: |
| 49 |
""" |
| 50 |
Feature: Alice |
| 51 |
Scenario: Not Empty (with steps) |
| 52 |
When a step passes ... passed |
| 53 |
""" |
| 54 |
And it should pass with: |
| 55 |
""" |
| 56 |
1 feature passed, 0 failed, 0 skipped |
| 57 |
1 scenario passed, 0 failed, 1 skipped |
| 58 |
1 step passed, 0 failed, 0 skipped, 0 undefined |
| 59 |
""" |
| 60 |
|
| 61 |
Scenario: Select scenarios by name with partial name and run them |
| 62 |
When I run "behave -f plain --name="Not Empty" features/" |
| 63 |
Then the command output should contain: |
| 64 |
""" |
| 65 |
Feature: Alice |
| 66 |
Scenario: Not Empty (with steps) |
| 67 |
When a step passes ... passed |
| 68 |
""" |
| 69 |
And it should pass with: |
| 70 |
""" |
| 71 |
1 feature passed, 0 failed, 0 skipped |
| 72 |
1 scenario passed, 0 failed, 1 skipped |
| 73 |
1 step passed, 0 failed, 0 skipped, 0 undefined |
| 74 |
""" |