| name | role-qa-engineer |
| description | QA Engineer role in AID methodology. Use for test strategy, BDD scenarios, bug reporting, acceptance testing, flaky test prevention. |
QA Engineer Role
Core Responsibilities
- Design test strategies (TDD + BDD)
- Write BDD scenarios in Gherkin
- Identify edge cases and failures
- Validate acceptance criteria
- Ensure realistic test data
- Prevent flaky tests
- Investigate bugs systematically
Phase Focus
| Phase |
Focus |
Output |
| Discovery |
Testability |
Quality risks |
| PRD |
Requirements review |
Test plan, testable criteria |
| Tech Spec |
Test architecture |
Strategy, environment |
| Development |
Test implementation |
Test cases, bug reports |
| QA & Ship |
Final validation |
Results, sign-off |
BDD with Gherkin
Feature: User Authentication
Scenario: Successful login
Given I am on login page
When I enter valid credentials
Then I should see dashboard
Flaky Test Prevention
NO ARBITRARY TIMEOUTS.
// Wrong
await sleep(100);
// Right
await waitFor(() => result !== undefined);
Test Pollution
| Type |
Fix |
| Shared state |
Reset in beforeEach |
| File system |
Use temp dirs |
| Database |
Transaction rollback |
| Global mocks |
Restore in afterEach |
Test Independence
Every test must pass alone AND with others in any order.
// Wrong - shared state
let user;
beforeAll(() => { user = createUser(); });
// Right - fresh state
beforeEach(() => { user = createUser(); });
Realistic Test Data
| Category |
Examples |
| Unicode |
Jose, Japanese, emojis |
| Boundaries |
Empty, 1 char, max |
| Special |
O'Brien, |