Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toolshop QA Automation — Python + Selenium + pytest

CI

End-to-end and API test automation framework for Toolshop, a demo e-commerce application, built with Python, Selenium WebDriver, and pytest, following the Page Object Model design pattern and running on a GitHub Actions CI/CD pipeline.

📊 View the latest Allure test report

Overview

This project demonstrates a complete QA automation workflow: functional requirements analysis, test case design, API and UI test implementation, and continuous integration — applied to a real-world-style e-commerce application.

  • API testing: product catalog endpoints, including category filtering
  • UI testing: authentication (login/logout) and shopping cart flows
  • Design pattern: Page Object Model (UI) and a dedicated API client layer
  • CI/CD: automated test execution on every push, with Allure reporting published to GitHub Pages

Tech stack

Category Tool
Language Python 3.11
Test framework pytest
UI automation Selenium WebDriver
API testing requests
Reporting Allure
CI/CD GitHub Actions
Environment management python-dotenv, venv

Project structure

qa-python-portfolio/
├── .github/workflows/ci.yml       # CI/CD pipeline
├── docs/
│   ├── requirements.md            # Functional requirements
│   └── test_cases.md              # Test case documentation
├── src/
│   ├── api/
│   │   └── products_client.py     # API client layer
│   └── ui/
│       └── pages/                 # Page Object Model classes
├── tests/
│   ├── api/                        # API test suite
│   └── ui/                         # UI test suite
├── conftest.py                     # Shared fixtures
├── pytest.ini
└── requirements.txt

Getting started

Prerequisites

  • Python 3.9+
  • Google Chrome installed

Setup

git clone https://github.com/noemiSynyster/python-website-automation.git
cd python-website-automation

python3 -m venv venv
source venv/bin/activate   # On Windows: venv\Scripts\activate

pip install -r requirements.txt

Environment variables

Copy the example file and fill in the test credentials:

cp .env.example .env
TEST_USER_EMAIL=customer@practicesoftwaretesting.com
TEST_USER_PASSWORD=welcome01
BASE_URL=https://practicesoftwaretesting.com

Running the tests

# All tests
pytest tests/ -v

# API tests only
pytest tests/api/ -v

# UI tests only
pytest tests/ui/ -v

# Generate an Allure report locally
pytest tests/ -v --alluredir=allure-results
allure serve allure-results

Test documentation

CI/CD pipeline

Every push and pull request to main triggers the pipeline, which:

  1. Installs dependencies and Chrome
  2. Runs the API test suite (blocking — a failure fails the build)
  3. Runs the UI test suite (non-blocking — see note below)
  4. Generates and publishes an Allure report to GitHub Pages
  5. Uploads failure screenshots as build artifacts

Known limitation: UI tests in CI

The target application is protected by Cloudflare bot detection, which intermittently blocks headless browser sessions originating from data center IPs (such as GitHub-hosted runners). As a result, UI tests are configured as non-blocking in the CI pipeline (continue-on-error: true) — a failure is visible in the run summary but does not fail the build.

These same tests run reliably in local execution, where this protection is not triggered. This is a known trade-off when automating third-party sites with bot-detection systems, and is documented here rather than hidden.

Author

Noemí — QA Automation Engineer LinkedIn · GitHub

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages