1
- BDD library for the py.test runner
2
- ==================================
1
+ BDD library for the pytest runner
2
+ =================================
3
3
4
4
.. image :: http://img.shields.io/pypi/v/pytest-bdd.svg
5
5
:target: https://pypi.python.org/pypi/pytest-bdd
@@ -730,7 +730,7 @@ scenario test, so we can use standard test selection:
730
730
731
731
.. code-block :: bash
732
732
733
- py.test -m " backend and login and successful"
733
+ pytest -m " backend and login and successful"
734
734
735
735
The feature and scenario markers are not different from standard pytest markers, and the `@ ` symbol is stripped out
736
736
automatically to allow test selector expressions. If you want to have bdd-related tags to be distinguishable from the
@@ -739,7 +739,7 @@ Note that if you use pytest `--strict` option, all bdd tags mentioned in the fea
739
739
`markers ` setting of the `pytest.ini ` config. Also for tags please use names which are python-compartible variable
740
740
names, eg starts with a non-number, underscore alphanumberic, etc. That way you can safely use tags for tests filtering.
741
741
742
- You can customize how hooks are converted to pytest marks by implementing the
742
+ You can customize how tags are converted to pytest marks by implementing the
743
743
``pytest_bdd_apply_tag `` hook and returning ``True `` from it:
744
744
745
745
.. code-block :: python
@@ -1084,27 +1084,27 @@ To have an output in json format:
1084
1084
1085
1085
::
1086
1086
1087
- py.test --cucumberjson=<path to json report>
1087
+ pytest --cucumberjson=<path to json report>
1088
1088
1089
1089
This will output an expanded (meaning scenario outlines will be expanded to several scenarios) cucumber format.
1090
1090
To also fill in parameters in the step name, you have to explicitly tell pytest-bdd to use the expanded format:
1091
1091
1092
1092
::
1093
1093
1094
- py.test --cucumberjson=<path to json report> --cucumberjson-expanded
1094
+ pytest --cucumberjson=<path to json report> --cucumberjson-expanded
1095
1095
1096
1096
To enable gherkin-formatted output on terminal, use
1097
1097
1098
1098
::
1099
1099
1100
- py.test --gherkin-terminal-reporter
1100
+ pytest --gherkin-terminal-reporter
1101
1101
1102
1102
1103
1103
Terminal reporter supports expanded format as well
1104
1104
1105
1105
::
1106
1106
1107
- py.test --gherkin-terminal-reporter-expanded
1107
+ pytest --gherkin-terminal-reporter-expanded
1108
1108
1109
1109
1110
1110
@@ -1136,7 +1136,7 @@ test execution. The code suggestion tool is called via passing additional pytest
1136
1136
1137
1137
::
1138
1138
1139
- py.test --generate-missing --feature features tests/functional
1139
+ pytest --generate-missing --feature features tests/functional
1140
1140
1141
1141
The output will be like:
1142
1142
0 commit comments