@agents-forge/qa-engineer
v1.0.1
Published
AI QA Engineer agent — reads test_plan.md and writes plain English test cases + Playwright automation scripts per module
Maintainers
Readme
⚙️ QA Engineer Agent
Reads your test_plan.md and writes plain English test cases + Playwright automation scripts — one file per module — acting as a Senior QA Engineer.
Part of the @agents-forge AIQA pipeline:
analyst → qa-planner → qa-engineer → qa-reviewer → qa-reporterInstall
npm install @agents-forge/qa-engineer
# Also install playwright-cli for token-efficient script generation
npm install -g @playwright/cli@latest
playwright-cli install --skills
npx playwright install chromiumQuick Start
# Run the full pipeline
npx @agents-forge/analyst https://my-app.com requirements.md
npx @agents-forge/qa-planner requirements.md test_plan.md
npx @agents-forge/qa-engineer test_plan.md --url https://my-app.com
# Then run your tests
npx playwright test --grep @smokeAuthentication
Auto-detected in this order — no config needed:
| Method | Setup |
|---|---|
| Anthropic API key | ANTHROPIC_API_KEY=sk-ant-... in .env |
| Claude subscription | npm install -g @anthropic-ai/claude-code → claude login |
| GitHub Copilot | gh auth login |
Features
- 📖 Reads test_plan.md and identifies all modules automatically
- 📝 Writes
test-cases/<module>.md— professional plain English test cases - 🎭 Writes
tests/<module>.spec.ts— Playwright scripts usingplaywright-cli - ⚙️ Scaffolds
playwright.config.tswith HTML/JSON/JUnit reporters - 🏷️ Tags every test:
@smoke,@regression,@negative,@edge,@p0/p1/p2 - 🔐 Multi-provider auth — API key, claude login, or GitHub Copilot
- ⚡ Uses
playwright-clifor token-efficient, reliable script generation
CLI Usage
# Basic — prompts for base URL
npx @agents-forge/qa-engineer ./test_plan.md
# With base URL provided
npx @agents-forge/qa-engineer ./test_plan.md --url https://www.saucedemo.comProgrammatic Usage
import { runQAEngineer } from "@agents-forge/qa-engineer";
await runQAEngineer({
testPlanFile: "./test_plan.md", // required
baseUrl: "https://www.saucedemo.com", // optional — prompted if omitted
cwd: process.cwd(), // optional
});Output Structure
test-cases/
├── login.md ← plain English test cases
├── menu.md
├── checkout.md
└── cart.md
tests/
├── login.spec.ts ← Playwright automation
├── menu.spec.ts
├── checkout.spec.ts
└── cart.spec.ts
playwright.config.ts ← multi-browser configEach .md file structure:
# Login — Test Cases
## Smoke Tests (@smoke @p0)
| ID | Title | Preconditions | Steps | Expected Result |
## Regression Tests (@regression @p1)
## Negative Tests (@negative @p1)
## Edge Cases (@edge @p2)Each .spec.ts structure:
test.describe("Login — Smoke", () => { ... }) // @smoke @p0
test.describe("Login — Regression", () => { ... }) // @regression @p1
test.describe("Login — Negative", () => { ... }) // @negative @p1
test.describe("Login — Edge Cases", () => { ... }) // @edge @p2Running Tests
npx playwright test # all tests
npx playwright test --grep @smoke # smoke only
npx playwright test --grep @regression # regression suite
npx playwright test --grep @p0 # P0 priority only
npx playwright test tests/login.spec.ts # single module
npx playwright show-report # HTML reportPrerequisites
| Requirement | Version |
|---|---|
| Node.js | >= 20.0.0 |
| @playwright/cli | latest (global) |
| Playwright skills | playwright-cli install --skills |
Environment Variables
| Variable | Description |
|---|---|
| ANTHROPIC_API_KEY | Anthropic API key |
| BASE_URL | Override the base URL at test runtime |
| QA_ENGINEER_MODEL | Override the AI model used |
Troubleshooting
| Error | Fix |
|---|---|
| Test plan not found | Run @agents-forge/qa-planner first |
| playwright-cli not found | npm install -g @playwright/cli@latest |
| Authentication failed | Set ANTHROPIC_API_KEY or run claude login |
| Browser not installed | npx playwright install chromium |
| Tests fail on CI | Set BASE_URL env var in your CI pipeline |
License
MIT
