From aai-testing
Provides test strategy patterns including pyramid ratios (70% unit/20% integration/10% E2E), organization by feature/type, what to test/avoid, prioritization (P0-P2), naming conventions, and fixtures/factories. For planning test suites.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aai-testing:test-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Patterns for planning and organizing test suites.
Patterns for planning and organizing test suites.
┌─────────┐
│ E2E │ Few - Slow, Expensive
├─────────┤
│ Integ │ Some - Medium
├─────────┤
│ Unit │ Many - Fast, Cheap
└─────────┘
tests/
├── auth/
│ ├── login.test.ts
│ ├── logout.test.ts
│ ├── register.test.ts
│ └── password-reset.test.ts
├── users/
│ ├── create-user.test.ts
│ ├── update-user.test.ts
│ └── delete-user.test.ts
└── orders/
├── create-order.test.ts
└── order-flow.e2e.ts
tests/
├── unit/
│ ├── services/
│ ├── utils/
│ └── models/
├── integration/
│ ├── api/
│ └── database/
└── e2e/
├── flows/
└── pages/
Tests that must never fail:
Tests for important features:
Tests for auxiliary features:
// should [expected behavior] when [condition]
it('should return empty array when no users exist')
it('should throw ValidationError when email is invalid')
it('should update user when data is valid')
describe('UserService', () => {
describe('createUser', () => {
describe('with valid data', () => {
it('should create user')
it('should send welcome email')
})
describe('with invalid data', () => {
it('should throw ValidationError for missing email')
it('should throw ValidationError for invalid email format')
})
})
})
// fixtures/users.ts
export const validUser = {
email: '[email protected]',
name: 'Test User',
role: 'user'
}
export const adminUser = {
email: '[email protected]',
name: 'Admin User',
role: 'admin'
}
export const invalidUsers = {
missingEmail: { name: 'No Email' },
invalidEmail: { email: 'not-an-email', name: 'Bad Email' }
}
// factories/user.factory.ts
import { faker } from '@faker-js/faker'
export function createUser(overrides = {}) {
return {
id: faker.string.uuid(),
email: faker.internet.email(),
name: faker.person.fullName(),
createdAt: faker.date.past(),
...overrides
}
}
// Usage
const user = createUser({ role: 'admin' })
const users = Array.from({ length: 10 }, () => createUser())
{
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
},
"./src/services/": {
"branches": 90,
"lines": 90
}
}
}
Used by:
unit-test-developer agentapi-test-developer agente2e-test-developer agentnpx claudepluginhub bradtaylorsf/alphaagent-teamGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.