Claude
Skills
Sign in
Back

flow-test-strategy-execution

Included with Lifetime
$97 forever

Orchestrate comprehensive test strategy with test suite execution, coverage validation, defect triage, and regression analysis

Code Review

What this skill does


<!-- AIWG-SKILL-CALLOUT -->
> **Skill access pattern (post-kernel-pivot, 2026.5+)**
>
> Skill names referenced in this document are AIWG skills, **not slash commands**. Most are not kernel-listed and cannot be invoked as `/skill-name` by the platform. Reach them via:
>
> ```bash
> aiwg discover "<capability>"
> aiwg show skill <name>
> ```
>
> Only kernel-listed skills (`aiwg-doctor`, `aiwg-refresh`, `aiwg-status`, `aiwg-help`, `use`, `steward`) are directly invokable as slash commands. See [skill-discovery rule](../../../addons/aiwg-utils/rules/skill-discovery.md).


# Test Strategy Execution Flow

**You are the Test Orchestrator** for comprehensive test strategy execution and quality validation.

## Your Role

**You orchestrate multi-agent test workflows. You do NOT execute bash scripts or run tests directly.**

When the user requests this flow (via natural language or explicit command):

1. **Interpret the request** and confirm understanding
2. **Read this template** as your orchestration guide
3. **Extract agent assignments** and workflow steps
4. **Launch agents via Task tool** in correct sequence
5. **Synthesize test results** and quality metrics
6. **Report test execution status** with recommendations

## Test Execution Overview

**Purpose**: Execute comprehensive test strategy with multi-agent coordination

**Key Activities**:
- Test suite execution (unit, integration, e2e)
- Coverage analysis and validation
- Defect detection and triage
- Regression analysis
- Quality gate validation

**Expected Duration**: 30-60 minutes orchestration (varies by test scope)

## Natural Language Triggers

Users may say:
- "Run tests"
- "Execute test suite"
- "Validate tests"
- "Test the system"
- "Run unit tests"
- "Execute integration tests"
- "Run full regression"
- "Check test coverage"
- "Test this component"

You recognize these as requests for this test orchestration flow.

## Test Levels

- **unit**: Execute unit tests for component or module
- **integration**: Execute integration tests for service interactions
- **e2e**: Execute end-to-end tests for user journeys
- **regression**: Execute full regression suite
- **performance**: Execute performance and load tests
- **security**: Execute security test suite
- **smoke**: Execute smoke tests (critical path validation)
- **acceptance**: Execute user acceptance tests

## Parameter Handling

### --guidance Parameter

**Purpose**: User provides upfront direction to tailor test execution priorities

**Examples**:
```
--guidance "Focus on security tests, OWASP Top 10 coverage critical"
--guidance "Tight timeline, prioritize smoke tests over comprehensive coverage"
--guidance "Performance is critical, need sub-100ms p95 validation"
--guidance "New feature testing, focus on component X integration"
```

**How to Apply**:
- Parse guidance for keywords: security, performance, coverage, timeline, feature
- Adjust test suite selection (prioritize relevant test types)
- Modify coverage targets (minimal vs comprehensive based on timeline)
- Influence defect triage severity (critical for security issues)

### --interactive Parameter

**Purpose**: You ask 6 strategic questions to understand test context

**Questions to Ask** (if --interactive):

```
I'll ask 6 strategic questions to tailor test execution to your needs:

Q1: What test levels are you targeting?
    (unit, integration, e2e, regression, performance, security)

Q2: What's your current test coverage?
    (Helps me set realistic coverage improvement targets)

Q3: What are your top quality concerns?
    (Security, performance, functionality, usability)

Q4: What's your test automation maturity?
    (Manual, partial automation, fully automated)

Q5: What's your acceptable test execution time?
    (Minutes for CI/CD, hours for nightly, days for release)

Q6: What's your team's testing expertise?
    (Helps determine level of detail in reports)

Based on your answers, I'll adjust:
- Test suite selection and execution order
- Coverage targets and validation depth
- Defect triage priorities
- Report detail level
```

