pytest-dev / pytest-bdd

BDD library for the py.test runner
https://pytest-bdd.readthedocs.io/en/latest/
MIT License
1.3k stars 219 forks source link

Custom BDD Steps are not found using Scenario Outline anymore #624

Closed MihaiDorelRus closed 1 year ago

MihaiDorelRus commented 1 year ago

Hello,

We have identified an issue with pytest-bdd since version 6.1.0. If we have custom BDD steps defined in a .py file, then we use scenario({feature_file_name}.feature) to import the feature files, these steps are NOT FOUND for Scenario Outlines anymore, but they are working fine with Scenario.

This issue was not reproducible in the previous versions of 6.1.0.

Is there a breaking change that has been added and we need to change something or is this a bug?

Thanks.

youtux commented 1 year ago

hi, yes, we changed the parsing of scenario outlines: https://pytest-bdd.readthedocs.io/en/stable/#variable-templates-in-steps-are-only-parsed-for-scenario-outlines

You can follow the new example on how to write steps for Scenario Outlines: https://pytest-bdd.readthedocs.io/en/stable/#scenario-outlines