| name | webapp-testing |
| description | Test web applications using Playwright with stable locators, deterministic assertions, trace-first debugging, and defect-oriented reporting. |
Webapp Testing
Use this for UI flows, smoke tests, regression tests, flaky browser tests, and validating full-stack behavior from the user perspective.
Workflow
- Identify the user workflow and critical assertions.
- Prefer role, label, placeholder, text, and test id locators in that order.
- Avoid arbitrary waits; wait for stable UI states and network completion only when justified.
- Validate visible behavior, URL/state changes, console errors, and API side effects where relevant.
- For failures, capture screenshot, trace, video, console errors, and failed request details.
- Isolate flakiness before increasing timeout.
Playwright standards
- Use
getByRole, getByLabel, getByText, getByTestId.
- Keep tests independent and data-safe.
- Use fixtures for auth/bootstrap when needed.
- Assert user outcomes, not implementation details.
- Prefer API setup/cleanup over slow UI setup when practical.
Output format
- Test objective
- Scenarios covered
- Risks and flake points
- Suggested locators
- Example test structure