Claude Code for QA engineers — 5 practical workflows
Claude Code is a CLI environment that gives the AI assistant context of your entire repository. For a QA engineer it's the most efficient way to generate tests, fix flaky scenarios and keep the framework consistent — without opening a browser.
This article is a practical guide with 5 workflows we actually use at our clients.
1. Setup: Claude Code for a QA project
Start by installing the official CLI from claude.com/claude-code. After claude login open the repo and run claude. On the first run, configure CLAUDE.md at the root with your project conventions:
# Test Automation — konvencie - Framework: Cypress 14 + TypeScript - Page Object pattern v cypress/support/pages/ - Žiadne hardcoded waits — používaj cy.intercept() alebo .should() - data-qa atribúty pre selektory - Test data cez factories (cypress/support/factories/) - Mailgun pre email flows
Claude reads this file with every instruction. You save hours of explanation.
2. Generating a test from a user story
Classic case: analyst writes a user story in Jira, you need a test. In the Claude Code environment:
> Napíš Cypress test pre túto user story: "Ako používateľ chcem pridať položku do košíka, prejsť na checkout a dokončiť platbu cez Stripe. Po úspešnej platbe chcem vidieť potvrdenie objednávky s číslom." Pozri si existujúci paymentPage v cypress/support/pages/ a použij konvencie ako v ostatných testoch v cypress/e2e/checkout/.
Claude reads existing files, understands the style guide, and generates a test that compiles and runs — not just looks right.
3. Refactoring flaky tests
Got 15 flaky tests and a week-long deadline? Point Claude at the list:
> Zanalyzuj cypress/e2e/checkout/payment.spec.ts. Identifikuj anti-flaky patterns (hardcoded timeouts, chýbajúce intercepty, DOM race conditions) a oprav ich. Zachovaj business logiku nezmenenú.
In ~70% of cases the output is immediately usable. For the remaining 30%, a review round pays off — Claude sometimes replaces cy.wait() with cy.intercept() that catches the wrong request.
4. Pull request review
Add a sub-agent (file .claude/agents/qa-reviewer.md) with a system prompt:
Si QA reviewer. Skontroluj PR a upozorni na: - duplikáty existujúcich testov - hardcoded timeouts - chýbajúce data-qa selektory - testy bez negative scenárov - porušenia Page Object patternu
Invoke it via /agents qa-reviewer on every PR. You get a comment the dev team drops straight into the review.
5. Auto-documentation of the test suite
Documentation is what QA teams love most — reading it, not writing it. Claude does it for you:
> Zgeneruj README.md pre cypress/e2e/checkout/. Pre každý spec súbor vypíš: čo testuje, aké use-case-y pokrýva, aké pre-conditions vyžaduje. Formát: markdown tabuľka.
The output is readable documentation you can show business stakeholders without them having to look at code.
What Claude Code doesn't solve
- It doesn't understand your business — you have to give it context via CLAUDE.md and examples.
- It can't actually run tests through your CI — but it can write a Jenkinsfile or GitHub Action.
- Occasionally hallucinates a selector — always validate that it runs.
Measurable gains
- Test-writing time from 3 h → ~50 min.
- PR reviews with the QA AI agent catch 40–60% of issues before the human reviewer.
- Junior onboarding to the framework: from 3 weeks down to 5 days (CLAUDE.md is the study material).
Want the same approach at your company? Get in touch — dohodneme 30-minute discovery call.