forked from pytest-dev/pytest-bdd
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from elchupanebrej/feature/self_descripting_g…
…herkin Add example of Cucumber ndjson report usage
- Loading branch information
Showing
4 changed files
with
56 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Feature: NDJson could be produced on the feature run | ||
Scenario: | ||
Given File "Passing.feature" with content: | ||
"""gherkin | ||
Feature: Passing feature | ||
Scenario: Passing scenario | ||
Given Passing step | ||
""" | ||
And File "conftest.py" with content: | ||
"""python | ||
from pytest_bdd import step | ||
collect_ignore_glob = ["*.lock"] # Workaround to allow launch this test under Gherkin itself | ||
@step('Passing step') | ||
def _(): | ||
... | ||
""" | ||
When run pytest | ||
|cli_args |--messagesndjson|out.ndjson| | ||
Then File "out.ndjson" has "15" lines | ||
Then Report "out.ndjson" parsable into messages |
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