/generate-tests
Takes a live URL, scrapes the page, and writes a Playwright spec file. No ticket, no TMS, no existing test cases needed.
Usage
bash
/generate-tests <url> [--name <feature-name>] [--screenshot]All command combinations
Every --tool and --url option in one place → Command Combinations
Examples
bash
# Generate tests from a login page
/generate-tests https://myapp.com/login
# With a custom file name
/generate-tests https://myapp.com/checkout --name checkout-flow
# Capture a screenshot during scraping
/generate-tests https://myapp.com/dashboard --screenshotWhat it does
- Scrapes the URL — captures DOM, form fields, buttons, test IDs
- Plans test scenarios (Happy Path, Edge Cases, Accessibility)
- Asks you to confirm the scenario list before writing code
- Writes
tests/generated/<feature-name>.spec.ts - Validates with
npx playwright test --list
vs /automate-from-tms
| Agent | Starts from | Use when |
|---|---|---|
/generate-tests | A live URL (scrapes the page) | Quick automation, no ticket or TCs needed |
/automate-from-tms | TC IDs in your TMS (reads documented steps) | TCs already exist in Xray/TestRail — automate those specific steps |
The key difference: /generate-tests discovers tests by looking at the page. /automate-from-tms follows the steps your team already documented.
Output
tests/generated/<feature-name>.spec.tsThe spec uses getByRole(), getByLabel(), getByTestId() — no raw CSS selectors.