Automation script generation (UI & API)
The problem
Manual cases pile up faster than the automation team can script them.
Workflow
- Approved casesteps + expected
- Contextpage objects, framework rules
- GeneratePlaywright / RestAssured
- RunCI or local
- Fix & reviewPR review
Real-world example
From an OpenAPI spec for /orders, the AI writes API tests for status codes, schema validation and auth failures. For the UI, it writes a Playwright test that reuses the team's existing LoginPage object instead of inventing selectors.
Starter prompt
Write a Playwright (TypeScript) test for the case below. Use ONLY the existing page objects
provided. Follow our rules: data-testid selectors, no hard waits, one assertion per expected result.
If a page object is missing, say so instead of guessing.
CASE: {case}
PAGE OBJECTS: {code}Tools
GitHub Copilot / Claude Code / Cursor, Playwright, MCP (browser)
Human check
Generated code goes through normal PR review and must pass in CI.
Measure success
Automation backlog size; scripts merged per sprint; flaky rate of AI-written tests.