Skip to content

Djones-qa/qa-master-suite

Repository files navigation

qa-master-suite

A full-stack QA automation framework built with Playwright and TypeScript, combining E2E UI testing, REST API testing, and data-driven testing — all in a single production-ready suite with Allure reporting and GitHub Actions CI.

CI Language Framework Reporting


Overview

This project demonstrates enterprise-level QA automation patterns including the Page Object Model, reusable API helpers, centralized test data, and multi-layer test coverage. It tests both a real e-commerce web app (SauceDemo) and a REST API (JSONPlaceholder) within the same framework.


Test Coverage

E2E Tests — SauceDemo (tests/e2e/)

Spec Tests What It Covers
auth.spec.ts 5 Login success, locked user, empty fields, wrong password, page title
checkout.spec.ts 5 Full checkout journey, multi-item cart, remove item, sort by price, sort by name
data-driven.spec.ts 4 Parameterized login across 3 user types + locked user denial

API Tests — JSONPlaceholder (tests/api/)

Spec Tests What It Covers
users.spec.ts 5 GET all users, schema validation, GET by ID, 404 handling, email format
posts.spec.ts 5 POST create, PUT update, DELETE, GET 100 posts, response schema

Total: 24 tests across 5 spec files


Project Structure

qa-master-suite/
├── .github/
│   └── workflows/            # GitHub Actions CI pipeline
├── pages/                    # Page Object Model classes
│   ├── BasePage.ts           # Shared navigation and load helpers
│   ├── LoginPage.ts          # Login form interactions and assertions
│   ├── InventoryPage.ts      # Product listing, cart, sort interactions
│   ├── CartPage.ts           # Cart item management
│   └── CheckoutPage.ts       # Shipping info, order confirmation
├── tests/
│   ├── e2e/                  # UI end-to-end tests
│   │   ├── auth.spec.ts      # Authentication scenarios
│   │   ├── checkout.spec.ts  # Cart and checkout journey
│   │   └── data-driven.spec.ts # Parameterized login tests
│   └── api/                  # REST API tests
│       ├── users.spec.ts     # Users endpoint coverage
│       └── posts.spec.ts     # Posts CRUD coverage
├── utils/
│   ├── testHelpers.ts        # Reusable login helper
│   └── apiHelpers.ts         # Reusable API request functions
├── test-data/
│   ├── users.ts              # User credentials and shipping info
│   └── products.ts           # Product names and prices
├── playwright.config.ts      # Playwright + Allure reporter config
└── tsconfig.json

Getting Started

Prerequisites

  • Node.js 18 or higher

Installation

git clone https://github.com/Djones-qa/qa-master-suite.git
cd qa-master-suite
npm install
npx playwright install chromium

Running Tests

# Run all tests
npm test

# Run E2E tests only
npx playwright test tests/e2e

# Run API tests only
npx playwright test tests/api

# Run smoke tests only
npx playwright test --grep @smoke

# Run by tag
npx playwright test --grep @auth
npx playwright test --grep @checkout
npx playwright test --grep @api
npx playwright test --grep @data-driven

Reporting

# Open Playwright HTML report
npx playwright show-report

# Generate and open Allure report
npx allure generate allure-results --clean
npx allure open

Architecture

Page Object Model

All UI interactions are encapsulated in typed page classes under pages/. Tests never interact with selectors directly — they call page methods, keeping tests clean and maintainable.

LoginPage.login(username, password)
InventoryPage.addProductToCart(name)
CartPage.removeItem(name)
CheckoutPage.assertOrderConfirmed()

Reusable Helpers

utils/testHelpers.ts provides a loginToSauceDemo() function used as a shared setup step across test files. utils/apiHelpers.ts wraps all API calls with built-in status assertion and JSON parsing.

Data-Driven Testing

test-data/users.ts exports multiple user fixtures. data-driven.spec.ts loops over the validUsers array to parameterize login tests — one test generated per user without duplicating test logic.

Allure Reporting

The framework is configured with allure-playwright as a second reporter alongside the built-in HTML reporter. Allure results are generated on every run and uploaded as a CI artifact.


CI/CD

Tests run automatically on every push and pull request via GitHub Actions. The pipeline installs dependencies, installs Chromium, runs the full suite in parallel, and uploads the Playwright HTML report as a downloadable artifact.


Tech Stack

Tool Purpose
Playwright Browser automation and API testing
TypeScript Type-safe test code
Allure Rich test reporting
GitHub Actions CI/CD pipeline
SauceDemo E2E test target (e-commerce app)
JSONPlaceholder API test target (REST API)

Author

Darrius Jones — QA Automation Engineer GitHub · LinkedIn

About

Full-stack QA framework with E2E, API, POM, data-driven tests, and Allure reporting. 24 tests with GitHub Actions CI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors