End-to-end backend API test automation from test case input to working automated tests.
Prerequisite: Rosetta Prep Steps.
Terminology. External systems are named by role throughout this workflow and its phases: Test Management System (TMS), Issue Tracker, and Wiki. TestRail, Jira, and Confluence are canonical examples only — adapt identifiers, URLs, requests, calls, and query syntax to the systems resolved for the current project (from repository-root gain.json, explicit user input, recognizable URLs/handles, and available integrations).
At completion the user has: corrected, passing API test files in the repository; the per-session artifacts under plans/api-aqa-{IDENTIFIER}/ (raw-data.md, api-analysis.md, analysis.md, test-specs.md, execution-report.md); and agents/TEMP/<FEATURE>/api-aqa-state.md recording phase completion, metrics, and HITL approvals.
- Phases 0→7 MUST run in order; sanctioned skips per
<skip_rules> only.
- All Rosetta prep steps MUST be FULLY completed, SKILL
load-project-context loaded and fully executed.
- NO ASSUMPTIONS: never assume endpoints, payloads, auth mechanisms, or response schemas — ask the user when missing.
- MUST ALWAYS use todo tasks ledger, ASAP. Prioritize ACCURACY over SPEED. Proactively use available tools/MCPs, if question can be answered from code or MCP call - do that first.
- Drive loop (owned by this workflow): execute phases in order — for each: APPLY PHASE its phase file → update
agents/TEMP/<FEATURE>/api-aqa-state.md → verify the phase-output gate → next; keep todos matched to the active phase; never batch-load future phases; never skip without approval (<skip_rules>). When a phase delegates work to subagents, dispatch per USE SKILL orchestration.
- Phase-output gate (verify before advancing): each phase's mandatory artifact must exist and pass its phase-file completion gate before the next phase starts — notably Phase 4: every
ATC-NNN in test-specs.md traces to a Phase 3 source (a raw-data.md test case and/or an analysis.md G[N]/C[N]/A[N] finding); also Phase 1 raw-data.md, Phase 2 api-analysis.md, and Phase 6 execution-report.md present and non-placeholder.
This block owns ONLY the api-aqa-flow-specific skip rules below: a set of always-in-force carve-outs plus a single verification-failure unilateral-start override (the only no-ask deviation; its preconditions are in the table further down). The carve-outs bind unconditionally; the override is subordinate to them. Gate-execution mechanics (how to run an approval gate, token handling) are owned by USE SKILL hitl — defer to it; not restated here.
Always-in-force carve-outs (the override never suppresses these):
- Per-phase HITL gates (Phases 3-7 marked
type="HITL") — explicit user approval per the hitl skill.
- NO ASSUMPTIONS rule (above) — every non-skip-gate decision.
- Safety / destructive confirmations — file deletion, edits outside
plans/api-aqa-{IDENTIFIER}/, comparable irreversible actions.
Verification-failure unilateral-start override — subordinate to the hitl skill + the carve-outs above; the only no-ask deviation, applies only at this skip-verification gate.
| Precondition (ALL true, independently verified) |
Action |
(a) user asserts Phases 0-2 complete this turn AND (b) agents/TEMP/<FEATURE>/api-aqa-state.md marks them complete AND (c) raw-data.md + api-analysis.md exist under plans/api-aqa-{IDENTIFIER}/ |
Print (a)/(b)/(c) each with its concrete evidence (user-assertion quote · the api-aqa-state rows · the two artifact paths), then skip Phases 0-2 and resume at Phase 3. Any precondition not showable with concrete evidence → treat as uncertain (last row). |
| Any of (a)/(b)/(c) false AND user instruction unambiguous |
Print failing conditions; begin Phase 0 same turn. |
| Any precondition uncertain |
Fall back to normal HITL ask. Ambiguity defaults to ASK. |
agents/TEMP/<FEATURE>/api-aqa-state.md carries: header (Last Updated / Current Phase 0-7 / Test Case Source / Feature / IDENTIFIER — matching the Phase 0 stub; API Base URL is appended once Phase 2 resolves it) + 8-row ## Phase Completion Status checklist (one row per phase 0-7) + per-phase append blocks. Each phase file owns its own state-update snippet (the delta it appends after running) — this workflow does not restate the full template.
Subagents: discoverer · architect · engineer · executor (optional, mechanical actions).
Cross-phase skills: qa-structure (paths / identifier / state-file shape) and qa-knowledge (modes, taxonomies, artifact skeletons — loads its own assets at point of use).
Integrations: TMS, Issue Tracker, and Wiki per <description_and_purpose> Terminology.
1---2name: api-aqa-flow-53description: "Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated."4tags: ["workflow"]5baseSchema: docs/schemas/workflow.md6metadata:7 source: https://skillmd.com/skills/griddynamics/api-aqa-flow-58---910<api_aqa_flow>1112<description_and_purpose>1314End-to-end backend API test automation from test case input to working automated tests.1516Prerequisite: Rosetta Prep Steps.1718**Terminology.** External systems are named by role throughout this workflow and its phases: **Test Management System (TMS)**, **Issue Tracker**, and **Wiki**. TestRail, Jira, and Confluence are canonical examples only — adapt identifiers, URLs, requests, calls, and query syntax to the systems resolved for the current project (from repository-root `gain.json`, explicit user input, recognizable URLs/handles, and available integrations).1920**At completion the user has:** corrected, passing API test files in the repository; the per-session artifacts under `plans/api-aqa-{IDENTIFIER}/` (`raw-data.md`, `api-analysis.md`, `analysis.md`, `test-specs.md`, `execution-report.md`); and `agents/TEMP/<FEATURE>/api-aqa-state.md` recording phase completion, metrics, and HITL approvals.2122</description_and_purpose>2324<workflow_phases>2526- **Phases 0→7 MUST run in order**; sanctioned skips per `<skip_rules>` only.27- All Rosetta prep steps MUST be FULLY completed, SKILL `load-project-context` loaded and fully executed.28- NO ASSUMPTIONS: never assume endpoints, payloads, auth mechanisms, or response schemas — ask the user when missing.29- MUST ALWAYS use todo tasks ledger, ASAP. Prioritize ACCURACY over SPEED. Proactively use available tools/MCPs, if question can be answered from code or MCP call - do that first.30- **Drive loop (owned by this workflow):** execute phases in order — for each: APPLY PHASE its phase file → update `agents/TEMP/<FEATURE>/api-aqa-state.md` → verify the phase-output gate → next; keep todos matched to the active phase; never batch-load future phases; never skip without approval (`<skip_rules>`). When a phase delegates work to subagents, dispatch per USE SKILL `orchestration`.31- **Phase-output gate (verify before advancing):** each phase's mandatory artifact must exist and pass its phase-file completion gate before the next phase starts — notably **Phase 4: every `ATC-NNN` in `test-specs.md` traces to a Phase 3 source** (a `raw-data.md` test case and/or an `analysis.md` `G[N]`/`C[N]`/`A[N]` finding); also Phase 1 `raw-data.md`, Phase 2 `api-analysis.md`, and Phase 6 `execution-report.md` present and non-placeholder.3233<skip_rules>3435This block owns ONLY the api-aqa-flow-specific skip rules below: a set of **always-in-force carve-outs** plus a single **verification-failure unilateral-start override** (the only no-ask deviation; its preconditions are in the table further down). The carve-outs bind unconditionally; the override is subordinate to them. Gate-execution mechanics (how to run an approval gate, token handling) are owned by USE SKILL `hitl` — defer to it; not restated here.3637- **Always-in-force carve-outs** (the override never suppresses these):38 1. Per-phase HITL gates (Phases 3-7 marked `type="HITL"`) — explicit user approval per the `hitl` skill.39 2. NO ASSUMPTIONS rule (above) — every non-skip-gate decision.40 3. Safety / destructive confirmations — file deletion, edits outside `plans/api-aqa-{IDENTIFIER}/`, comparable irreversible actions.4142- **Verification-failure unilateral-start override** — subordinate to the `hitl` skill + the carve-outs above; the only no-ask deviation, applies only at this skip-verification gate.4344 | Precondition (ALL true, independently verified) | Action |45 |---|---|46 | (a) user asserts Phases 0-2 complete this turn AND (b) `agents/TEMP/<FEATURE>/api-aqa-state.md` marks them complete AND (c) `raw-data.md` + `api-analysis.md` exist under `plans/api-aqa-{IDENTIFIER}/` | **Print (a)/(b)/(c) each with its concrete evidence** (user-assertion quote · the api-aqa-state rows · the two artifact paths), then skip Phases 0-2 and resume at Phase 3. Any precondition not showable with concrete evidence → treat as uncertain (last row). |47 | Any of (a)/(b)/(c) false AND user instruction unambiguous | Print failing conditions; begin Phase 0 same turn. |48 | Any precondition uncertain | Fall back to normal HITL ask. **Ambiguity defaults to ASK.** |4950</skip_rules>5152<execution_policy>53- If user did not specify preferences, perform all steps except optional.54- MUST follow JIT phase-by-phase: do not load/act IN ADVANCE.55- User CAN customize: specific phases, already-done phases, specific goals, specific cases — LISTEN and ADOPT.56- USE SKILL `coding` before implementation or correction work that touches repository test code or shared utilities.57- **Repository coding standards:** follow `<coding_standards_precedence>`.58- Prefer extending existing test files and utilities over creating new ones.59- **Overall workflow done when:** every phase required for this run is marked complete in `agents/TEMP/<FEATURE>/api-aqa-state.md`, expected artifacts for those phases exist under `plans/api-aqa-{IDENTIFIER}/` (and related paths named in phase docs), and the user accepts the last test outcome or explicitly stops the run.60</execution_policy>6162<project_config_loading phase="0" applies="ALL" subagent="discoverer" role="AQA project config loader" subagent_required_model="gpt-6-luna-high" type="HITL-CONDITIONAL">63- APPLY SKILL FILE `phases/api-aqa-flow-project-config-loading.md`64- Input: user request. Output: project config file, initial data file, session directory at `plans/api-aqa-{IDENTIFIER}/`.65- HITL gate: **ASK USER FOR PROJECT INFO** if config does not already exist.66- Required skills: `qa-structure`, `sensitive-data` (redaction at intake)67- Recommended skills: `questioning` (config-missing interview)68- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 0 is not complete until its output spot-check passes.69</project_config_loading>7071<data_collection phase="1" applies="ALL" subagent="discoverer" role="AQA data collector" subagent_required_model="gpt-6-luna-high">72- APPLY SKILL FILE `phases/api-aqa-flow-data-collection.md`73- Input: project config + initial data. Output: `plans/api-aqa-{IDENTIFIER}/raw-data.md` (test cases, documentation, existing test patterns).74- Required skills: `data-collection` (TMS + Wiki collector), `qa-knowledge` (`code_analysis` mode — existing-test + backend-source scan), `reverse-engineering`, `qa-structure`75- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 1 is not complete until its output spot-check passes.76</data_collection>7778<api_spec_analysis phase="2" applies="ALL" subagent="discoverer" role="API spec analyst" subagent_required_model="gpt-6-luna-high">79- APPLY SKILL FILE `phases/api-aqa-flow-api-spec-analysis.md`80- Input: raw data + project config. Output: `plans/api-aqa-{IDENTIFIER}/api-analysis.md` (endpoint contracts, auth, data dependencies).81- Required skills: `qa-knowledge` (`code_analysis` mode — API-contract extraction), `reverse-engineering`, `sensitive-data`, `qa-structure`82- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 2 is not complete until its output spot-check passes.83</api_spec_analysis>8485<gap_and_requirements_clarification phase="3" applies="ALL" subagent="architect" role="Test requirements analyst" subagent_required_model="gpt-6.1-sol-high" type="HITL">86- APPLY SKILL FILE `phases/api-aqa-flow-gap-and-requirements-clarification.md`87- Input: raw data + API analysis. Output: `plans/api-aqa-{IDENTIFIER}/analysis.md` (gaps, contradictions, ambiguities resolved).88- HITL gate: **WAIT FOR USER ANSWERS** before Phase 4.89- Required skills: `qa-knowledge` (`gap_analysis` mode), `qa-structure`90- Recommended skills: `questioning`91- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 3 is not complete until its output spot-check passes.92</gap_and_requirements_clarification>9394<test_case_specification phase="4" applies="ALL" subagent="architect" role="Test specification author" subagent_required_model="gpt-6.1-sol-high" type="HITL">95- APPLY SKILL FILE `phases/api-aqa-flow-test-case-specification.md`96- Input: all phase 1-3 outputs. Output: `plans/api-aqa-{IDENTIFIER}/test-specs.md` (Given-When-Then scenarios).97- HITL gate: **WAIT FOR EXPLICIT USER APPROVAL** before Phase 5; comments, questions, suggestions, and review feedback are not approval.98- Required skills: `qa-knowledge` (`scenario_design` mode), `sensitive-data`, `qa-structure`99- Recommended skills: `hitl`100- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 4 is not complete until its output spot-check passes.101</test_case_specification>102103<test_implementation phase="5" applies="ALL" subagent="engineer" role="Test automation engineer" subagent_required_model="gpt-6-luna-high" type="HITL">104- APPLY SKILL FILE `phases/api-aqa-flow-test-implementation.md`105- Input: approved test specs + existing patterns + API analysis. Output: implemented test files.106- HITL gate: **STOP AND WAIT** — user must provide actual execution results (output, report path, or pass/fail); confirmation alone does not satisfy this gate.107- Required skills: `qa-knowledge` (`implementation_modes` — API impl), `qa-structure`108- Recommended skills: `testing`, `coding` (repo conventions)109- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 5 is not complete until its output spot-check passes.110</test_implementation>111112<execution_and_report_analysis phase="6" applies="ALL" subagent="engineer" role="Test failure analyst" subagent_required_model="gpt-6-luna-high" type="HITL">113- APPLY SKILL FILE `phases/api-aqa-flow-execution-and-report-analysis.md`114- Input: test execution report (user-provided or from `agents/user-instructions/`). Output: `plans/api-aqa-{IDENTIFIER}/execution-report.md` (failure analysis).115- HITL gate: **WAIT FOR USER TO PROVIDE TEST EXECUTION RESULTS**.116- Required skills: `qa-knowledge` (`test_execution_triage` mode), `sensitive-data`, `qa-structure`117- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 6 is not complete until its output spot-check passes.118</execution_and_report_analysis>119120<test_corrections phase="7" applies="ALL" subagent="engineer" role="Test correction engineer" subagent_required_model="gpt-6-luna-high" type="HITL">121- APPLY SKILL FILE `phases/api-aqa-flow-test-correction.md`122- Input: execution report + test files + test specs. Output: corrected test files.123- HITL gate: **WAIT FOR EXPLICIT USER APPROVAL** before applying changes; comments, questions, suggestions, and review feedback are not approval.124- Required skills: `qa-knowledge` (`correction` mode), `qa-structure`125- Recommended skills: `coding` (authors the proposed/applied edits), `debugging` (root-cause alignment), `hitl`126- Update `agents/TEMP/<FEATURE>/api-aqa-state.md`; Phase 7 is not complete until its output spot-check passes.127</test_corrections>128129</workflow_phases>130131<coding_standards_precedence>132Conflict rule is binary: if guidance from a loaded skill conflicts with repository markdown (`docs/CONTEXT.md`, `docs/ARCHITECTURE.md`, `agents/IMPLEMENTATION.md` — or the paths `gain.json` configures — and `project_description.md` if present) on naming, structure/layout, tooling, or test patterns, repository markdown wins and the conflicting skill snippet is ignored for that decision. If there is no conflict, apply both. `gain.json` wins for file locations.133Example: if a skill suggests `/tests/api/` but `docs/ARCHITECTURE.md` requires `/qa/api/tests/`, use `/qa/api/tests/`.134</coding_standards_precedence>135136<failure_handling>137- **Phase-file load failure** (APPLY PHASE for a required phase returns nothing): retry once, then stop, record in `agents/TEMP/<FEATURE>/api-aqa-state.md`, ask the user — never improvise an undocumented phase.138- **Missing prior artifact:** do not fabricate; with user agreement re-run the producing phase, or stop and ask the user to restore it.139- **Unreadable `agents/TEMP/<FEATURE>/api-aqa-state.md`:** pause, rebuild minimal phase pointers from `plans/api-aqa-{IDENTIFIER}/` when possible, then ask the user to confirm.140- **State-note example (phase-file load failure):** `Phase 5 blocked: APPLY SKILL FILE `phases/api-aqa-flow-test-implementation.md` returned nothing at 2026-05-25T15:00Z; awaiting user action.`141</failure_handling>142143<state_file>144145`agents/TEMP/<FEATURE>/api-aqa-state.md` carries: header (Last Updated / Current Phase 0-7 / Test Case Source / Feature / IDENTIFIER — matching the Phase 0 stub; `API Base URL` is appended once Phase 2 resolves it) + 8-row `## Phase Completion Status` checklist (one row per phase 0-7) + per-phase append blocks. Each phase file owns its own state-update snippet (the delta it appends after running) — this workflow does not restate the full template.146147</state_file>148149<references>150151Subagents: `discoverer` · `architect` · `engineer` · `executor` (optional, mechanical actions).152153Cross-phase skills: `qa-structure` (paths / identifier / state-file shape) and `qa-knowledge` (modes, taxonomies, artifact skeletons — loads its own assets at point of use).154155Integrations: TMS, Issue Tracker, and Wiki per `<description_and_purpose>` Terminology.156157</references>158159</api_aqa_flow>