/testing:test-strategyfrom testing
Creates a test strategy using the testing pyramid (unit/integration/E2E), sets coverage targets, and identifies high-risk code. Use when planning test coverage for new features or auditing existing tests.
Ships in testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Systematic approach to test planning: pyramid structure (70% unit, 20% integration, 10% E2E), coverage targets (70-80%), and risk-based testing.
You are planning test coverage for a feature. Your role is to:
Good testing builds confidence, not false security. 100% coverage often means testing trivia instead of business logic.
Based on Martin Fowler, Google Testing, and J.B. Rainsberger:
Unit Tests (70% of tests):
test_calculate_discount_rate_returns_0_05_for_vip()Integration Tests (20% of tests):
test_user_registration_saves_to_database()E2E Tests (10% of tests):
test_checkout_flow_creates_order_and_sends_confirmation()Ask: "What breaks the business?"
High-risk areas:
Low-risk areas:
Realistic targets:
Total target: 70-80% for whole codebase.
Don't chase 100%. Diminishing returns: 80% coverage catches 95% of bugs; last 20% coverage catches 4% of bugs but takes 50% of effort.
For each function/method:
Example (Order::apply_discount):
For each business flow:
Example (User registration):
For critical user journeys only:
Avoid: Every button click, every error message, every combination. E2E tests are brittle and slow.
Create a matrix showing coverage targets:
| Area | Unit | Integration | E2E | Coverage Target |
|---|---|---|---|---|
| User registration | 10 | 3 | 1 | 90% |
| Payment processing | 15 | 5 | 1 | 95% |
| Reporting | 5 | 2 | 1 | 70% |
When planning tests, deliver:
Feature: Users can create orders with discount codes, apply taxes, and process payments.
E2E (10%): 2 tests
- Checkout flow end-to-end
- Order with discount code
Integration (20%): 8 tests
- Order creation saves to DB
- Payment gateway integration
- Email notifications sent
Unit (70%): 28 tests
- Discount calculation
- Tax calculation
- Validation (email, quantity, amount)
- Payment amount calculation
| Area | Target | Rationale |
|---|---|---|
| Discount logic | 95% | High-risk: affects revenue |
| Tax logic | 90% | High-risk: affects revenue |
| Payment integration | 95% | High-risk: money involved |
| Order persistence | 85% | Medium-risk: data integrity |
| Email notifications | 60% | Low-risk: cosmetic |
| Error handling | 80% | Medium-risk: user experience |
Overall target: 80% code coverage
Discount Calculation:
test_calculate_discount_returns_0_05_for_vip_code()test_calculate_discount_returns_0_10_for_premium_code()test_calculate_discount_raises_for_invalid_code()test_calculate_discount_returns_0_for_no_code()test_calculate_discount_handles_max_discount()Tax Calculation:
test_calculate_tax_returns_correct_rate()test_calculate_tax_zero_for_tax_exempt_item()test_calculate_tax_accumulates_for_multiple_items()test_calculate_tax_rounds_correctly()Validation:
test_validate_email_rejects_invalid_format()test_validate_quantity_rejects_zero()test_validate_quantity_rejects_negative()test_validate_amount_rejects_zero()test_validate_amount_rejects_negative()...13 more unit tests
test_create_order_saves_to_database()test_order_persistence_retrieves_correct_data()test_payment_gateway_processes_valid_payment()test_payment_gateway_rejects_invalid_card()test_payment_failure_rolls_back_order()test_email_service_sends_order_confirmation()test_email_service_sends_payment_receipt()test_concurrent_orders_dont_interfere()test_complete_checkout_flow() — Cart → Payment → Confirmationtest_checkout_with_discount_code() — Apply code → discounted price → successWhat SKILL.md sets; muted values are Claude Code's defaults
general-purpose), in the background9 skills in this plugin
/integration-test-designTesting multiple components together; contract verification; real I/O (database, HTTP). Use when testing component interactions./mutation-testingMeasuring test quality by mutating code and checking if tests catch mutations./performance-test-planLoad testing, profiling, SLA verification, bottleneck identification./property-based-testingGenerative testing with QuickCheck/Hypothesis; testing properties that should hold for all inputs.npx claudepluginhub sethdford/claude-skills --plugin engineer-testingOther plugins' skills for the same job