API Testing with Playwright
Automates REST and GraphQL API validation using Playwright's native testing capabilities and implementation patterns.
This skill empowers developers to build robust API testing suites for both RESTful and GraphQL endpoints using Playwright. It provides standardized patterns for common tasks like handling authentication (Bearer and Cookie-based), mocking API responses for E2E testing, and validating JSON schemas with Ajv. Whether you're performing standalone integration tests or simulating server failures for frontend stability, this skill offers the specific code snippets and configuration guidance needed to ensure backend reliability and contract compliance.
主要功能
01Sophisticated API mocking to simulate server errors, delays, and custom payloads
02Native GraphQL query and mutation validation with variable support
03Multi-pattern authentication handling for Bearer tokens and cookie-based sessions
040 GitHub stars
05Full REST CRUD operation testing including GET, POST, PUT, and DELETE
06Advanced JSON schema validation using Ajv for structural integrity checks
使用场景
01Automating backend API endpoint validation during CI/CD pipelines
02Mocking external third-party services to test frontend edge cases without real dependencies
03Combining API-level checks with browser-based E2E tests for comprehensive coverage