This is a production-style hybrid automation framework built using Playwright (Python), Pytest, and BDD.
It demonstrates a modern QA strategy where:
- API is used for fast test setup
- UI is used for end-to-end validation
- BDD is used for business-readable scenarios
π Designed to reflect how real-world QA teams build scalable and reliable automation systems
- Hybrid testing (API + UI validation)
- Clean Page Object Model (POM) architecture
- Dedicated API client layer (Auth, Orders, Products)
- Reusable workflow layer for E2E setup
- BDD implementation using pytest-bdd
- Secure credential handling (.env + GitHub Secrets)
- Automatic failure screenshots
- Allure reporting with readable steps
- CI/CD pipeline with GitHub Actions
- Retry mechanism for flaky network/API calls
- Python 3.12
- Playwright (UI + API)
- Pytest
- pytest-bdd
- Allure Reports
- GitHub Actions
The framework follows separation of concerns:
pages/β UI interactions (POM)api/β Backend API layerworkflows/β Hybrid orchestration logictests/β UI, API, and E2E testsfeatures/β BDD scenarios
π Result: clean, maintainable, scalable automation design
.
βββ api/
β βββ assertions.py # API response validations
β βββ auth_client.py # Authentication API client
β βββ orders_client.py # Orders API client
β βββ products_client.py # Products API client
β βββ workflows.py # Hybrid API workflows
β
βββ config/
β βββ environments.json # Environment configs (QA, etc.)
β βββ settings.py # Config loader & models
β βββ test_data.py # Static test data
β
βββ data/
β βββ credentials.example.json # Sample credentials structure
β
βββ docs/
β βββ QA_Test_Suite_Hybrid_Playwright_Framework.xlsx # Test documentation
β
βββ features/ # BDD feature files
β βββ api_order.feature
β βββ cart.feature
β βββ checkout.feature
β βββ hybrid_order.feature
β βββ login.feature
β βββ order_history.feature
β
βββ pages/ # Page Object Model (UI)
β βββ cart_page.py
β βββ checkout_page.py
β βββ confirmation_page.py
β βββ dashboard_page.py
β βββ login_page.py
β βββ order_details_page.py
β βββ order_history_page.py
β βββ register_page.py
β
βββ tests/
β βββ step_definitions/ # BDD step implementations
β β βββ test_api_order_steps.py
β β βββ test_cart_steps.py
β β βββ test_checkout_steps.py
β β βββ test_hybrid_order_steps.py
β β βββ test_login_steps.py
β β βββ test_order_history_steps.py
β β
β βββ test_api_auth.py
β βββ test_api_order_flow.py
β βββ test_api_order_negative.py
β βββ test_api_product_flow.py
β βββ test_api_security.py
β βββ test_cart_flow.py
β βββ test_checkout_flow.py
β βββ test_e2e_flow.py
β βββ test_login_flow.py
β βββ test_order_flow.py
β βββ test_registration_flow.py
β
βββ utils/
β βββ credentials.py # Env-based credential handling
β βββ product_factory.py # Test data generator
β βββ user_factory.py # User data factory
β
βββ .github/
β βββ workflows/
β βββ tests.yml # CI pipeline
β
βββ conftest.py # Pytest fixtures
βββ pytest.ini # Pytest configuration
βββ requirements.txt # Dependencies
βββ README.md
βββ .gitignore
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright installCreate a .env file in the root:
TEST_EMAIL=your-email@example.com
TEST_PASSWORD=your-password
.envis not committed for security- GitHub CI uses repository secrets
pytest
pytest --env=qa
pytest -m api
pytest -m ui
pytest -m e2e
pytest -m bdd
pytest --browser_name=firefox
pytest --headedBDD scenarios validate business flows such as:
- Login
- Add to cart
- Checkout
- API order creation
- API-created order visible in UI
- Order history validation
Example:
Feature: Login
Scenario: User logs in with valid credentials
Given login user is on the login page
When login user logs in with valid credentials
Then login user should see the products page- Runs on every push & pull request
- Executes full test suite
- Uses secure GitHub Secrets
Uploads:
- Allure results
- Failure screenshots
Includes retry for flaky tests
Allure report provides:
- Feature-based grouping
- Step-level execution logs
- Business-readable test flows
To generate locally:
pytest --alluredir=allure-results
allure serve allure-resultsThis project demonstrates a real-world high-value scenario:
- Generate login token via API
- Create order via API
- Login via UI
- Navigate to order history
- Validate API-created order in UI
π Reduces UI dependency and speeds up E2E testing significantly
This framework leverages tools like Codex and Claude to enhance productivity:
- Accelerated framework setup and refactoring
- Improved code quality and structure
- Faster debugging and issue resolution
π AI was used as a productivity accelerator, while all architecture, validation logic, and QA decisions were designed and verified manually
This project showcases:
- Real-world QA automation architecture
- Hybrid testing strategy (API + UI)
- Scalable and maintainable design
- CI/CD readiness
- Strong QA engineering practices
π Built to reflect skills directly applicable to production environments and client projects
πΌ Hire me on Upwork: Click here to view my Upwork Profile & discuss your project