play-son
v0.1.4
Published
A declarative API testing framework built on Playwright
Downloads
599
Readme
play-son
A declarative, JSON-driven API testing framework built on top of Playwright.
Features
- Declarative Testing: Write API tests in JSON format.
- Variable Injection: Easy variable management across global, environment, suite, and case scopes.
- Dynamic Generators: Built-in support for generating random data (dates, IDs, strings, etc.) using
@faker-js/faker. - JSON Schema Validation: Built-in validation for requests and responses.
- Flexible Assertions: Comprehensive set of assertions (equals, exists, length, etc.).
- Response Extraction: Extract values from responses to use in subsequent steps.
- Custom Handlers: TypeScript escape hatches for complex logic.
- Playwright Integration: Leverages Playwright's powerful
APIRequestContextand reporting.
Installation
npm install play-sonQuick Start
Initialize a new project:
npx playson init my-testsRun your tests:
npx playson run my-tests/suites/sample.test.json
Documentation
For detailed information, please refer to the docs directory:
License
MIT
