What Claude Code does for QA testing
- Writes end-to-end tests for the flows that matter: sign-up, checkout, the main screens.
- Runs the suite, reads the failures and fixes the test or the code, saying which.
- Drives a real browser to check a change by hand, and files bugs with steps and screenshots.
- Finds flaky tests and quarantines them with an issue, instead of retrying until they pass.
Claude Code features for QA testing
| Feature | What it does | How to start |
|---|---|---|
| Playwright MCP server | Drives a real browser: clicks, types, reads the page and takes screenshots | claude mcp add playwright npx @playwright/mcp@latest |
| Playwright tests | Writes and fixes tests in your repository and runs them like any command | npx playwright test |
claude -p | Runs the suite and fixes failures without the interactive interface | --allowedTools "Bash,Read,Edit" |
| Subagents | Test separate flows in parallel and report back | Define a tester in .claude/agents/ |
How to set up Claude Code for QA testing
Connect the tools
Add the Playwright MCP server so Claude Code can open your app in a browser. For a test suite in the repository, install Playwright as you normally would; Claude runs it like any other command.
# A real browser for exploratory checks claude mcp add playwright npx @playwright/mcp@latest # A test suite, if you don't have one yet npm init playwright@latestWrite the rules in CLAUDE.md
Claude Code reads CLAUDE.md at the start of every session,
claude -pruns included. Put the job's rules there, or in a skill under.claude/skills/if they're long. See the CLAUDE.md guide.## QA rules - Test against the local or staging app, never production. - Use the test accounts in .env.example, never real ones. - A failing test is a finding: say whether the test or the code is wrong before you change either. - Every bug report: steps, expected, actual, a screenshot and the commit you tested. - Don't delete or skip a test to make the suite pass.Run it without the interactive interface
claude -pruns one task and exits, so cron, CI or another tool can start it. Choose what it may do without asking with--allowedToolsor--permission-mode;--output-format jsonreturns the result with its cost.# Run the suite and fix failures, from CI or cron claude -p "Run npx playwright test and fix the failures, following CLAUDE.md" \ --allowedTools "Bash,Read,Edit"Put it on a schedule
Make it a cloud scheduled task with
/schedule(Pro, Max, Ultra, Team and Enterprise), a desktop scheduled task, or/loopwhile a session stays open. See how to make Claude Code proactive.
Limits and safety
- It tests what it can reach: a local or staging app with test data, not production.
- A passing suite covers only the flows someone wrote tests for. Ask it to list what isn't covered.
- Browser runs are slow and use more of your plan. Run the full suite on a schedule and a smoke test on each change.
- Since Claude Code v2.1.302,
claude -pstarts in Manual mode: an action that needs approval is denied unless a rule allows it. Allow only the tools the job needs.
Claude Code or Codex for QA testing?
The rules carry over. Write them once in AGENTS.md and put @AGENTS.md in CLAUDE.md, and both agents read the same file.
Step by step for the other agent: QA testing with Codex.
| Claude Code | Codex | |
|---|---|---|
| Rules file | CLAUDE.md | AGENTS.md |
| Connect tools | claude mcp add | codex mcp add or config.toml |
| Run without you | claude -p | codex exec |
| Schedule | /schedule, desktop scheduled tasks, /loop | Scheduled tasks in the ChatGPT app, cron |
| Built in for QA testing | Playwright MCP, subagents | Playwright MCP, stdin to codex exec |
Make QA testing someone's job
Commands run when someone remembers to run them. Crewmark turns your own Claude Code into an AI employee with a role, a goal in numbers, working hours and a heartbeat, so the work happens on schedule and shows up on a board.
Start from the role
The AI software engineer, with these rules in its brief.
Put the work on its board
Add the job as a recurring issue. The employee wakes on its heartbeat, does it and reports in a comment.
Related
GitHub issues covers what happens to the bugs it files.
FAQ
Can Claude Code use Playwright?
Yes. Add the Playwright MCP server with claude mcp add playwright npx @playwright/mcp@latest to let it drive a browser; it can also write and run Playwright tests in your repository.
Should Claude Code fix failing tests?
Only after it says why they fail. Put the rule in CLAUDE.md: a failure is a finding, and it says whether the test or the code is wrong before changing either.
Can Claude Code run QA on a schedule?
Yes. Run the suite with claude -p from CI or cron, use a scheduled task, or give it to a Crewmark employee as a recurring issue.
Checked against Claude Code's and OpenAI's Codex documentation on November 13, 2026.