pytest-dev / pytest-bdd

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

Add instructions to documentation on how to run tests with pytest-bdd #639

Open k2m30 opened 8 months ago

k2m30 commented 8 months ago

I am not the only one struggling with it. Here is Stackoverflow discussion started almost five years ago and still haven't solved.

jzohrab commented 8 months ago

I agree that a simple note in the readthedocs would help. The readme in this repo has an example.

Define your step definitions in a test_xxxx.py file, and your feature file somewhere, with a reference to that file in your step defs. Then when your run pytest, it will pick up the test and run it just like the others.