{
  "id": "qa-test-agents",
  "title": "AI QA agent: plan, write and self-heal end-to-end tests",
  "category": "coding-agents",
  "job": "Get real end-to-end test coverage for your web app without writing every test by hand: an agent explores the app, writes a test plan, turns it into Playwright tests and repairs tests that break when the UI changes.",
  "difficulty": "Intermediate",
  "tools": [
    {
      "id": "claude-code",
      "name": "Claude Code",
      "url": "https://claude.com/product/claude-code",
      "kind": "coding-agent",
      "summary": "Anthropic's agentic coding tool for the terminal and IDEs. Included in paid Claude plans.",
      "open_source": false,
      "pricing": {
        "plans": [
          {
            "name": "Pro",
            "usd_month": 20,
            "note": "$17/mo billed yearly; 5-hour and weekly usage limits"
          },
          {
            "name": "Max 5x",
            "usd_month": 100,
            "note": "5x Pro usage per session"
          },
          {
            "name": "Max 20x",
            "usd_month": 200,
            "note": "20x Pro usage per session"
          }
        ],
        "source": "https://claude.com/pricing",
        "status": "verified",
        "notes": "Free Claude plan does not include Claude Code."
      },
      "last_checked": "2026-10-28"
    },
    {
      "id": "codex",
      "name": "OpenAI Codex",
      "url": "https://openai.com/codex",
      "kind": "coding-agent",
      "summary": "OpenAI's coding agent for web, CLI, IDE and cloud tasks, bundled with ChatGPT plans.",
      "open_source": false,
      "pricing": {
        "plans": [
          {
            "name": "Free",
            "usd_month": 0,
            "note": "Lightweight tasks, GPT-6 Luna"
          },
          {
            "name": "Go",
            "usd_month": 8,
            "note": "Lightweight tasks"
          },
          {
            "name": "Plus",
            "usd_month": 20,
            "note": "GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna"
          },
          {
            "name": "Pro",
            "usd_month": 100,
            "note": "Pro 100 / Pro 200 / Pro 500 ($500 adds Ultrafast); billed monthly only"
          }
        ],
        "source": "https://learn.chatgpt.com/docs/pricing",
        "status": "verified",
        "notes": "Pro tiers confirmed on OpenAI's pricing docs and help center (Oct 22, 2026). Go and Plus prices are from a third-party tracker (modelpick.dev); OpenAI's page didn't render them as text. Since Oct 28, 2026, Pro 100/200/500 subscribers can also claim $100/$200/$500 a month in OpenAI API credits."
      },
      "last_checked": "2026-10-27"
    },
    {
      "id": "playwright-mcp",
      "name": "Playwright MCP",
      "url": "https://github.com/microsoft/playwright-mcp",
      "kind": "browser",
      "summary": "Microsoft's MCP server that lets agents drive a real browser via accessibility snapshots.",
      "open_source": true,
      "pricing": {
        "plans": [
          {
            "name": "Open source",
            "usd_month": 0,
            "note": "Runs locally with npx"
          }
        ],
        "source": "https://playwright.dev/docs/getting-started-mcp",
        "status": "verified",
        "notes": null
      },
      "last_checked": "2026-10-21"
    }
  ],
  "model": "Your agent's default (Claude Sonnet 5.5 in Claude Code; GPT-6.1 Sol or the cheaper GPT-6.1 Terra in Codex)",
  "mcp_servers": [
    "Playwright's browser tools, wired into the agents by npx playwright init-agents"
  ],
  "config": {
    "filename": "terminal",
    "language": "bash",
    "code": "# 1. Add Playwright Test to your project (skip if you already have it)\nnpm init playwright@latest\n\n# 2. Generate the planner, generator and healer agents for your tool\nnpx playwright init-agents --loop=claude    # Claude Code\n# npx playwright init-agents --loop=codex   # Codex\n# npx playwright init-agents --loop=vscode  # VS Code (v1.105+)\n# npx playwright init-agents --loop=opencode\n\n# 3. Run the suite (no AI needed here, so it works in CI)\nnpx playwright test\n\n# Re-run step 2 after every Playwright upgrade"
  },
  "starter_prompt": "Use the Playwright planner agent with tests/seed.spec.ts as the seed. Explore http://localhost:3000 and write a test plan for <flow, e.g. signup then checkout> to specs/<flow>.md: the happy path, three edge cases and one error case. Stop and show me the plan. After I approve it, use the generator agent to turn it into tests under tests/, run them, and use the healer agent on any failures. Don't change app code. If a test fails because the app itself is broken, skip that test and tell me why instead of weakening the assertion.",
  "monthly_cost": {
    "min_usd": 20,
    "max_usd": 20,
    "note": "Playwright and its test agents are free and open source. The cost is your agent plan: Claude Pro $20 for Claude Code or ChatGPT Plus $20 for Codex. Running the finished tests in CI only uses CI minutes, not AI."
  },
  "steps": [
    "Install Playwright Test in your repo (npm init playwright@latest) and make sure your app runs locally.",
    "Run npx playwright init-agents with the loop for your tool (claude, codex, vscode or opencode). It adds the planner, generator and healer agent definitions.",
    "Write tests/seed.spec.ts: the minimum setup to reach a ready page (fixtures, a test user, the base URL). Every generated test starts from it.",
    "Ask the planner for one flow at a time and review the Markdown plan in specs/ before generating anything.",
    "Generate the tests, run npx playwright test, and let the healer fix broken locators or waits.",
    "Commit specs/ and tests/ together, run the suite in CI on every PR, and re-run init-agents whenever you upgrade Playwright."
  ],
  "why_this_works": "The job is split into three narrow agents with files you can read in between: a human-readable plan in specs/, plain Playwright tests in tests/, and a healer that only touches failing tests. You review a short plan instead of hundreds of generated lines, and the result is ordinary Playwright code that runs in CI without any AI.",
  "watch_out": "An agent that can edit tests can also \"fix\" a test by weakening it. Review healer diffs like any PR, and make sure a real bug ends up as a skipped test with a note, not a deleted assertion. Point it at a local or staging app with test accounts, never production.",
  "unverified": [
    "We haven't measured how many plan, generate and heal rounds fit in a $20 plan's usage limits.",
    "Not hands-on tested yet; built from Playwright's Test Agents docs (playwright.dev/docs/test-agents)."
  ],
  "tested": false,
  "last_checked": "2026-10-27"
}