specwright/templates/skills/dev-team/qa/test-strategy/SKILL.md
# Test Strategy Skill > Role: QA Engineer - Test Strategy & Planning > Created: 2026-01-09 > Purpose: Define comprehensive testing strategies and coordinate test planning across the project lifecycle ## Skill Activation Activate this skill when: - Planning testing approach for new features or projects - Defining test coverage requirements and acceptance criteria - Creating test plans for releases or sprints - Establishing testing standards and quality gates - Coordinating testing activities a
npx skillsauth add michsindlinger/specwright specwright/templates/skills/dev-team/qa/test-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.
Role: QA Engineer - Test Strategy & Planning Created: 2026-01-09 Purpose: Define comprehensive testing strategies and coordinate test planning across the project lifecycle
Activate this skill when:
# Test pyramid for Rails applications:
# - 70% Unit Tests (models, services, helpers)
# - 20% Integration Tests (controllers, API endpoints)
# - 10% System Tests (full user flows)
# Example test strategy configuration
# spec/rails_helper.rb
RSpec.configure do |config|
# Coverage targets
config.minimum_coverage = 80
config.minimum_coverage_by_file = 60
# Test execution settings
config.use_transactional_fixtures = true
config.global_fixtures = :all
end
// Test pyramid for React applications:
// - 70% Unit Tests (components, hooks, utilities)
// - 20% Integration Tests (component interactions)
// - 10% E2E Tests (user workflows)
// jest.config.js
module.exports = {
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
testMatch: [
'**/__tests__/**/*.test.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)'
]
};
// playwright.config.ts
export default {
testDir: './tests/e2e',
timeout: 30000,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
// Define test environments
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
{ name: 'mobile', use: { ...devices['iPhone 12'] } }
]
};
[MCP_TOOLS]
<!-- Populated during skill creation based on: 1. User's installed MCP servers 2. User's selection for this skill Recommended for this skill (examples): - fetch - Retrieve test documentation and requirements - github - Access project management and issues - filesystem - Manage test artifacts and reports Note: Skills work without MCP servers, but functionality may be limited -->## Risk Assessment Matrix
| Feature Area | Business Impact | Technical Complexity | Test Priority | Test Approach |
|--------------|----------------|---------------------|---------------|---------------|
| User Authentication | Critical | Medium | P0 | Automated + Manual |
| Payment Processing | Critical | High | P0 | Automated + Security |
| User Profile | High | Low | P1 | Automated |
| Admin Dashboard | Medium | Medium | P2 | Automated + Exploratory |
| Email Notifications | Low | Low | P3 | Automated |
### Priority Definitions
- **P0**: Must be tested before release, blocks deployment if failing
- **P1**: Should be tested before release, requires sign-off
- **P2**: Can be tested post-release with monitoring
- **P3**: Tested periodically, lower coverage acceptable
## Test Distribution Strategy
### Unit Tests (70% of total tests)
**Purpose**: Verify individual units of code in isolation
**Coverage Target**: 85%+
**Execution Speed**: < 10 minutes for full suite
**Responsibility**: Developers write during development
**Focus Areas**:
- Business logic in models/services
- Utility functions and helpers
- Input validation and data transformation
- Error handling and edge cases
### Integration Tests (20% of total tests)
**Purpose**: Verify interactions between components
**Coverage Target**: 70%+
**Execution Speed**: < 20 minutes for full suite
**Responsibility**: Developers + QA Engineers
**Focus Areas**:
- API endpoints and controllers
- Database interactions
- External service integrations
- Authentication and authorization flows
### E2E Tests (10% of total tests)
**Purpose**: Verify complete user workflows
**Coverage Target**: Critical paths only
**Execution Speed**: < 30 minutes for full suite
**Responsibility**: QA Engineers
**Focus Areas**:
- Critical user journeys (signup, checkout, etc.)
- Cross-browser compatibility
- Mobile responsiveness
- Performance under realistic conditions
# Test Plan: [Feature/Release Name]
## Overview
**Feature**: [Feature name]
**Release Date**: [Target date]
**Test Lead**: [Name]
**Status**: [Planning/In Progress/Complete]
## Test Objectives
- [ ] Verify all acceptance criteria are met
- [ ] Ensure no regressions in existing functionality
- [ ] Validate performance meets requirements
- [ ] Confirm security requirements satisfied
- [ ] Test cross-browser compatibility
## Scope
### In Scope
- [List features/functionality to be tested]
- [Specific user flows]
- [Platforms/browsers to test]
### Out of Scope
- [Features explicitly not tested]
- [Known limitations]
- [Future enhancements]
## Test Approach
### Automated Testing
- Unit Tests: [Coverage target]%
- Integration Tests: [Coverage target]%
- E2E Tests: [Number of critical flows]
### Manual Testing
- Exploratory Testing: [Hours allocated]
- Usability Testing: [If applicable]
- Cross-browser Testing: [Browsers/devices]
## Test Environment
- **Development**: For developer testing
- **Staging**: For QA and stakeholder review
- **Production**: Post-deployment smoke tests
## Test Data Requirements
- [User accounts needed]
- [Test data sets]
- [Third-party service credentials]
## Entry Criteria
- [ ] All features code-complete
- [ ] Unit tests passing (>85% coverage)
- [ ] Feature deployed to staging
- [ ] Test environment stable
- [ ] Test data prepared
## Exit Criteria
- [ ] All P0 test cases passed
- [ ] All P1 test cases passed or have approved exceptions
- [ ] No critical or high-severity bugs open
- [ ] Code coverage targets met
- [ ] Performance benchmarks achieved
- [ ] Security scan completed
- [ ] Stakeholder sign-off received
## Risks & Mitigation
| Risk | Impact | Likelihood | Mitigation |
|------|--------|-----------|------------|
| [Risk description] | [High/Med/Low] | [High/Med/Low] | [Mitigation strategy] |
## Schedule
| Phase | Start Date | End Date | Status |
|-------|-----------|----------|--------|
| Test Planning | [Date] | [Date] | [Status] |
| Test Case Development | [Date] | [Date] | [Status] |
| Test Execution | [Date] | [Date] | [Status] |
| Regression Testing | [Date] | [Date] | [Status] |
| Bug Fixing & Retesting | [Date] | [Date] | [Status] |
## Metrics to Track
- Test cases executed vs. planned
- Pass/fail rate
- Defect density by severity
- Code coverage achieved
- Test execution time trends
## User Story: [Story title]
### Success Criteria
**Given** [initial context/precondition]
**When** [action taken by user]
**Then** [expected outcome]
### Example Scenarios
#### Happy Path
- [ ] User can [primary action] successfully
- [ ] System displays [expected feedback]
- [ ] Data is [saved/updated/deleted] correctly
#### Edge Cases
- [ ] Handles empty/null input appropriately
- [ ] Validates maximum input length
- [ ] Prevents duplicate submissions
- [ ] Handles concurrent operations safely
#### Error Scenarios
- [ ] Shows clear error message for invalid input
- [ ] Recovers gracefully from network failures
- [ ] Handles timeout conditions
- [ ] Logs errors for debugging
#### Non-Functional Requirements
- [ ] Response time < [X]ms for 95th percentile
- [ ] Page load time < [X] seconds
- [ ] Supports [X] concurrent users
- [ ] WCAG 2.1 Level AA accessibility compliance
- [ ] Works in [browsers/devices list]
Track these metrics to evaluate test strategy effectiveness:
tools
Session Handoff: Erstellt eine vollständige Zusammenfassung der aktuellen Session für einen sauberen Kontextwechsel. NUR bei explizitem Aufruf (/session-handoff). NICHT automatisch auslösen. Geeignet wenn der User die Session resetten will, den Kontext aufräumen will, oder bei ~120k Tokens angelangt ist.
development
Pre-Mortem Risk Analysis: Strukturierte Prospective-Hindsight-Übung um launch-blocking Risiken vor Commitment aufzudecken. Team stellt sich vor, das Produkt sei 14 Tage nach Launch gefloppt, und arbeitet rückwärts. Klassifiziert Risiken in Tigers (echt), Paper Tigers (hypothetisch), Elephants (unausgesprochen). Nutze diesen Skill vor Build-Commitment, bei zu hoher Stakeholder-Confidence, vor Major-Releases, oder wenn das Team vage Sorgen nicht artikulieren kann. Trigger: /pre-mortem, 'pre-mortem', 'risk analysis', 'was könnte schiefgehen', 'risiken vor launch'.
testing
Six-Sigma Atomicity Validator for create-spec stories
tools
UX pattern definition guidance for navigation, user flows, interactions, and accessibility