Playwright Test Prompt
getByRole over CSS chains, auto-wait over sleep, web-first assertions — Playwright tests written the way Playwright wants.
Build test generation prompts — unit, integration, or E2E — with framework modes and edge-case coverage rules.
getByRole over CSS chains, auto-wait over sleep, web-first assertions — Playwright tests written the way Playwright wants.
Mock the dependencies, test the business logic, one behavior per test — the unit testing contract that bans plumbing tests.
Test the two failure directions — does the agent refuse what it must, and does it stay helpful on the benign requests it shouldn't over-refuse?
Build the test set an agent has to pass — scenarios across the happy path, edges, and adversarial inputs, each paired with the expected behavior to grade against.
Status codes, response shapes, 401 vs 403, idempotency — API tests that test the contract, not the implementation.
Login, token refresh, and everything that must fail: expired tokens, wrong permissions, malicious credentials — auth tested as behavior.
Cart to confirmation as a user would do it — with the failure scenarios real users actually trigger: refreshes, back buttons, double clicks.
Null, empty, min, max, off-by-one, malformed, unicode — the systematic boundary hunt that finds bugs where they actually live.
Turn real interactions into a labeled eval set — sample for coverage, label each with the expected behavior, and balance the set so the score means something.
Real database, real services, real transactions — integration tests that verify round-trips and rollback, not mocked theater.
Characterization tests for legacy code: assert what it does TODAY — bugs and all — so tomorrow's change can't lie about its impact.
Explicit waits, stale-element handling, drivers that actually quit — Selenium regression tests that hold the legacy fort.
Check that the agent calls tools right — the correct tool, valid arguments, the right time, and graceful handling when a tool fails or returns nothing.
Required fields one at a time, invalid formats, business rules at their exact boundaries — validation tested the way users break it.