Skip to content

E2E Test Automation Framework with Selenium, Python & Pytest

Notifications You must be signed in to change notification settings

arturdmt-alt/QA_Selenium_Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QA Selenium Automation Framework

Selenium Tests Python Python Selenium Tests

E2E test automation framework for e-commerce web application using Selenium WebDriver, Python, and Pytest with Page Object Model architecture.

Features

  • Complete E2E test coverage for critical user flows
  • Page Object Model (POM) design pattern
  • Parallel test execution support
  • Professional bug documentation with workarounds
  • Allure test reporting with visual analytics
  • Screenshot capture on test failures
  • Dynamic test data generation with Faker
  • CI/CD pipeline with GitHub Actions

Test Coverage

User Authentication

  • User registration with form validation
  • Login and logout functionality
  • Account deletion flow

Product Management

  • Product search with keyword filtering
  • Product detail page verification
  • Product listing and display

Shopping Cart

  • Add items to cart (single and multiple)
  • Update cart item quantities
  • Remove items from cart
  • Known Issue: Multi-item cart with Continue Shopping button - Bug Report

Forms

  • Contact form submission
  • Newsletter subscription

Total: 12 automated tests (10 passed, 2 xfailed with documented bug)

Tech Stack

  • Python 3.12
  • Selenium WebDriver 4.15
  • Pytest 7.4
  • Allure Framework
  • Faker (test data generation)
  • GitHub Actions (CI/CD)

Project Structure

QA_Selenium_Automation/
├── .github/
│   └── workflows/
│       └── tests.yml               # CI/CD pipeline
├── pages/                          # Page Object Models
│   ├── base_page.py                # Base page with common methods
│   ├── home_page.py
│   ├── login_page.py
│   ├── signup_page.py
│   ├── products_page.py
│   ├── product_detail_page.py
│   ├── cart_page.py
│   └── contact_page.py
├── tests/                          # Test suites
│   ├── test_basic_setup.py         # Browser initialization
│   ├── test_user_flows.py          # Authentication flows
│   ├── test_product_features.py    # Product search and display
│   ├── test_cart_operations.py     # Shopping cart functionality
│   └── test_forms.py               # Form submissions
├── utils/                          # Utilities
│   ├── browser_factory.py          # WebDriver management
│   └── wait_helpers.py             # Custom wait strategies
├── docs/
│   ├── images/                     # Documentation screenshots
│   └── bug_reports/                # Bug documentation
├── reports/                        # Test reports (gitignored)
├── conftest.py                     # Pytest configuration
├── pytest.ini                      # Pytest settings
└── requirements.txt                # Dependencies

Installation

  1. Clone the repository
git clone https://github.com/arturdmt-alt/QA_Selenium_Automation.git
cd QA_Selenium_Automation
  1. Create and activate virtual environment
python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Install Allure (optional)
# Windows (Scoop)
scoop install allure

# macOS
brew install allure

# Linux
sudo apt-add-repository ppa:qameta/allure
sudo apt-get update && sudo apt-get install allure

Running Tests

Run all tests:

pytest tests/ -v

Run specific test suite:

pytest tests/test_user_flows.py -v

Run with parallel execution:

pytest tests/ -n 4

Generate Allure report:

pytest tests/ --alluredir=reports/allure-results
allure serve reports/allure-results

Run with markers:

pytest tests/ -m regression
pytest tests/ -m product

CI/CD Pipeline

All tests run automatically on every push and pull request via GitHub Actions.

The pipeline:

  • Runs on Ubuntu with Python 3.12
  • Installs Chrome browser
  • Executes test suite
  • Generates Allure results
  • Uploads test artifacts

CI Configuration:
The CI environment uses extended timeouts (3x standard) due to automationexercise.com's instability and slow response times. Local tests use standard timeouts for faster execution.

View pipeline status: Actions

Test Results

Terminal Output

Pytest Results

Allure Report

Overview Dashboard Allure Overview

Analytics & Graphs Allure Graphs

Test Timeline Allure Timeline

Known Issues

BUG-001: Cart Loses Products with Continue Shopping

Status: Open | Severity: HIGH

When adding multiple products to cart using "Continue Shopping" button, only the last product is retained. Full details: Bug Report

Workaround Implemented: Test using product detail page approach passes successfully, demonstrating the framework works correctly and the issue is in the application backend.

Author

Artur Dmytriyev
QA Automation Engineer

LinkedIn | GitHub