Skip to content

Samlordson/Playwright_Grocery_Store_API-_Framework

Repository files navigation

🛒 # 🚀 Playwright Grocery Store API Automation Framework with CI/CD

A production-ready API Automation Framework built using Playwright + TypeScript, following industry best practices with CI/CD integration.


Tech Stack

  • Playwright API Testing
  • TypeScript
  • Playwright Test Runner
  • JSON Schema Validation (Ajv)
  • Faker.js
  • Builder Pattern
  • Test Data Factory
  • Playwright Fixtures
  • API Manager Pattern
  • GitHub Actions
  • Jenkins Pipeline
  • Allure Reports
  • HTML Reports
  • Git
  • GitHub
  • Node.js

Project Structure

.
├── api/
├── Builders/
├── fixtures/
├── schemas/
├── testdata/
├── tests/
│   ├── auth/
│   ├── cart/
│   ├── order/
│   ├── products/
│   └── status/
├── utils/
├── allure-results/
├── allure-report/
├── playwright-report/
├── Jenkinsfile
├── package.json
└── playwright.config.ts

Features

API Modules Covered

  • Authentication API
  • Cart API
  • Product API
  • Order API
  • Status API

Framework Features

  • Builder Pattern
  • Test Data Factory
  • JSON Schema Validation
  • Reusable API Managers
  • Playwright Fixtures
  • Token Management
  • Dynamic Test Data
  • Clean Architecture
  • Centralized Configuration
  • Environment Support
  • Logging
  • Assertions
  • Parallel Execution

CI/CD

✅ GitHub Actions

  • Automatic execution on Push
  • HTML Report Generation
  • Allure Report Generation

✅ Jenkins Pipeline

  • Source Checkout
  • Dependency Installation
  • Playwright Test Execution
  • Allure Report Generation
  • Artifact Archiving

Reports

Playwright HTML Report

npx playwright show-report

Allure Report

Generate Report

npm run allure:generate

Open Report

npm run allure:open

Installation

Clone Repository

git clone https://github.com/Samlordson/Playwright_Grocery_Store_API-_Framework.git

Install Dependencies

npm install

Install Playwright Browsers

npx playwright install

Execute Tests

Run Complete Suite

npx playwright test

Run Authentication Tests

npx playwright test tests/auth

Run Cart Tests

npx playwright test tests/cart

Run Product Tests

npx playwright test tests/products

Run Order Tests

npx playwright test tests/order

Run Status Tests

npx playwright test tests/status

Framework Design

Builder Pattern

ClientBuilder
ItemBuilder
OrderBuilder

Test Data Factory

TestDataFactory
├── client()
├── item()
└── order()

Reporting

  • Playwright HTML Report
  • Allure Report
  • Jenkins Build Artifacts
  • GitHub Actions Workflow Reports

CI/CD Workflow

Developer
      │
      ▼
GitHub Repository
      │
      ▼
GitHub Actions
      │
      ▼
Run Playwright Tests
      │
      ▼
Generate Reports
      │
      ▼
Publish Artifacts

----------------------------

GitHub Push
      │
      ▼
GitHub Webhook
      │
      ▼
Jenkins Pipeline
      │
      ▼
Checkout Source
      │
      ▼
Install Dependencies
      │
      ▼
Execute Playwright Tests
      │
      ▼
Generate Allure Report
      │
      ▼
Archive Reports

Future Enhancements

  • Dockerized Execution
  • Azure DevOps Pipeline
  • Slack Notifications
  • Email Notifications
  • Multiple Environment Support
  • API Performance Testing
  • Newman Integration
  • SonarQube Integration

Author

Samlordson R B

QA Automation Engineer

Skills

  • Playwright
  • TypeScript
  • API Automation
  • Selenium
  • Jenkins
  • GitHub Actions
  • Docker
  • CI/CD
  • REST API Testing
  • JSON Schema Validation

About

A scalable Playwright + TypeScript API Automation Framework implementing API Object Model, Builder Pattern, Test Data Factory, JSON Schema Validation (AJV), reusable fixtures, Faker, logging, and GitHub Actions-ready architecture using the Grocery Store API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors