How to pick end-to-end journeys, write minimal Playwright tests, run them against the docker compose stack, and report results. Used by qa-tester only.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of E2e Test?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sayeed1999-e2e-test)
---
name: e2e-test
description: How to pick end-to-end journeys, write minimal Playwright tests, run them against the docker compose stack, and report results. Used by qa-tester only.
---
# e2e-test
## Steps
### 1. Choose the tests
- Take the key journeys (J-xx) from `docs/prd.md`. Test only `APPROVED`, non-deprecated requirements.
- One happy-path test per journey.
- One happy-path check for each `MUST` or `SHOULD` requirement that no journey covers.
- Targets `prototype` and `mvp`: at most 1 negative or edge case per journey. 0 is fine. Prefer 0 unless the journey is critical (login, payment).
- Targets `prototype` and `mvp`: about 15 checks at most.
- Target `production`: at most 1 or 2 negative cases per critical journey. Also check every acceptance criterion of the `PROD` requirements. No fixed cap.
- Write the plan before any test or check. See step 1b.
### 1b. Write the test plan
- Run this step for every target, before step 2 and before any manual check.
- File: `docs/test-plan/TP-NN.md`. One per run. `NN` is the next free number, starting at `001`.
- Never edit an earlier plan. A later run writes a new one.
- Cover every task in scope for this run.
- Step 2 and step 3 run only what the plan lists.
### 2. Write the tests
- Target `prototype`: write no test files (`AGENTS.md`, Target). Skip this step.
- Folder: `tests/e2e/`. Tool: Playwright (`@playwright/test`), for web and for API tests (its `request` fixture). The architecture may name another tool.
- Filename: `j01-<name>.spec.ts`, or `r05-<name>.spec.ts` for a requirement outside any journey.
- Header comment in each file: `R-IDs: R-01, R-02` and `Journey: J-01` (or `-`).
- Steps are user actions, then checks on visible results. API-only: requests, then checks on responses.
- Use the real running app. No mocks.
- Fresh test data per run (unique emails). Clean up if it is easy.
- Prototype: read facts from the Seed facts in `docs/schema.md`. Never assume seed rows that are not listed there.
- Mobile screens: Playwright cannot run them. Write a short manual checklist in the report for the user. Test the mobile flows' API calls instead.
### 3. Run
- Start the stack: `docker compose up --build -d`. Wait until every service is healthy.
- `mvp` and `production`: run `pnpm exec playwright test` in `tests/e2e/`. Run all tests, including earlier ones.
- `prototype`: run each check chosen in step 1 once by hand against the running stack (`curl` for pages and APIs). List what you could not check under Manual checks for the user.
- A failed test runs once more. Record both results. A pass on the second run counts as PASS and is marked `flaky`.
- Stop the stack: `docker compose down`.
- If the stack does not start, that is a FAIL. Send a handoff to devops-engineer.
- Docker not available: raise an `env` blocker (`skills/flow`). Never write a verdict for tests you did not run.
### 4. Report
- Write `docs/test-report.md` in the Format below.
- PASS: set the tested tasks to `done` in `docs/tasks.md`.
- FAIL: write one handoff per failure to the agent who must fix it (see `skills/handoff-report`). Leave failing tasks not `done`.
## Format: docs/test-plan/TP-NN.md
```
# Test Plan TP-NNN
- Target: prototype | mvp | production
- Stage: MVP | PROD
- Date: <date>
- Tasks in scope: T-01, T-02
## Checks
- C-01 | Journey: J-01 | R-IDs: R-01 | Happy path | <one line: user action and expected result>
- C-02 | Journey: J-01 | R-IDs: R-01 | Edge | <one line> | Why: <reason>, or `none`
```
## Format: docs/test-report.md
```
# Test Report
- Test plan: TP-NNN
- Verdict: PASS | FAIL
- Stage: MVP | PROD
- Date: <date>
- Stack started with docker compose: yes | no
## Results
- <test or check name> | Journey: J-01 | R-IDs: R-01 | PASS | FAIL | flaky | <note>
## Failures
### F-01 <title>
- R-ID:
- Steps:
- Expected:
- Actual:
- Responsible: database-engineer | backend-engineer | ai-engineer | frontend-engineer | devops-engineer | ui-ux-designer | architect | product-owner
## Manual checks for the user
- <mobile or other things not run>
```
## MUST
- Write `docs/test-plan/TP-NN.md` before any test or check.
- Record when the stack did not start with compose.
- Note it in the report when you update a test because its requirement changed.
## NEVER
- Edit a test to force a pass.
- Delete or skip a failing test.
- Fix application code.
- Add a test or check that is not in the plan.
- Write edge-case matrices, load tests, or visual tests.