Testing strategy
Skill ComeOnOliver/skillshub/skills/aiskillstore/marketplace/doyajin174/testing-strategy
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill testing-strategyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Comprehensive testing workflow combining TDD, real implementations (no mocking), and E2E testing. Use when implementing features, writing tests, or setting up test infrastructure.
The file declares its own license as MIT. That is the authorβs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.1 KB, as published. Nobody here has run it
Testing Strategy
TDDμ μ€μ ꡬν κΈ°λ° ν μ€νΈλ₯Ό κ²°ν©ν ν΅ν© ν μ€νΈ μ€ν¬μ λλ€.
Iron Law
"NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST"
RED-GREEN-REFACTOR Cycle
1. RED - μ€ν¨νλ ν μ€νΈ μμ±
- μνλ λμμ 보μ¬μ£Όλ μ΅μνμ ν
μ€νΈ μμ±
- ν
μ€νΈκ° μ€ν¨νλμ§ λ°λμ νμΈ
2. GREEN - ν μ€νΈ ν΅κ³Όμν€κΈ°
- ν
μ€νΈλ₯Ό ν΅κ³Όμν€λ κ°μ₯ λ¨μν μ½λ μμ±
- μλ²½ν μ½λ X, λμνλ μ½λ O
3. REFACTOR - 리ν©ν λ§
- μ½λ μ 리 (μ€λ³΅ μ κ±°, λͺ
λͺ
κ°μ )
- ν
μ€νΈκ° κ³μ ν΅κ³Όνλμ§ νμΈ
No Mocking Policy
μ€μ ꡬνμ ν μ€νΈνλΌ
β κΈμ§
jest.mock('./database');
jest.mock('./api');
β νμ©
// μ€μ ν
μ€νΈ DB λλ μΈλ©λͺ¨λ¦¬ DB μ¬μ©
const db = await createTestDatabase();
// MSWλ‘ μ€μ HTTP κ³μΈ΅ ν
μ€νΈ
const server = setupServer(
rest.get('/api/users', (req, res, ctx) => {
return res(ctx.json([{ id: 1, name: 'Test' }]));
})
);
E2E Testing (Playwright)
test('user can complete checkout', async ({ page }) => {
await page.goto('/products');
await page.click('[data-testid="add-to-cart"]');
await page.click('[data-testid="checkout"]');
await expect(page.locator('.confirmation')).toBeVisible();
});
Test Categories
| μ ν | λ²μ | λꡬ |
|---|---|---|
| Unit | ν¨μ/ν΄λμ€ | Vitest, Jest |
| Integration | λͺ¨λ κ° μ°λ | μ€μ DB, MSW |
| E2E | μ 체 μ¬μ©μ νλ¦ | Playwright |
Checklist
- λͺ¨λ ν¨μκ° ν μ€νΈλ¨
- ν μ€νΈκ° λ¨Όμ μ€ν¨νλ κ²μ νμΈ
- Mock μ¬μ© μμ (MSW νμ©)
- E2Eλ‘ ν΅μ¬ νλ¦ κ²μ¦