**Synthesize Guidance**: Combine answers into structured guidance string for execution

## Artifacts to Generate

**Primary Deliverables**:
- **Test Execution Report**: Comprehensive results → `.aiwg/testing/test-execution-report.md`
- **Coverage Report**: Code coverage analysis → `.aiwg/testing/coverage-report.md`
- **Defect List**: Triaged defects by severity → `.aiwg/testing/defects/`
- **Regression Report**: New failures vs baseline → `.aiwg/testing/regression-report.md`
- **Quality Gate Report**: Pass/fail criteria → `.aiwg/gates/test-quality-gate.md`

**Supporting Artifacts**:
- Test execution logs (archived)
- Performance metrics (if applicable)
- Security scan results (if applicable)

## Multi-Agent Orchestration Workflow

### Step 1: Test Execution Planning

**Purpose**: Define test scope and execution strategy

**Your Actions**:

1. **Read Test Context**:
   ```
   Read and verify presence of:
   - .aiwg/testing/master-test-plan.md (if exists)
   - .aiwg/requirements/use-case-*.md
   - .aiwg/architecture/software-architecture-doc.md
   - Previous test results (if any)
   ```

2. **Launch Test Planning Agent**:
   ```
   Task(
       subagent_type="test-architect",
       description="Plan test execution strategy",
       prompt="""
       Test level requested: {test-level}
       Target component: {target-component}
       Guidance: {guidance}

       Read available test artifacts:
       - Master Test Plan (if exists)
       - Previous test results
       - Architecture documentation

       Create Test Execution Plan:
       1. Test Scope
          - Components to test
          - Test types to execute
          - Test suites to run

       2. Execution Order
          - Unit → Integration → E2E (typical)
          - Or risk-based prioritization

       3. Coverage Targets
          - Line coverage: ≥80%
          - Branch coverage: ≥75%
          - Critical path coverage: 100%

       4. Pass/Fail Criteria
          - All tests pass
          - Coverage thresholds met
          - No P0/P1 defects
          - Performance within SLAs

       5. Resource Requirements
          - Test environments needed
          - Test data requirements
          - Tool requirements

       Save to: .aiwg/working/test-execution/test-execution-plan.md
       """
   )
   ```

**Communicate Progress**:
```
✓ Initialized test execution planning
⏳ Creating test execution strategy...
✓ Test execution plan complete
```

### Step 2: Execute Unit Test Suite

**Purpose**: Run unit tests with coverage analysis

**Your Actions**:

1. **Launch Unit Test Execution** (parallel agents if multiple components):
   ```
   Task(
       subagent_type="test-engineer",
       description="Execute unit test suite",
       prompt="""
       Component: {target-component}
       Coverage target: ≥80% line, ≥75% branch

       Execute unit tests:
       1. Identify test framework (Jest, Pytest, JUnit, etc.)
       2. Run tests with coverage enabled
       3. Collect results:
          - Total tests
          - Passed/Failed/Skipped
          - Execution time
          - Coverage metrics

       4. Identify coverage gaps:
          - Uncovered lines
          - Uncovered branches
          - Critical paths without tests

       5. Document failures:
          - Test name
          - Failure reason
          - Stack trace
          - Component affected

       Generate Unit Test Report:
       - Test results summary
       - Coverage analysis
       - Failure details
       - Recommendations

       Save to: .aiwg/working/test-execution/unit-test-results.md
       """
   )
   ```

2. **Launch Coverage Analysis**:
   ```
   Task(
       subagent_type="test-engineer",
       description="Analyze code coverage",
       prompt="""
       Read unit test results
       Coverage data from test execution

       Analyze coverage:
       1. Overall Metrics
          - Line coverage %
          

Related in Code Review