Skip to content

About

This repository contains the structure for API automation testing using the Playwright framework and TypeScript.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Point of Sale (POS) SaaS - Automated API Testing Portfolio

Important

⚠️ Portfolio Disclaimer & Modification Notice

This repository is a mock/dummy project created strictly for portfolio demonstration and structural display purposes.

  • Code Modification: The original production code, actual endpoint URLs, proprietary business logic, and sensitive environment data have been modified, stripped, or replaced with simulated variables.
  • Framework Showcase: The primary intent of this repository is to demonstrate my ability to design an enterprise-grade automation testing architecture, handle stateful fixtures, implement JSON schema verification (AJV), and structure robust testing workflows using TypeScript and Playwright.

🚀 Tech Stack & Core Libraries

📌 Architectural Key Features

  1. Stateful Test Fixtures: Utilizes custom Playwright fixtures (src/fixtures) to isolate test contexts, automatically handle setup/teardown phases, and inject prerequisite data seamlessly.
  2. Strict Schema & Contract Testing: Leverages ajv and localized JSON schemas to instantly catch unexpected upstream API payload modifications or breaking changes.

🎯 API Test Coverage Matrix

The suite programmatically covers the complete CRUD cycle and logical business gates POS SaaS:

🔐 Authentication Flow (flow_auth)

  • Register & Verification: Validates tenant registration up to email verification handshakes.
  • Login Credentials: Tests authentication tokens generation, expiration boundaries, and permission claims.

📦 Add-On (flow_addon)

  • An addon provides extra features or options to customize the main system or product for an additional cost.

👥 Customer (flow_customer)

  • Management of retail customer profiles.

🏪 Outlet (flow_outlet)

  • Verifies full data isolation, assignment, and resource isolation configurations.

🚛 Supplier (flow_supplier)

  • Validates vendor data structures, procurement contacts, and tracking points for back-office inventory restocking.

🏷️ Product Unit (flow_unit)

  • Ensures accuracy of metric configurations (e.g., kilograms, pieces, boxes) applied onto product inventory structures.

📁 Project Anatomy

├── .github/workflows/          # Automated CI/CD execution pipeline (optional)
├── src/
│   ├── config/                 # Environment and application parameters mapping
│   ├── data/                   # Data input variations and structural test fields
│   ├── fixtures/               # Isolated test contextual dependencies hooks
│   ├── schemas/                # Expected static JSON contract definitions 
│   └── utils/                  # Schema validators (AJV wrapper) and text extensions
├── tests/
│   └── api-test/               # Main executable test specifications grouped by business flow
│       ├── flow_addon/         # CREATE, READ, UPDATE, DELETE suite for add-ons
│       ├── flow_auth/          # Auth operations (Register, Login, Email Verify)
│       ├── flow_customer/      # Customer management endpoints validations
│       ├── flow_outlet/        # Multi-outlet isolation integrity tests
│       ├── flow_supplier/      # Supplier registry business test suites
│       └── flow_unit/          # Measurement metrics payload tests
├── playwright.config.ts        # Global framework settings and report routing
├── package.json                # Project identity and strict dependency locks
├── tsconfig.json               # TypeScript compilation compiler instructions
└── .env.example                # environtment example

⚡ Setup & Local Execution

1. Installation

Clone the repository and fetch the verified node module suites:

npm install

2. Manage Environment

Create a .env file at the root directory of the project:

API_BASE_URL=https://staging-pos-saas.com

3. Execution Commands

Run the automated test pipelines using the following triggers:

# Execute all API test specification files
npx playwright test

# Execute a specific business flow (e.g., Authentication)
npx playwright test tests/api-test/flow_auth/

📊 Allure Test Report Generation

To review rich execution logs, historical data, and clear graphical visualizations:

# Generate Allure results
npx playwright test

# Open the Allure Report server locally
npx allure serve allure-results

About

This repository contains the structure for API automation testing using the Playwright framework and TypeScript.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages