|
| 1 | +# API Test Framework - Project Instructions |
| 2 | + |
| 3 | +## Project Overview |
| 4 | +Playwright API test framework with TypeScript for comprehensive REST API testing. |
| 5 | + |
| 6 | +## Technology Stack |
| 7 | +- **Framework**: Playwright (API testing) |
| 8 | +- **Language**: TypeScript |
| 9 | +- **Test Runner**: Playwright Test |
| 10 | +- **Reporters**: HTML, JSON |
| 11 | + |
| 12 | +## Project Structure |
| 13 | +- `/tests` - API test files |
| 14 | +- `/tests/helpers` - Helper functions and utilities |
| 15 | +- `/tests/config` - Configuration files |
| 16 | +- `playwright.config.ts` - Playwright configuration |
| 17 | + |
| 18 | +## Development Guidelines |
| 19 | +- Write tests using async/await pattern |
| 20 | +- Use Playwright's APIRequestContext for HTTP calls |
| 21 | +- Organize tests by API endpoint or feature |
| 22 | +- Include authentication examples |
| 23 | +- Validate response status, headers, and body |
| 24 | + |
| 25 | +## Test Execution |
| 26 | +- Run all tests: `npx playwright test` |
| 27 | +- Run specific test: `npx playwright test <filename>` |
| 28 | +- Run with UI: `npx playwright test --ui` |
| 29 | +- Generate report: `npx playwright show-report` |
| 30 | + |
| 31 | +## Coding Standards |
| 32 | +- Use TypeScript strict mode |
| 33 | +- Follow async/await best practices |
| 34 | +- Add meaningful test descriptions |
| 35 | +- Include assertions for status codes and data |
0 commit comments