NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2255 most downloaded on PyPI
BDD for pytest
Last release 4 days ago
30 Sep 2026
Ships unpredictably
gaps range from 2 weeks to 1.8 years
Nearly every release is documented
notes for 55 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
107 releases · first in 2013
Injecting a target_fixture no longer emits PytestRemovedIn10Warning on pytest 9.1+, which deprecated passing nodeid to _register_fixture. #823 _
Relaxed gherkin-official dependency requirement to >=29.0.0 to allow for newer versions of the gherkin-official package.
Excluded gherkin-official 31.0.0 and 32.0.0, which crash with StopIteration when parsing empty descriptions (fixed upstream in 32.0.1).
The --gherkin-terminal-reporter incompatibility errors (with another terminal reporter or with xdist) are now raised as pytest.UsageError instead of a bare Exception.
Dropped support for python 3.9 (end-of-life, and its locked dev dependencies had unfixable security alerts). Supported python versions: 3.10, 3.11, 3.12, 3.13, 3.14.
The following private attributes are not available anymore (#658): * _pytest.reports.TestReport.scenario; replaced by pytest_bdd.reporting.test_report_context WeakKeyDictionary (internal use) * __scenario__ attribute of test functions generated by the @scenario (and @scenarios) decorator; replaced by pytest_bdd.scenario.scenario_wrapper_template_registry WeakKeyDictionary (internal use) * _pytest.nodes.Item.__scenario_report__; replaced by pytest_bdd.reporting.scenario_reports_registry WeakKeyDictionary (internal use) * _pytest_bdd_step_context attribute of internal test function markers; replaced by pytest_bdd.steps.step_function_context_registry WeakKeyDictionary (internal use)
Backslashes in datatable and examples table cells are no longer over-quoted. A cell containing a single backslash now reaches the step as a single backslash, matching the Gherkin escaping rules. If you compensated by doubling backslashes in feature files, undo that. #769
Made type annotations stronger and removed most of the typing.Any usages and # type: ignore annotations. #658
Empty docstrings are now correctly forwarded to step functions as an empty string instead of being silently dropped, which previously caused pytest to report a missing docstring fixture. #809
Injecting a target_fixture no longer emits PytestRemovedIn10Warning on pytest 9.1+, which deprecated passing nodeid to _register_fixture. #823
One column per quarter.
Step arguments "datatable" and "docstring" are now reserved, and they can't be used as step argument names. An error is raised if a step parser uses t
Step arguments "datatable" and "docstring" are now reserved, and they can't be used as step argument names. An error is raised if a step parser uses these names.
Scenario description field is now set for Cucumber JSON output.
Fixed an issue with the upcoming pytest release related to the use of @pytest.mark.usefixtures with an empty list.
Render template variables in docstrings and datatable cells with example table entries, as we already do for steps definitions.
Gherkin keyword aliases can now be used and correctly reported in json and terminal output (see Keywords _ for permitted list).
Gherkin keyword aliases can now be used and correctly reported in json and terminal output (see Keywords for permitted list).
Added localization support. The language of the feature file can be specified using the # language: <language> directive at the beginning of the file.
Rule keyword can be used in feature files (see Rule)
Added support for multiple example tables
Added filtering by tags against example tables
Since the 7.x series: * Tags can now be on multiple lines (stacked) * Continuation of steps using asterisks (*) instead of And/But supported. * Added datatable argument for steps that contain a datatable (see Data Tables). * Added docstring argument for steps that contain a docstring (see Doc Strings).
Changelog format updated to follow Keep a Changelog.
Text after the # character is no longer stripped from the Scenario and Feature name.
Since the 7.x series:
Use the gherkin-official parser, replacing the custom parsing logic. This will make pytest-bdd more compatible with the Gherkin specification.
Multiline steps must now always use triple-quotes for the additional lines.
All feature files must now use the keyword Feature: to be considered valid.
Tags can no longer have spaces (e.g. @tag one and @tag two are no longer valid).
Text after the # character is no longer stripped from the Step name.
Multiline strings no longer match name based on multiple lines - only on the actual step text on the step line.
Dropped support for python 3.8. Supported python versions: 3.9, 3.10, 3.11, 3.12, 3.13.
Since the 7.x series:
Drop compatibility with pytest < 7.0.0.
Since the 7.x series:
Updated documentation to clarify that --gherkin-terminal-reporter needs to be used with -v or -vv.
Updated documentation to clarify that --gherkin-terminal-reporter needs to be used with -v or -vv.
Updated documentation to clarify that --gherkin-terminal-reporter needs to be used with -v or -vv.
Drop compatibility with pytest < 7.0.0.
Continuation of steps using asterisks instead of And/But supported.
Added datatable argument for steps that contain a datatable (see Data Tables).
Added docstring argument for steps that contain a docstring (see Doc Strings).
Multiline strings no longer match name based on multiple lines - only on the actual step text on the step line.
Bump version to 8.0.0b1
Bump version to 8.0.0b1
Use the gherkin-official parser, replacing the custom parsing logic. This will make pytest-bdd more compatible with the Gherkin specification.
Multiline steps must now always use triple-quotes for the additional lines.
All feature files must now use the keyword Feature: to be considered valid.
Tags can no longer have spaces (e.g. @tag one and @tag two are no longer valid).
Tags can now be on multiple lines (stacked)
Text after the # character is no longer stripped from the Step name.
Fix an issue when only the first Step would inject a fixture, while later steps would not be able to.
Fix an issue when only the first Step would inject a fixture, while later steps would not be able to.
Test against the latest versions of pytest (8.2, 8.3).
Bump version 7.2.0, add changelog entry
Bump version 7.2.0, add changelog entry
Fix compatibility issue with Python 3.13.
Declare compatibility with Python 3.13.
Address another compatibility issue with pytest 8.1 (fixture registration). #680 _
Address another compatibility issue with pytest 8.1 (fixture registration). #680
Address a bug introduced in pytest-bdd 7.1 caused by incorrect pytest version check.
Address a bug introduced in pytest-bdd 7.1 caused by incorrect pytest version check.
Address compatibility issue with pytest 8.1. #666 _
Address compatibility issue with pytest 8.1. #666
Fix errors occurring if pytest_unconfigure is called before pytest_configure. #362 _ #641 _
⚠️ Backwards incompatible: - parsers.re now does a fullmatch _ instead of a partial match. This is to make it work just like the other parsers, since…
⚠️ Backwards incompatible: - parsers.re now does a fullmatch instead of a partial match. This is to make it work just like the other parsers, since they don't ignore non-matching characters at the end of the string. #539
Drop python 3.7 compatibility, as it's no longer supported. #627
Declare official support for python 3.12 #628
Improve parser performance by 15% #623 by @dcendents
Add support for Scenarios and Scenario Outlines to have descriptions. #600
Fix regression introduced in version 6.1.0 where the pytest_bdd_after_scenario hook would be called after every step instead of after the scenario. #5
Fix regression introduced in version 6.1.0 where the pytest_bdd_after_scenario hook would be called after every step instead of after the scenario. #577
Using modern way to specify hook options to avoid deprecation warnings with pytest >=7.2.
Fix bug where steps without parsers would take precedence over steps with parsers. #534
Step functions can now be decorated multiple times with @given, @when, @then. Previously every decorator would override converters and target_fixture every at every application. #534 #544 #525
Require pytest>=6.2 #534
Using modern way to specify hook options to avoid deprecation warnings with pytest >=7.2.
Add generic step decorator that will be used for all kind of steps #548
Add stacklevel param to given, when, then, step decorators. This allows for programmatic step generation #548
Hide pytest-bdd internal method in user tracebacks #557.
Configuration option bdd_features_base_dir is interpreted as relative to the pytest root directory (previously it was relative to the current working directory). #573
Fix regression introduced in 6.0.0 where a step function decorated multiple using a parsers times would not be executed correctly. #530 _ #528 _
This release introduces breaking changes in order to be more in line with the official gherkin specification.
This release introduces breaking changes in order to be more in line with the official gherkin specification.
Cleanup of the documentation and tests related to parametrization (elchupanebrej) #469
Removed feature level examples for the gherkin compatibility (olegpidsadnyi) #490
Removed vertical examples for the gherkin compatibility (olegpidsadnyi) #492
Step arguments are no longer fixtures (olegpidsadnyi) #493
Drop support of python 3.6, pytest 4 (elchupanebrej) #495 #504
Step definitions can have "yield" statements again (4.0 release broke it). They will be executed as normal fixtures: code after the yield is executed during teardown of the test. (youtux) #503
Scenario outlines unused example parameter validation is removed (olegpidsadnyi) #499
Add type annotations (youtux) #505
pytest_bdd.parsers.StepParser now is an Abstract Base Class. Subclasses must make sure to implement the abstract methods. (youtux) #505
Angular brackets in step definitions are only parsed in "Scenario Outline" (previously they were parsed also in normal "Scenario"s) (youtux) #524.
This release introduces breaking changes, please refer to the Migration from 4.x.x.
This release introduces breaking changes, please refer to the Migration from 4.x.x.
Rewrite the logic to parse Examples for Scenario Outlines. Now the substitution of the examples is done during the parsing of Gherkin feature files. You won't need to define the steps twice like @given("there are <start> cucumbers") and @given(parsers.parse("there are {start} cucumbers")). The latter will be enough.
Removed example_converters from scenario(...) signature. You should now use just the converters parameter for given, when, then.
Removed --cucumberjson-expanded and --cucumber-json-expanded options. Now the JSON report is always expanded.
Removed --gherkin-terminal-reporter-expanded option. Now the terminal report is always expanded.
when and then steps now can provide a target_fixture, just like given does. Discussion at https://github.com/pytest-dev/pytest-bdd/issues/402.
when and then steps now can provide a target_fixture, just like given does. Discussion at https://github.com/pytest-dev/pytest-bdd/issues/402.
Drop compatibility for python 2 and officially support only python >= 3.6.
Fix error when using --cucumber-json-expanded in combination with example_converters (marcbrossaissogeti).
Fix --generate-missing not correctly recognizing steps with parsers
Fix a bug that prevents using comments in the Examples: section. (youtux)
Fix a bug that prevents using comments in the Examples: section. (youtux)
Fixed performance regression introduced in 4.0.0 where collection time of tests would take way longer than before. (youtux)
Fixed performance regression introduced in 4.0.0 where collection time of tests would take way longer than before. (youtux)
This release introduces breaking changes, please refer to the Migration from 3.x.x.
This release introduces breaking changes, please refer to the Migration from 3.x.x.
Strict Gherkin option is removed (@scenario() does not accept the strict_gherkin parameter). (olegpidsadnyi)
@scenario() does not accept the undocumented parameter caller_module anymore. (youtux)
Given step is no longer a fixture. The scope parameter is also removed. (olegpidsadnyi)
Fixture parameter is removed from the given step declaration. (olegpidsadnyi)
pytest_bdd_step_validation_error hook is removed. (olegpidsadnyi)
Fix an error with pytest-pylint plugin #374. (toracle)
Fix pytest-xdist 2.0 compatibility #369. (olegpidsadnyi)
Fix compatibility with pytest 6 --import-mode=importlib option. (youtux)
Parse multiline steps according to the gherkin specification #365.
Parse multiline steps according to the gherkin specification #365.
Fix pytest --generate-missing functionality being broken.
Drop support for pytest < 4.3.
Fix a Python 4.0 bug.
Fix pytest --generate-missing functionality being broken.
Fix problematic missing step definition from strings containing quotes.
Implement parsing escaped pipe characters in outline parameters (Mark90) #337.
Disable the strict Gherkin validation in the steps generation (v-buriak) #356.
Fix regression introduced in 3.2.0 where pytest-bdd would break in presence of test items that are not functions.
Fix regression introduced in 3.2.0 where pytest-bdd would break in presence of test items that are not functions.
Remove code that rewrites code. This should help with the maintenance of this project and make debugging easier.
Fix Python 3.8 support
Remove code that rewrites code. This should help with the maintenance of this project and make debugging easier.
Nothing published for this version
Allow unicode string in @given() step names when using python2. This makes the transition of projects from python 2 to 3 easier.
Allow unicode string in @given() step names when using python2. This makes the transition of projects from python 2 to 3 easier.
@given(...) no longer accepts regex objects. It was deprecated long ago.
Drop support for pytest < 3.3.2.
Step definitions generated by $ pytest-bdd generate will now raise NotImplementedError by default.
@given(...) no longer accepts regex objects. It was deprecated long ago.
Improve project testing by treating warnings as exceptions.
pytest_bdd_step_validation_error will now always receive step_func_args as defined in the signature.
Add compatibility with pytest 4.2 (sliwinski-milosz) #288.
Add compatibility with pytest 4.2 (sliwinski-milosz) #288.
Minimal supported version of pytest is now 2.9.0 as lower versions do not support bool type ini options (sliwinski-milosz) #260
Minimal supported version of pytest is now 2.9.0 as lower versions do not support bool type ini options (sliwinski-milosz) #260
Fix RemovedInPytest4Warning warnings (sliwinski-milosz) #261.
Fixtures pytestbdd_feature_base_dir and pytestbdd_strict_gherkin have been removed. Check the Migration of your tests from versions 2.x.x _ for more i
Fixtures pytestbdd_feature_base_dir and pytestbdd_strict_gherkin have been removed. Check the Migration of your tests from versions 2.x.x for more information (sliwinski-milosz) #255
Fix step definitions not being found when using parsers or converters after a change in pytest (youtux) #257
Gherkin terminal reporter expanded format (pauk-slon)
Gherkin terminal reporter expanded format (pauk-slon)
Added support for But steps (olegpidsadnyi)
Added support for But steps (olegpidsadnyi)
Fixed compatibility with pytest 3.3.2 (olegpidsadnyi)
MInimal required version of pytest is now 2.8.1 since it doesn't support earlier versions (olegpidsadnyi)
Added --cucumber-json-expanded option for explicit selection of expanded format (mjholtkamp)
Added --cucumber-json-expanded option for explicit selection of expanded format (mjholtkamp)
Step names are filled in when --cucumber-json-expanded is used (mjholtkamp)
Fix check for out section steps definitions for no strict gherkin feature
Fix check for out section steps definitions for no strict gherkin feature
Relay fixture results to recursive call of 'get_features' (coddingtonbear)
Relay fixture results to recursive call of 'get_features' (coddingtonbear)
Add gherkin terminal reporter (spinus + thedrow)
Add gherkin terminal reporter (spinus + thedrow)
- Add support for pytest 3.0
Add support for pytest 3.0
Fix FixtureDef signature for newer pytest versions (The-Compiler)
Fix FixtureDef signature for newer pytest versions (The-Compiler)
Better error explanation for the steps defined outside of scenarios (olegpidsadnyi)
Add a pytest_bdd_apply_tag hook to customize handling of tags (The-Compiler)
Allow spaces in tag names. This can be useful when using the pytest_bdd_apply_tag hook with tags like @xfail: Some reason.
Cleaned up hooks of the plugin (olegpidsadnyi)
Cleaned up hooks of the plugin (olegpidsadnyi)
Fixed report serialization (olegpidsadnyi)
Fixed deprecation warnings with pytest 2.8 (The-Compiler)
Fixed deprecation warnings with pytest 2.8 (The-Compiler)
Fixed deprecation warnings with Python 3.5 (The-Compiler)
Add examples data in the scenario report (bubenkoff)
Add examples data in the scenario report (bubenkoff)
Properly parse feature description (bubenkoff)
Properly parse feature description (bubenkoff)
Nothing published for this version
Avoid potentially random collection order for xdist compartibility (bubenkoff)
Avoid potentially random collection order for xdist compartibility (bubenkoff)
Nothing published for this version
Pass additional arguments to parsers (bubenkoff)
Pass additional arguments to parsers (bubenkoff)
Add validation check which prevents having multiple features in a single feature file (bubenkoff)
Add validation check which prevents having multiple features in a single feature file (bubenkoff)
Allow mixing feature example table with scenario example table (bubenkoff, olegpidsadnyi)
Allow mixing feature example table with scenario example table (bubenkoff, olegpidsadnyi)
Feature example table (bubenkoff, sureshvv)
Feature example table (bubenkoff, sureshvv)
Make it possible to relax strict Gherkin scenario validation (bubenkoff)
Make it possible to relax strict Gherkin scenario validation (bubenkoff)
Nothing published for this version
Nothing published for this version
Fix minimal six version (bubenkoff, dustinfarris)
Fix minimal six version (bubenkoff, dustinfarris)
Nothing published for this version
Mention step type on step definition not found errors and in code generation (bubenkoff, lrowe)
Mention step type on step definition not found errors and in code generation (bubenkoff, lrowe)
Prefix step definition fixture names to avoid name collisions (bubenkoff, lrowe)
Prefix step definition fixture names to avoid name collisions (bubenkoff, lrowe)
Make feature and scenario tags to be fully compartible with pytest markers (bubenkoff, kevinastone)
Make feature and scenario tags to be fully compartible with pytest markers (bubenkoff, kevinastone)
Fixed FeatureError string representation to correctly support python3 (bubenkoff, lrowe)
Fixed FeatureError string representation to correctly support python3 (bubenkoff, lrowe)
Added possibility to inject fixtures from given keywords (bubenkoff)
Added possibility to inject fixtures from given keywords (bubenkoff)
Your coding agent can read these notes before it upgrades. Set up the MCP server →