Testing Strategy
Overview
This skill guides agents in selecting and applying appropriate testing strategies for any deliverable. The right testing approach depends on what's being tested, its criticality, and the available time and resources.
When to Use
- Before starting development to define testing approach upfront
- When planning how to verify a deliverable works correctly
- When deciding what types of tests to write and in what order
- When test coverage or quality is questioned
- When introducing a new feature, change, or fix
- Don't use when: Building throwaway prototypes or exploratory proofs of concept
Core Procedures
Step 1: Determine Testing Scope
Ask:
- What is the complexity of the deliverable? (simple/moderate/complex)
- What is the criticality? (low/medium/high/critical)
- Who will use it? (internal team/cross-company/end users)
- What are the failure consequences? (inconvene/degraded/blocked/harmful)
Step 2: Select Testing Layers
Based on scope, select applicable testing layers:
| Deliverable Type |
Required Testing |
Optional |
| Single function/method |
Unit tests |
Property-based tests |
| Module/component |
Unit + integration tests |
Performance tests |
| API/Service |
Unit + integration + contract tests |
Load/security tests |
| UI/Feature |
Unit + E2E tests |
Accessibility/usability tests |
| System/Platform |
Integration + E2E + load tests |
Security/chaos tests |
| Data/Analytics |
Data validation tests |
Accuracy/privacy tests |
| Prompt/AI output |
Functional tests + evaluation tests |
Bias/safety tests |
| Infrastructure |
Integration + smoke tests |
Chaos/disaster recovery tests |
Step 3: Define Test Cases
For each testing layer, define cases covering:
- Happy Path: Expected inputs produce expected outputs
- Edge Cases: Boundary conditions, empty/null inputs, maximum values
- Error Cases: Invalid inputs, missing dependencies, failure modes
- Regression Cases: Previously discovered bugs, known issues
Step 4: Prioritize Test Execution
Order:
- Unit tests first (fast, cheap, isolate problems)
- Integration tests second (verify component interaction)
- E2E/system tests third (verify full workflow)
- Performance/security tests as applicable
- Manual/acceptance tests last
Step 5: Set Coverage Targets
| Criticality |
Minimum Coverage |
Target Coverage |
| Low |
50% |
70% |
| Medium |
70% |
85% |
| High |
85% |
95% |
| Critical |
95% |
100% |
Quality Checklist
Error Handling
- Error: Cannot automate a test case
Response: Document manual test, explore automation alternatives, flag for future automation
- Error: Tests are too slow to run regularly
Response: Separate into fast/slow suites, run fast suite on every change, slow suite on schedule
- Error: Tests are flaky (intermittent failures)
Response: Fix or quarantine flaky tests immediately - they undermine confidence in test suite
Cross-Team Integration
Related Skills: test-driven-development, testing-verification, output-validation-checklist, edge-case-analysis
Used By: ALL agents writing code or deliverables, especially testing agents (QA teams, Code Reviewers)
1---2name: testing-strategy3description: >4 Use when planning how to test any deliverable or system. This skill provides a5 framework for selecting the right testing approach based on what is being delivered,6 ensuring comprehensive coverage without unnecessary overhead.7metadata:8 source: https://skillmd.com/skills/construct-ai-primary/testing-strategy9---1011# Testing Strategy1213## Overview14This skill guides agents in selecting and applying appropriate testing strategies for any deliverable. The right testing approach depends on what's being tested, its criticality, and the available time and resources.1516## When to Use17- Before starting development to define testing approach upfront18- When planning how to verify a deliverable works correctly19- When deciding what types of tests to write and in what order20- When test coverage or quality is questioned21- When introducing a new feature, change, or fix22- **Don't use when:** Building throwaway prototypes or exploratory proofs of concept2324## Core Procedures2526### Step 1: Determine Testing Scope27Ask:28- What is the complexity of the deliverable? (simple/moderate/complex)29- What is the criticality? (low/medium/high/critical)30- Who will use it? (internal team/cross-company/end users)31- What are the failure consequences? (inconvene/degraded/blocked/harmful)3233### Step 2: Select Testing Layers34Based on scope, select applicable testing layers:3536| Deliverable Type | Required Testing | Optional |37|-----------------|-----------------|----------|38| Single function/method | Unit tests | Property-based tests |39| Module/component | Unit + integration tests | Performance tests |40| API/Service | Unit + integration + contract tests | Load/security tests |41| UI/Feature | Unit + E2E tests | Accessibility/usability tests |42| System/Platform | Integration + E2E + load tests | Security/chaos tests |43| Data/Analytics | Data validation tests | Accuracy/privacy tests |44| Prompt/AI output | Functional tests + evaluation tests | Bias/safety tests |45| Infrastructure | Integration + smoke tests | Chaos/disaster recovery tests |4647### Step 3: Define Test Cases48For each testing layer, define cases covering:491. **Happy Path:** Expected inputs produce expected outputs502. **Edge Cases:** Boundary conditions, empty/null inputs, maximum values513. **Error Cases:** Invalid inputs, missing dependencies, failure modes524. **Regression Cases:** Previously discovered bugs, known issues5354### Step 4: Prioritize Test Execution55Order:561. Unit tests first (fast, cheap, isolate problems)572. Integration tests second (verify component interaction)583. E2E/system tests third (verify full workflow)594. Performance/security tests as applicable605. Manual/acceptance tests last6162### Step 5: Set Coverage Targets63| Criticality | Minimum Coverage | Target Coverage |64|-------------|-----------------|-----------------|65| Low | 50% | 70% |66| Medium | 70% | 85% |67| High | 85% | 95% |68| Critical | 95% | 100% |6970## Quality Checklist71- [ ] Testing scope appropriate for complexity and criticality72- [ ] All required testing layers included73- [ ] Happy path, edge cases, and error cases covered74- [ ] Tests are automated where possible75- [ ] Coverage targets defined and tracked76- [ ] Tests are maintainable (clear, independent, documented)7778## Error Handling79- **Error:** Cannot automate a test case80 **Response:** Document manual test, explore automation alternatives, flag for future automation81- **Error:** Tests are too slow to run regularly82 **Response:** Separate into fast/slow suites, run fast suite on every change, slow suite on schedule83- **Error:** Tests are flaky (intermittent failures)84 **Response:** Fix or quarantine flaky tests immediately - they undermine confidence in test suite8586## Cross-Team Integration87**Related Skills:** test-driven-development, testing-verification, output-validation-checklist, edge-case-analysis88**Used By:** ALL agents writing code or deliverables, especially testing agents (QA teams, Code Reviewers)