role-qa-engineer
QA Engineer role in AID methodology. Use for test strategy, BDD scenarios, bug reporting, acceptance testing, flaky test prevention.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
QA Engineer role in AID methodology. Use for test strategy, BDD scenarios, bug reporting, acceptance testing, flaky test prevention.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
AID Phase 4 - Development phase. Use for implementing features, TDD practices, code reviews, transitioning from planning to QA.
AID Phase 0 - Research & discovery. Use for validating problem spaces, identifying stakeholders, defining success metrics, deciding whether to proceed.
AID Phase 3 - Implementation Planning with consolidation-first approach. Resolves contradictions between PRD and Tech Spec, creates consolidated master document, then breaks down into actionable tasks and populates Jira. Includes sprint planning and risk assessment.
AID Phase 1 - PRD creation. Use for user stories, acceptance criteria, scoping features, transitioning from discovery to tech spec.
AID Phase 5 - QA and Release. Use for validating implementations, acceptance tests, preparing releases, deployment, operational readiness.
AID Phase 2 - Technical Specification. Use for system architecture, API contracts, data models, security architecture, transitioning from PRD to implementation.
| name | role-qa-engineer |
| description | QA Engineer role in AID methodology. Use for test strategy, BDD scenarios, bug reporting, acceptance testing, flaky test prevention. |
| 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 |
Feature: User Authentication
Scenario: Successful login
Given I am on login page
When I enter valid credentials
Then I should see dashboard
NO ARBITRARY TIMEOUTS.
// Wrong
await sleep(100);
// Right
await waitFor(() => result !== undefined);
| Type | Fix |
|---|---|
| Shared state | Reset in beforeEach |
| File system | Use temp dirs |
| Database | Transaction rollback |
| Global mocks | Restore in afterEach |
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(); });
| Category | Examples |
|---|---|
| Unicode | Jose, Japanese, emojis |
| Boundaries | Empty, 1 char, max |
| Special | O'Brien, |
| Numbers | 0, -1, MAX_INT |
1. REPRODUCE - Exact steps, consistent?
2. ISOLATE - Minimal reproduction
3. DOCUMENT - Clear report with evidence
**Title**: [Action] + [Problem] + [Context]
**Severity**: Critical/Major/Minor
**Reproducibility**: Always/Sometimes/Once
### Steps to Reproduce
### Expected vs Actual
### Evidence
| Anti-Pattern | Fix |
|---|---|
| Happy path only | Test failures |
| Fake test data | Realistic data |
| Arbitrary timeouts | Condition-based |
| Order-dependent | Fresh state |
| Over-mocking | Real dependencies |
| Technical Gherkin | Business language |
| Hardcoded credentials | Use env vars/factories |
| Weak assertions | Check specific values |
| Messy organization | Follow directory structure |
tests/
├── unit/ # Fast, isolated tests
│ ├── services/
│ └── utils/
├── integration/ # Real dependencies
│ ├── api/
│ └── db/
├── e2e/ # End-to-end flows
├── fixtures/ # Test data factories
└── setup/ # Global configuration
| Type | Pattern | Example |
|---|---|---|
| Unit | *.test.ts | user-service.test.ts |
| Integration | *.integration.test.ts | api.integration.test.ts |
| E2E | *.e2e.test.ts | login-flow.e2e.test.ts |
// Format: should_[behavior]_when_[condition]
test('should_return_error_when_email_invalid', () => {});
// ❌ NEVER
const user = { email: 'admin@real.com', password: 'secret123' };
// ✅ ALWAYS
const user = {
email: process.env.TEST_EMAIL || 'test@example.com',
password: process.env.TEST_PASSWORD || 'test-only-pwd'
};
.env.test (gitignored)See references/security-in-tests.md for patterns.
Run in random order:
jest --runInBand --randomize
vitest --sequence.shuffle
pytest --randomly-seed=random
Run single test isolated:
jest --testNamePattern="specific test"
No shared state:
let at describe levelbeforeEach, not beforeAllafterEachBefore marking ANY task complete:
npm test # Full suite must pass
// 1. Comment out code being tested
// 2. Run test - MUST FAIL
// 3. Uncomment - MUST PASS
// ❌ Weak - always passes
expect(result).toBeDefined();
expect(response).toBeTruthy();
// ✅ Strong - can fail
expect(result).toEqual({ id: 1, name: 'User' });
expect(response.status).toBe(200);
expect(items).toHaveLength(3);