This repository presents a production-ready End-to-End (E2E) Web Test Automation Framework engineered using Pytest and Playwright (Python). Built around the industry-standard Page Object Model (POM) architectural pattern, this framework ensures high maintainability, test execution efficiency, and seamless continuous integration.
- Page Object Model (POM): Decouples page element locators and page-specific user interactions from test verification logic.
- Automatic Failure Screenshots: Automatically captures and attaches screenshots to the execution report whenever a test failure occurs.
- Standalone HTML Reports: Generates self-contained HTML test execution summaries (
reports/report.html) complete with test duration, status, metadata, and failure evidence. - Parallel Test Execution: Full compatibility with
pytest-xdistfor distributed multi-core test runs. - CI/CD Pipeline Integration: Configured with GitHub Actions (
.github/workflows/test_runner.yml) to automatically execute test suites on everypushorpull_requestand upload execution artifacts.
qa-automation-framework/
├── .github/
│ └── workflows/
│ └── test_runner.yml # GitHub Actions CI/CD Pipeline
├── pages/
│ ├── base_page.py # Reusable Base Page Object class
│ └── login_page.py # Page Object for Authentication
├── tests/
│ ├── conftest.py # Pytest Fixtures & Screenshot Hooks
│ └── test_login.py # E2E Test Suite
├── reports/ # HTML Reports & Failure Evidence Screenshots
├── pytest.ini # Pytest Global Configuration
└── README.md # Project Documentation
Ensure you have Python 3.9+ installed on your system.
# Clone the repository
git clone https://github.com/atiqur-rahman-pro/qa-automation-framework.git
cd qa-automation-framework
# Create & Activate virtual environment
python -m venv .venv
# On Windows PowerShell:
.\.venv\Scripts\Activate.ps1
# On macOS/Linux:
source .venv/bin/activatepip install pytest pytest-playwright pytest-html pytest-xdist
playwright install chromium# Execute full test suite
pytest
# View generated HTML Report
# Open reports/report.html in your browserEvery code commit triggers the GitHub Actions Automated Pipeline, executing:
- Python environment setup & Playwright browser installation
- Pytest execution against target web environments
- Generation and publication of test execution artifacts downloadable directly from GitHub Actions runs.