Skip to content

Commit

Permalink
Add simplest scenario example to Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
elchupanebrej committed Nov 4, 2024
1 parent e74de6f commit 96163b2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ Unreleased
----------
- Implement support of `Markdown <https://github.com/cucumber/gherkin/blob/main/MARKDOWN_WITH_GHERKIN.md>`_ using js based parser
- Update versions:

- Drop python 3.8
- Add python 3.13
- Drop pytest<5.2

- Added dummy html reporter
- Fixed pytest.ini option "disable_feature_autoload"
- Improved fixture injection by adding seamless fixtures on plugin/module collection
Expand Down
36 changes: 33 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,51 @@ Install pytest-bdd-ng
pip install pytest-bdd-ng
Install extra packages for parsing Markdown defined features
############################################################
Packages for parsing Markdown defined features
##############################################

.. code-block:: console
npm install @cucumber/gherkin
Install extra packages for reporting
Packages for reporting
####################################

.. code-block:: console
npm install @cucumber/html-formatter
TLDR;
-----

.. code-block:: gherkin
Feature: Simplest example
Scenario:
# https://cucumber.io/docs/gherkin/reference/
Given File "Passing.feature" with content:
"""gherkin
Feature: Passing feature
Scenario: Passing scenario
* Passing step
"""
# https://docs.pytest.org/en/stable/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files
And File "conftest.py" with content:
"""python
from pytest_bdd import step
@step('Passing step')
def _():
...
"""
# https://docs.pytest.org/en/stable/how-to/usage.html
When run pytest
Then pytest outcome must contain tests with statuses:
|passed|
| 1|
Project layout
--------------
**pytest-bdd-ng** automatically collects ``*.feature`` files from pytest_ tests directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/include.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.. include:: features.rst
.. include:: ../DOCUMENTATION.rst
.. include:: ../AUTHORS.rst
.. include:: ../CHANGES.rst
.. include:: ../LICENSE.rst
.. include:: ../CHANGES.rst

0 comments on commit 96163b2

Please sign in to comment.