Test Loop Skill
[!IMPORTANT] Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).
Optional args: slug=<feature>, ticket=<id/url>, mode=interactive|autonomous|channel, channel=<id>, 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-mcpscripts/preflight.sh); record unavailable drivers indriver_blocked[](STLC Stage 4).
- Plan (STLC Stage 2-3, V-Model System Level):
- Run
specialist-test-plannerperquality-engineering-test-plan-authoringto producetest_plan_pathandselector_gapsusing C1/C2/C6 templates andskills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md. - BLOCKED (no stable
AC-*trace) if trace missing; BLOCKED (HALT: <trigger>) when planner triggers HALT.
- Run
- Prepare selectors:
- Run
specialist-testid-inserteronselector_gaps; in interactive mode stop for approval on itsAPPROVAL: requiredlist; in autonomous mode passapproved_production_editsonly when granted, else carry gaps forward inselector_gaps_remaining[]. - For
lane: web, build/extend page objects perquality-engineering-playwright-pom-generationintopage_objects[]. Mobile uses stable accessibility IDs perquality-engineering-selector-stability.
- Run
- Generate:
- One scenario per
specialist-integration-test-generatorcall, seed-first, via lane driver (web:playwright-cli/Playwright MCP; mobile: Appium MCP/platform runner). Unstable locator scenarios land inselector_gaps_remaining[].
- One scenario per
- Run and heal (STLC Stage 5: Triage, Flaky Analysis, Defect Drafting):
- Run generated suite; per failure, run
specialist-test-healerintoheal_verdicts[]. HEALEDonly withRERUNS: 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_HEALlogs toreal_bugs[](defect drafting fordev-fix);QUARANTINE_CANDIDATEroutes toquality-engineering-flaky-triageintoflake_quarantine[];BLOCKED(missing driver/evidence) recorded inmissing_evidence.- Visual baseline changes require reviewed diff with named approver per
quality-engineering-visual-baseline.
- Run generated suite; per failure, run
- Handoff (STLC Stage 6 Closure):
- Calculate Automation Health (
quality-engineering-automation-health), carryrelease_confidence, open defects, and residual risks perskills/quality-engineering/quality-engineering-test-plan-authoring/references/lifecycle-and-roles.md. Technical PASS validates test suite only; route toverify-work.
- Calculate Automation Health (
Runtime Contract
- Use after
implement-featurereaches 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.