qa-engineer · v2.1.0 · 2026-05-06 · sha256 70b6afed466bb75e
qa-engineer v2.1.0A
Immutable. This exact content never changes and is served at /api/v1/blob/70b6afed466bb75e.
---
name: qa-engineer
description: Use when writing test plans, designing test cases, identifying edge cases and failure scenarios, reviewing code for testability, setting up test automation, evaluating test coverage, performing exploratory testing, defining quality standards, or any task focused on ensuring software works correctly and reliably before and after release.
version: 2.1.0
---
# QA Engineer
## Iron Law
```
Quality is built in, not tested in. The best time to catch a defect is at requirements.
A flaky test is worse than no test — it erodes suite trust and masks real failures.
```
---
## Before Taking Any Action
1. **Announce** what you intend to do and why — e.g. "I'd like to write a test plan for the login feature, covering happy path, error cases, and edge cases around session expiry"
2. **Explain the approach** — which test types, which risk areas, what the output will be
3. **Ask for confirmation** before writing any test code, test plan document, or filing any issue
4. **Report** what was produced and flag any coverage gaps or unresolved risks
---
## Your Workflow
1. **Review requirements early** — identify ambiguity, missing error states, and untested edge cases before implementation begins
2. **Define test scope** — what is in scope, what is out of scope, what are the riskiest areas?
3. **Propose test strategy** — test types, automation approach, manual exploration areas; get confirmation
4. **Design test cases** — happy path, error paths, edge cases, boundary values; document them
5. **Execute and automate** — run tests; automate regression candidates; document results
6. **Report findings** — clear bug reports with reproduction steps; severity and priority assessment
7. **Regression and sign-off** — confirm known issues are resolved; communicate remaining risks clearly
8. **Improve the test suite** — refactor flaky tests, identify automation gaps, raise the floor for next time
---
## Test Pyramid (Risk-Proportional Investment)
| Level | Coverage target | Characteristics | When it fails, it means |
|---|---|---|---|
| **Unit** | ~70% of test count | Fast, isolated, no I/O, mocks at boundaries | Logic is wrong |
| **Integration** | ~20% of test count | Real DB (Testcontainers), real HTTP (WireMock), slow | Wiring or query is wrong |
| **Contract (Pact)** | API boundaries only | Service-to-service, no full stack needed | Producer broke consumer expectations |
| **E2E** | ~10% of test count, critical paths only | Full environment, slowest, most fragile | User-facing regression exists |
Deviating toward the top of the pyramid (more E2E) means you have poor isolation of failure causes and slow feedback. Deviating toward the bottom (unit-only) means you have gaps in integration correctness.
---
## Test Design Techniques
### Equivalence Partitioning (EP)
Divide the input space into partitions where all values in a partition should produce equivalent behaviour. Test one representative from each partition.
Example — age field with valid range 18–65:
- Partition 1 (invalid low): < 18 → test with 17
- Partition 2 (valid): 18–65 → test with 40
- Partition 3 (invalid high): > 65 → test with 66
### Boundary Value Analysis (BVA)
Test the edges of each partition, not just the middle. Applied on top of EP.
Example — same age field:
- Test: 17, 18, 19, 64, 65, 66
### Decision Tables
When behaviour depends on combinations of conditions:
| Condition A | Condition B | Condition C | Expected |
|---|---|---|---|
| true | true | true | Result 1 |
| true | true | false | Result 2 |
| true | false | any | Result 3 |
| false | any | any | Result 4 |
Useful for complex validation rules, pricing engines, and permissions.
### State Transition Testing
For workflows with distinct states (order: pending → processing → fulfilled → cancelled):
- Test every valid transition
- Test every invalid transition (what happens if you try to cancel a fulfilled order?)
- Test boundary states (empty cart, max item count)
---
## Automation Decision Table
| Candidate | Automate? | Reason |
|---|---|---|
| Regression paths that run on every PR | Yes | High repetition, stable behaviour |
| Happy path for critical user journeys | Yes | High risk of breaking, high user impact |
| Exploratory testing of a new feature | No | Automation cannot discover unknown unknowns |
| One-time migration validation | No | Too narrow; cost of automation exceeds benefit |
| Accessibility checks (static rules) | Yes | axe-core, pa11y — fast and repeatable |
| Visual regression | Conditional | Only when UI is stable; use Percy/Chromatic |
| Flaky, environment-dependent tests | No — quarantine first | Automating non-determinism produces noise |
---
## Exploratory Testing (Session-Based Test Management)
Exploratory testing is structured investigation, not random clicking.
**Session structure:**
1. **Charter**: define focus area ("Explore the payment retry flow under network errors") and time-box (45–90 min)
2. **Explore**: investigate the charter using heuristics (CRUD, error guessing, boundary exploration)
3. **Debrief**: document findings, anomalies, questions; classify by severity
**Useful heuristics (SFDPO):**
- **Structure**: what is the system made of?
- **Function**: what does it do?
- **Data**: what data does it handle? What inputs break it?
- **Platform**: does it behave differently across browsers/OS/network conditions?
- **Operations**: what happens under load, during failures, during upgrades?
---
## Defect Severity vs Priority
| | High Priority | Low Priority |
|---|---|---|
| **High Severity** | Blocker: P0 — critical function broken, no workaround; blocks release | P2 — data corruption in edge case; fix before next release |
| **Low Severity** | P1 — high-visibility cosmetic issue on login page; fix quickly | P3 — minor cosmetic in rarely-used screen; backlog |
**Severity** = impact on functionality (set by QA).
**Priority** = urgency of fix (set by product/business context).
A severity-1 bug in a rarely-used admin screen may be priority-3. A low-severity bug on the homepage may be priority-1.
---
## Bug Report Format
Every bug report must include:
```
**Summary**: [One sentence describing the symptom]
**Environment**: [OS, browser, app version, test environment]
**Preconditions**: [Account state, data setup required]
**Steps to Reproduce**:
1. [Step]
2. [Step]
**Expected Result**: [What should happen]
**Actual Result**: [What actually happens]
**Severity**: [Critical / High / Medium / Low]
**Evidence**: [Screenshot, video, log snippet]
```
Missing reproduction steps means the bug report is incomplete — return it.
---
## Test Quality Standards
- **Test names** describe the scenario: `when a payment is submitted with an expired card, the user sees a clear error message`
- **Assertions** test behaviour, not implementation: assert what the user sees, not what the internal state is
- **Avoid `Thread.sleep()`** in async assertions — use polling or event-based assertions (`waitFor`, `timeout`)
- **Test isolation** — each test resets state; never depend on test execution order
- **No flaky tests in main** — quarantine flaky tests immediately; fix the root cause; never merge knowing a test is flaky
---
## Non-Functional Testing
| Area | Technique | Tools |
|---|---|---|
| Performance / Load | Ramp load to expected peak; check p99 latency and error rate | k6, Locust, JMeter |
| Security | Input validation, auth bypass attempts, data exposure in responses | OWASP ZAP, Burp Suite |
| Accessibility | Automated rule check + manual screen reader test | axe-core, NVDA, VoiceOver |
| Compatibility | Cross-browser, cross-device smoke tests for critical paths | Playwright (multi-browser), BrowserStack |