Full Cycle Workflow
The full cycle is the complete automated pipeline: from codebase scan to test execution and result ingestion — all driven by a single conversation with an AI agent.
Prerequisites
- MCP Test Architect configured and connected
- Target application running locally or on a reachable URL
- QA Hub project created with
write-scoped API token - AI provider configured in QA Hub (Settings → AI Model)
Start the cycle
In Claude Code or Desktop, prompt:
Use the QA Hub Architect to run a full test cycle for the app at http://localhost:3000.
Project ID: clxyz123
Focus on: authentication and checkout flows
The agent will walk through each stage automatically.
Stages
Stage 1 — Analyze architecture
The agent scans the project file tree, discovers routes and features, and builds architecture.json. This grounds all subsequent generation in real code, preventing hallucinated selectors or nonexistent endpoints.
Stage 2 — Select strategy
Based on the project scope and your prompt, the agent selects a testing strategy:
| Strategy | Coverage |
|---|---|
smoke | Critical happy paths only |
regression | Full feature coverage, positive and negative |
security | Auth bypass, injection, access control |
performance | k6 load test generation |
full | All of the above |
Stage 3 — Generate test plan
The agent calls /api/v1/architect/generate-plan with the architecture catalog. The AI returns BDD scenarios scoped to the selected strategy and modules.
Stage 4 — Crawl the app
Playwright navigates the running application and collects real DOM locators for the pages and flows covered by the test plan. This ensures generated specs use actual selectors, not guessed ones.
Stage 5 — Save auth session
The agent logs in as a test user and saves the browser state to auth-state.json. Test fixtures load this state to skip login overhead on every test.
Stage 6 — Generate specs
The agent calls /api/v1/architect/generate-specs with scenarios + DOM locators. The AI returns complete Playwright TypeScript spec files with worker-scoped auth fixtures.
Stage 7 — Execute
npx playwright test specs/ --reporter=json
Results are captured and posted to /api/v1/ingest. Test cases tagged with @qa-hub('TC-NNN') are mapped to the library.
Stage 8 — Review in QA Hub
Open the QA Hub Dashboard:
- New test cases appear in the Test Case Library
- A completed test run shows pass/fail per test
- Coverage metrics update automatically
Approve a generated plan
If the plan was submitted for review (via write_plan), a QA Manager must approve it before the test cases are merged into the library:
- Go to Plans in QA Hub
- Review the generated scenarios
- Click Approve or Reject
Approved cases are moved to READY status.
Tips for best results
- Use
--focusprompts to scope generation to specific features - Run
crawl_appon the authenticated version of the app for richer locators - Commit
auth-state.jsonto a secret manager — it contains active session tokens - Schedule the full cycle in CI to detect regressions automatically