Test Loop Skill
[!IMPORTANT]
Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).
Optional args: slug=, ticket=<id/url>, mode=interactive|autonomous|channel, channel=, auto_continue=true|false, profile=business|hybrid|technical.
Instructions
When the user asks to perform this workflow, execute the following steps:
Test Loop Workflow
Goal: Turn approved ACs into an executable, traced E2E suite, and classify any failure as a repair or a real bug instead of leaving it to manual triage.
Steps
- Load scope:
slug, operator_profile (carried), AC-*, SRS lanes, build target (web/API/mobile build artifact digest/version), platform/OS matrix, permissions/reset readiness per C6, stack testing skills.
- Driver preflight for each lane (
quality-engineering-playwright-cli / quality-engineering-appium-mcp scripts/preflight.sh); record unavailable drivers in driver_blocked[] (STLC Stage 4).
- Plan (STLC Stage 2-3, V-Model System Level):
- Run
specialist-test-planner per quality-engineering-test-plan-authoring to produce test_plan_path and selector_gaps using C1/C2/C6 templates and skills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md.
- BLOCKED (no stable
AC-* trace) if trace missing; BLOCKED (HALT: ) when planner triggers HALT.
- Prepare selectors:
- Run
specialist-testid-inserter on selector_gaps; in interactive mode stop for approval on its APPROVAL: required list; in autonomous mode pass approved_production_edits only when granted, else carry gaps forward in selector_gaps_remaining[].
- For
lane: web, build/extend page objects per quality-engineering-playwright-pom-generation into page_objects[]. Mobile uses stable accessibility IDs per quality-engineering-selector-stability.
- Generate:
- One scenario per
specialist-integration-test-generator call, seed-first, via lane driver (web: playwright-cli/Playwright MCP; mobile: Appium MCP/platform runner). Unstable locator scenarios land in selector_gaps_remaining[].
- Run and heal (STLC Stage 5: Triage, Flaky Analysis, Defect Drafting):
- Run generated suite; per failure, run
specialist-test-healer into heal_verdicts[].
HEALED only with RERUNS: 3/3 green, ASSERTION_DELTA: none, and fixture/selector integrity preserved; unchanged assertion text does not authorize weakening fixtures or widening selectors. REAL_BUG_DO_NOT_HEAL logs to real_bugs[] (defect drafting for dev-fix); QUARANTINE_CANDIDATE routes to quality-engineering-flaky-triage into flake_quarantine[]; BLOCKED (missing driver/evidence) recorded in missing_evidence.
- Visual baseline changes require reviewed diff with named approver per
quality-engineering-visual-baseline.
- Handoff (STLC Stage 6 Closure):
- Calculate Automation Health (
quality-engineering-automation-health), carry release_confidence, open defects, and residual risks per skills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md. Technical PASS validates test suite only; route to verify-work.
Runtime Contract
- Use after
implement-feature reaches GREEN, or whenever ACs have E2E/mobile lanes without executable coverage.
- Required inputs: slug, stable
AC-* trace, a runnable build/app target.
- Return BLOCKED (no build target or AC trace) only when the build target cannot be established or
AC-* is missing.
Handoff Payload
slug, operator_profile, test_plan_path, assumed_results[], halt_triggers[], page_objects[], generated_tests[], driver_blocked[], heal_verdicts[], flake_quarantine[], selector_gaps_remaining[], real_bugs[], release_confidence, outcome report, next workflow.
Blocking Questions
- Ask max 3 at a time with a recommended default and 2-3 options.
Output Template
# Test Loop Report: [Name]
## Scope
## Plan
## Generated Tests
## Page Objects
## Selector Gaps Remaining
## Heal Verdicts
## Flake Quarantine
## Real Bugs Found
## Automation Health
feedback_loop_minutes: ; suite_reliability_pct: ; release_cadence: ; prod_escape_rate: ; release_confidence: high | medium | low
## Outcome Report
{schema_version: 1, run_id: "[run-id]", slug: "[slug]", workflow: test-loop, feature_status: implemented, started_at: "[timestamp]", completed_at: "[timestamp]", requirement_trace: {brd_objectives: [], requirements: [], acceptance_criteria: [], srs: []}, completed_evidence: [], missing_evidence: [], decision_needed: [], recommended_next_workflow: verify-work, cost: {source: unavailable}, agent: {identity: "[agent-identity]", model: "[model]"}}
## Next Workflow
verify-work | dev-fix
## Cost Report
Call `get_session_cost(workflow="test-loop")` before final handoff.
1---2name: test-loop-23description: "Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile)."4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/test-loop-26 internal: true7 triggers:8 keywords:9 - test loop10 - workflow11---1213# Test Loop Skill1415> [!IMPORTANT]16> Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).1718Optional args: slug=<feature>, ticket=<id/url>, mode=interactive|autonomous|channel, channel=<id>, auto_continue=true|false, profile=business|hybrid|technical.1920## Instructions2122When the user asks to perform this workflow, execute the following steps:232425# Test Loop Workflow2627Goal: Turn approved ACs into an executable, traced E2E suite, and classify any failure as a repair or a real bug instead of leaving it to manual triage.2829## Steps301. Load scope:31 - `slug`, `operator_profile` (carried), `AC-*`, SRS lanes, build target (web/API/mobile build artifact digest/version), platform/OS matrix, permissions/reset readiness per C6, stack testing skills.32 - Driver preflight for each lane (`quality-engineering-playwright-cli` / `quality-engineering-appium-mcp` `scripts/preflight.sh`); record unavailable drivers in `driver_blocked[]` (STLC Stage 4).332. Plan (STLC Stage 2-3, V-Model System Level):34 - Run `specialist-test-planner` per `quality-engineering-test-plan-authoring` to produce `test_plan_path` and `selector_gaps` using C1/C2/C6 templates and `skills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md`.35 - BLOCKED (no stable `AC-*` trace) if trace missing; BLOCKED (HALT: <trigger>) when planner triggers HALT.363. Prepare selectors:37 - Run `specialist-testid-inserter` on `selector_gaps`; in interactive mode stop for approval on its `APPROVAL: required` list; in autonomous mode pass `approved_production_edits` only when granted, else carry gaps forward in `selector_gaps_remaining[]`.38 - For `lane: web`, build/extend page objects per `quality-engineering-playwright-pom-generation` into `page_objects[]`. Mobile uses stable accessibility IDs per `quality-engineering-selector-stability`.394. Generate:40 - One scenario per `specialist-integration-test-generator` call, seed-first, via lane driver (web: `playwright-cli`/Playwright MCP; mobile: Appium MCP/platform runner). Unstable locator scenarios land in `selector_gaps_remaining[]`.415. Run and heal (STLC Stage 5: Triage, Flaky Analysis, Defect Drafting):42 - Run generated suite; per failure, run `specialist-test-healer` into `heal_verdicts[]`.43 - `HEALED` only with `RERUNS: 3/3 green`, `ASSERTION_DELTA: none`, and fixture/selector integrity preserved; unchanged assertion text does not authorize weakening fixtures or widening selectors. `REAL_BUG_DO_NOT_HEAL` logs to `real_bugs[]` (defect drafting for `dev-fix`); `QUARANTINE_CANDIDATE` routes to `quality-engineering-flaky-triage` into `flake_quarantine[]`; `BLOCKED` (missing driver/evidence) recorded in `missing_evidence`.44 - Visual baseline changes require reviewed diff with named approver per `quality-engineering-visual-baseline`.456. Handoff (STLC Stage 6 Closure):46 - Calculate Automation Health (`quality-engineering-automation-health`), carry `release_confidence`, open defects, and residual risks per `skills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md`. Technical PASS validates test suite only; route to `verify-work`.47## Runtime Contract48- Use after `implement-feature` reaches GREEN, or whenever ACs have E2E/mobile lanes without executable coverage.49- Required inputs: slug, stable `AC-*` trace, a runnable build/app target.50- Return BLOCKED (no build target or AC trace) only when the build target cannot be established or `AC-*` is missing.51## Handoff Payload52- `slug`, `operator_profile`, `test_plan_path`, `assumed_results[]`, `halt_triggers[]`, `page_objects[]`, `generated_tests[]`, `driver_blocked[]`, `heal_verdicts[]`, `flake_quarantine[]`, `selector_gaps_remaining[]`, `real_bugs[]`, `release_confidence`, outcome report, next workflow.53## Blocking Questions54- Ask max 3 at a time with a recommended default and 2-3 options.55## Output Template56```md57# Test Loop Report: [Name]58## Scope59## Plan60## Generated Tests61## Page Objects62## Selector Gaps Remaining63## Heal Verdicts64## Flake Quarantine65## Real Bugs Found66## Automation Health67feedback_loop_minutes: ; suite_reliability_pct: ; release_cadence: ; prod_escape_rate: ; release_confidence: high | medium | low68## Outcome Report69{schema_version: 1, run_id: "[run-id]", slug: "[slug]", workflow: test-loop, feature_status: implemented, started_at: "[timestamp]", completed_at: "[timestamp]", requirement_trace: {brd_objectives: [], requirements: [], acceptance_criteria: [], srs: []}, completed_evidence: [], missing_evidence: [], decision_needed: [], recommended_next_workflow: verify-work, cost: {source: unavailable}, agent: {identity: "[agent-identity]", model: "[model]"}}70## Next Workflow71verify-work | dev-fix72## Cost Report73Call `get_session_cost(workflow="test-loop")` before final handoff.74```75