This is a Python-based QA Automation Framework designed for web application testing using Behave (BDD) and Selenium WebDriver.
It follows a Page Object Model (POM) structure for maintainable and scalable tests, and integrates Allure reports for clear test reporting.
- Behavior-Driven Development (BDD) with Behave.
- Page Object Model (POM) structure for all pages.
- Selenium WebDriver with automatic ChromeDriver management.
- Environment configuration using
.envfiles. - Allure reporting with screenshots on failure.
- Ready for local execution or CI/CD pipelines (Docker, GitHub Actions).
- Configurable headless mode for browser automation.
Project Structure
βββ README.md
βββ requirements.txt
βββ behave.ini
βββ features/
β βββ *.feature # Gherkin scenarios
β βββ steps/ # Step definitions
β βββ environment.py # Hooks for setup/teardown
βββ src/
β βββ pages/ # Page Object Models
βββ utils/
β βββ helpers.py # Utility functions
βββ reports/ # Allure test reports
βββ .github/
β βββ workflows/ # CI/CD pipelines
βββ docker/
βββ Dockerfile
git clone https://github.com/petudeveloper/QA-Automation-Framework.git
cd QA-Automation-Frameworkpython -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windowspip install -r requirements.txtBASE_URL=https://example.com HEADLESS=true
behavebehave -f allure_behave.formatter:AllureFormatter -o reports/allure
allure serve reports/allurebehave features/home.feature- Add a new .feature file under features/.
- Add corresponding step definitions in features/steps/.
- Create or update Page Objects in src/pages/ if needed.
- Use utils/helpers.py for reusable functions (e.g., screenshots, API calls).
- Use Given-When-Then for BDD scenarios.
- Keep Page Objects single responsibility: one class per page.
- Use .env for all configurable parameters.
- Include screenshots on failure to help debugging.
- This project includes a CI/CD pipeline using GitHub Actions.
- The pipeline is automatically triggered on every push or pull request to the
mainbranch.
π View the latest Allure Report
- β Sets up Python and installs dependencies.
- β Runs Behave tests with Allure integration.
- β
Uploads raw Allure results (
reports/allure) as artifacts. - β Generates the Allure HTML report.
- β Publishes the HTML report automatically to GitHub Pages.
This framework integrates with Allure for rich test reporting.
The integration is handled via behave.ini:
[behave]
format = allure_behave.formatter:AllureFormatter
outfiles = reports/allureformatβ runs the Allure formatter.outfiles = reports/allureβ saves Allure raw results into this folder.
Run your tests as usual:
behaveThe results will be stored in reports/allure.
To view the Allure report locally you need Allure CLI:
- macOS (Homebrew):
brew install allure
- Windows (Scoop or Chocolatey):
scoop install allure # or choco install allure - Linux (Debian/Ubuntu):
sudo apt-get install allure # or download from GitHub releases
Then run:
allure serve reports/allureThis will open the interactive Allure dashboard in your browser.
Failed Scenario with Screenshot:

This project includes a CI/CD pipeline using GitHub Actions.
The pipeline is automatically triggered on every push or pull request to the main branch.
- β Sets up Python and installs dependencies.
- β Runs Behave tests with Allure integration.
- β
Uploads raw Allure results (
reports/allure) as artifacts. - β Generates the Allure HTML report.
- β Publishes the HTML report automatically to GitHub Pages.
The configuration is defined in:
.github/workflows/ci.yml
On every push/PR to main:
# 1. Install dependencies
pip install -r requirements.txt
# 2. Run Behave with Allure
behave
# 3. Generate report
allure generate reports/allure -o reports/allure-report --cleanAfter the workflow completes, you can:
- Download the Allure raw results as artifacts.
- Access the interactive Allure report published on GitHub Pages:
https://<your-username>.github.io/<your-repo>/
βΉοΈ Note: You must enable GitHub Pages in your repository settings, with
gh-pagesas the source branch.
π With this CI/CD integration, the framework ensures continuous testing, reporting visibility, and a professional workflow ready for team collaboration.
- Recommended Python version: 3.11+
- Browser: Google Chrome
- Headless mode is enabled by default in CI/CD environments.
This project highlights a wide range of QA Automation and Software Engineering skills:
- Behavior-Driven Development (BDD) with Behave and Gherkin syntax (Given-When-Then scenarios).
- Test Automation for Web UI using Selenium WebDriver and the Page Object Model (POM) pattern.
- Python development best practices: clean structure, reusable classes, environment configuration with .env.
- Allure Reports integration: rich test reporting with screenshots, page source, and URLs attached on failures.
- Error handling and debugging: evidence hooks in environment.py for failed steps.
- Cross-platform compatibility: works locally, in Docker, and ready for CI/CD (GitHub Actions).
- Code quality tooling: linting and formatting with Flake8, Black, and isort.
- Version control best practices: feature branches, pull requests, and clear commit messages.
- Scalability in testing: prepared for integration with SauceLabs for cloud-based execution.
Created by petudeveloper
