pytest-dev / pytest-bdd

BDD library for the pytest runner
https://pytest-bdd.readthedocs.io/en/latest/
MIT License
1.31k stars 220 forks source link

Make pytest-bdd fail if it finds an orphan scenario #141

Closed learner010 closed 9 years ago

learner010 commented 9 years ago

Is it possible to make pytest-bdd fail the test if there is a scenario which does not have corresponding test?

Could be useful when the features are specified by stakeholders. It would prompt the developer that new feature has been added and needs to be implemented.

bubenkoff commented 9 years ago

can't you just use scenarios shortcut?

olegpidsadnyi commented 9 years ago

Yes, it should fail if there are steps that are not implemented if you use scenarios() to include your feature files. If you really need something on purpose you could use generation functionality. See generation._show_missing_code_main

learner010 commented 9 years ago

yup, tried it. Works as expected. Thanx :)