This is a BDD Test Automation framework written in Python and Selenium. It generates html reports using Allure. This framework uses behave
module for BDD tests.
- SeleniumPythonBDD
- features - contains all BDD feature files.
- pages - contains all page objects.
- steps - contains step definitions.
- environment.py contains web driver manager.
# Install pip
python -m pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
python -m behave -Dbrowser=chrome -f allure -o ./reports/allure-result
python -m behave -D browser=chrome -DgridUrl=http://<IP Address of Grid>:4444 -f allure -o ./reports/allure-result
-DgridUrl argument is required only to run the tests on Selenium Grid.
-Dbrowser argument can only contain value from one of the these values (chrome, firefox, edge)
docker build -t pranavkakde/seleniumframeworkpython .
docker run --name seleniumpy-test-run pranavkakde/seleniumframeworkpython:latest -Dbrowser=firefox -f allure -o /app/reports/allure-result
docker run --name seleniumpy-test-run pranavkakde/seleniumframeworkpython:latest -Dbrowser=firefox -DgridUrl=http://<IP Address of Grid>:4444 -f allure -o /app/reports/allure-result
docker cp seleniumpy-test-run:/app/reports/allure-result ./reports
http://<IP address of docker host>:5252/allure-docker-service-ui/projects/default
Pre-requisite - Install Docker Desktop
For setting up selenium grid using docker run;
docker-compose -f docker-compose-grid.yaml -p selenium-grid-python up -d
Selenium Grid Url
http://<IP Address of docker host>:4444
- Start Allure docker containers
docker-compose -f docker-compose-allure.yaml -p allure-report up -d
- View Allure reports
http://<IP Address of docker host>:5252/allure-docker-service-ui/projects/default