- Need to install python (python3 recommended)
- Install IDE (PyCharm recommended)
- Setup python interpreter (I have used 3.11)
- Install Selenium globally, can simply install with PIP command
- Install behave (python framework for BDD) globally, can simply install with PIP command
- Install selenium webDriver. You can use any however I have chromeDriver installed it will run on latest Chrome version
- Add selenium and behave packages in project settings
- Also add allure-report if you want to see report generated
- If you are using windows, I have added run.bat file. Just go to that file and run
- Otherwise, open terminal and enter command "behave", it runs all suites
- Or if you want to run specific suites/features then run command "behave feature/login.feature"
Pre-requisite for this:
You should not have reports files in your directory
You should have installed behave and allure globally
Steps:
- Run the command "behave -f allure_behave.formatter:AllureFormatter -o reports/allure-results/ features";
it first runs all the suites and generates allure-results within reports directory
- Now compile those results to make html report by following command:
"allure generate reports/allure-results -o reports/allure-report --clean"