Skip to main content

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:

StrategyCoverage
smokeCritical happy paths only
regressionFull feature coverage, positive and negative
securityAuth bypass, injection, access control
performancek6 load test generation
fullAll 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:

  1. Go to Plans in QA Hub
  2. Review the generated scenarios
  3. Click Approve or Reject

Approved cases are moved to READY status.

Tips for best results

  • Use --focus prompts to scope generation to specific features
  • Run crawl_app on the authenticated version of the app for richer locators
  • Commit auth-state.json to a secret manager — it contains active session tokens
  • Schedule the full cycle in CI to detect regressions automatically