| 1 |
@issue |
| 2 |
Feature: Issue #172 Junit report file name populated incorrectly when running against a feature file |
| 3 |
|
| 4 |
@setup |
| 5 |
Scenario: Feature Setup |
| 6 |
Given a new working directory |
| 7 |
And a file named "features/steps/steps.py" with: |
| 8 |
""" |
| 9 |
from behave import step |
| 10 |
|
| 11 |
@step('a step passes') |
| 12 |
def step_passes(context): |
| 13 |
pass |
| 14 |
""" |
| 15 |
And a file named "features/feature_in_root_folder.feature" with: |
| 16 |
""" |
| 17 |
Feature: |
| 18 |
Scenario: |
| 19 |
Given a step passes |
| 20 |
""" |
| 21 |
And a file named "features/subfolder/feature_in_subfolder.feature" with: |
| 22 |
""" |
| 23 |
Feature: |
| 24 |
Scenario: |
| 25 |
Given a step passes |
| 26 |
""" |
| 27 |
|
| 28 |
Scenario: Running behave for one feature in root folder |
| 29 |
When I run "behave --junit --junit-directory=test_results features/feature_in_root_folder.feature" |
| 30 |
Then it should pass with: |
| 31 |
""" |
| 32 |
1 feature passed, 0 failed, 0 skipped |
| 33 |
""" |
| 34 |
And a file named "test_results/TESTS-feature_in_root_folder.xml" exists |
| 35 |
|
| 36 |
Scenario: Running behave for one feature in a subfolder |
| 37 |
When I run "behave --junit --junit-directory=test_results features/subfolder/feature_in_subfolder.feature" |
| 38 |
Then it should pass with: |
| 39 |
""" |
| 40 |
1 feature passed, 0 failed, 0 skipped |
| 41 |
""" |
| 42 |
And a file named "test_results/TESTS-subfolder.feature_in_subfolder.xml" exists |
| 43 |
|
| 44 |
Scenario: Running behave for all features |
| 45 |
When I run "behave --junit --junit-directory=test_results" |
| 46 |
Then it should pass with: |
| 47 |
""" |
| 48 |
2 features passed, 0 failed, 0 skipped |
| 49 |
""" |
| 50 |
And a file named "test_results/TESTS-feature_in_root_folder.xml" exists |
| 51 |
And a file named "test_results/TESTS-subfolder.feature_in_subfolder.xml" exists |