A production-style API automation framework built using Playwright + TypeScript, designed to demonstrate scalable test architecture, reusable API abstractions, validation layers, payload builders, and end-to-end workflow validation.
This project was built to simulate a real-world API automation framework rather than a collection of isolated test scripts.
It focuses on:
- reusable API client design
- clean separation of concerns
- maintainable test architecture
- business-layer abstractions
- structured validation and logging
- CRUD and lifecycle workflow testing
- Playwright
- TypeScript
- Node.js
- GitHub Actions (CI-ready)
- DummyJSON API (test API source)
This framework follows a layered design:
Handles reusable HTTP methods:
- GET
- POST
- PUT
- DELETE
Encapsulates domain-specific API actions:
- create user
- get user
- update user
- delete user
Generates reusable and customizable request payloads.
Centralizes response assertions and keeps test files clean.
Provides reusable setup/teardown for test execution.
Contains business-oriented API scenarios and flow validations.
playwright-ts-api-framework/
│
├── .github/
│ └── workflows/
│ └── playwright.yml
│
├── src/
│ ├── api/
│ │ ├── clients/
│ │ │ ├── baseClient.ts
│ │ │ └── userClient.ts
│ │ │
│ │ ├── models/
│ │ │ └── user.types.ts
│ │ │
│ │ └── validators/
│ │ └── userValidator.ts
│ │
│ ├── builders/
│ │ └── userPayloadBuilder.ts
│ │
│ ├── config/
│ │ └── env.ts
│ │
│ ├── fixtures/
│ │ └── apiFixtures.ts
│ │
│ └── utils/
│ └── logger.ts
│
├── tests/
│ └── api/
│ └── users/
│ ├── createUser.spec.ts
│ ├── getUser.spec.ts
│ ├── updateUser.spec.ts
│ ├── deleteUser.spec.ts
│ └── userFlow.spec.ts
│
├── playwright.config.ts
├── tsconfig.json
├── package.json
└── README.md- Modular API framework using Playwright + TypeScript
- Reusable BaseClient for HTTP request abstraction
- Business-layer UserClient
- Payload builder pattern for test data generation
- Validator layer for reusable response assertions
- Logging for request and response visibility
- CRUD test coverage
- End-to-end user lifecycle flow validation
- Fixture-based reusable setup
- CI-ready project structure
- Create User
- Get User
- Update User
- Delete User
- Create → Fetch → Update → Delete user lifecycle validation
npm installnpx playwright installnpx playwright testnpx playwright test tests/apinpx playwright show-reportThis project was intentionally designed to reflect real-world test engineering practices, including:
- abstraction over duplication
- separation of test logic from validation logic
- reusable setup and teardown
- cleaner and maintainable code organization
- scalable structure for future UI / E2E expansion
Future improvements planned for this framework:
- Data-driven testing using JSON / CSV / Excel
- Environment-specific configuration
- Schema validation layer
- Authentication flow support
- UI automation layer using Playwright
- API + UI end-to-end integration scenarios
Hemasundar Oggu
SDET | Playwright + TypeScript | API & Distributed Systems
This repository is part of a larger effort to build product-company-ready engineering proof, focusing on scalable automation architecture rather than only test case execution.