skills/testing-strategy/SKILL.md
Testing strategies and best practices for unit, integration, and end-to-end tests. Use when setting up test infrastructure, writing test cases, or deciding what to test. Covers test pyramid, mocking strategies, and coverage guidelines.
npx skillsauth add adilkalam/orca testing-strategyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/\
/ \ E2E Tests (few)
/----\ - Critical user flows
/ \ - Smoke tests
/--------\
/ \ Integration Tests (some)
/------------\ - API contracts
/ \- Database queries
/----------------\
Unit Tests (many)
- Pure functions
- Business logic
- Edge cases
test('calculates total with discount', () => {
// Arrange
const items = [{ price: 100 }, { price: 50 }];
const discount = 0.1;
// Act
const total = calculateTotal(items, discount);
// Assert
expect(total).toBe(135);
});
// Jest mock
jest.mock('./api', () => ({
fetchUser: jest.fn().mockResolvedValue({ id: 1, name: 'Test' })
}));
// Spy on method
const spy = jest.spyOn(service, 'save');
expect(spy).toHaveBeenCalledWith(expectedData);
// Mock timer
jest.useFakeTimers();
jest.advanceTimersByTime(1000);
describe('POST /users', () => {
it('creates user with valid data', async () => {
const response = await request(app)
.post('/users')
.send({ name: 'Test', email: '[email protected]' })
.expect(201);
expect(response.body).toMatchObject({
id: expect.any(Number),
name: 'Test'
});
});
});
// Playwright example
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 page.fill('[data-testid="email"]', '[email protected]');
await page.click('[data-testid="submit"]');
await expect(page.locator('[data-testid="success"]')).toBeVisible();
});
testing
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
tools
Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.
tools
Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.
development
Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.