1.Install pycharm editor
2.Introduction and Project setup
ADD FOLDER BBD_PYTEST under automation folder
ADD FEATURE FOLDER (myfeature)
3.Writing feature files
create my featurefile named as feature101.feature
4.install pytest bdd
settings -> plugin -> gherkin
5.writing first test
create a file with pytestbdd.py
import pytest bdd by pip install pytestbdd in terminal
venv c:pythonworkspace\pytest-automation\pip install pytest_bdd
import the feature file through the below code
6.writing second test
with all the feature using decorators ,global variables asst condition
7.Debugging and troubleshooting
run the test using pytest right click and run pytest
8.checkout result in terminal
9.so all the assert condition were passed
pytest bdd py program executed
please find link attached for reference
Comments