Flow test strategy execution

From jmagly/aiwg · View interactive version

Flow test strategy execution is an AI agent skill from the GitHub repository jmagly/aiwg. Orchestrate comprehensive test strategy with test suite execution, coverage validation, defect triage, and regression analysis

How to use this skill

Skill file

Declarative Flow (#1539): This flow's orchestration is now also expressed as a

declarative YAML Flow at flows/flow-test-strategy-execution.playbook.yaml (source of truth for the step

sequence + gates). This SKILL.md remains the discoverable trigger surface and prose

reference. See epic #1534.

<!-- 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> --body

```

Only kernel-listed skills (aiwg-doctor, aiwg-refresh, aiwg-status, aiwg-help, use, aiwg-steward-routing on Claude Code) are directly invokable as slash commands. See skill-discovery rule.

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. Delegate agents with the current provider-native orchestration mechanism in the 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:

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

Natural Language Triggers

Users may say:

You recognize these as requests for this test orchestration flow.

Test Levels

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:

--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:

Supporting Artifacts:

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:

```

  1. 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:

Create Test Execution Plan:

1. Test Scope

2. Execution Order

3. Coverage Targets

4. Pass/Fail Criteria

5. Resource 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:

4. Identify coverage gaps:

5. Document failures:

Generate Unit Test Report:

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

"""

)

```

  1. 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

2. Coverage by Component

3. Coverage Trends

4. Recommendations

Save to: .aiwg/working/test-execution/coverage-analysis.md

"""

)

```

Communicate Progress:

⏳ Executing unit tests...
  ✓ Unit tests complete: 245 passed, 3 failed, 2 skipped
  ✓ Coverage: 82% line, 76% branch (targets met)
✓ Unit test execution complete

Step 3: Execute Integration Test Suite

Purpose: Test service interactions and data flows

Your Actions:

Task(
    subagent_type="test-engineer",
    description="Execute integration tests",
    prompt="""
    Scope: Service interactions, API contracts, database operations

    Execute integration tests:
    1. Test Categories
       - API endpoint tests
       - Database integration
       - External service mocks
       - Message queue interactions

    2. Validate
       - Data contracts (request/response schemas)
       - Error handling (4xx, 5xx responses)
       - Transaction boundaries
       - Service dependencies

    3. Collect Metrics
       - API coverage %
       - Response times
       - Error rates
       - Data consistency

    4. Document Issues
       - Contract violations
       - Performance bottlenecks
       - Integration failures
       - Configuration issues

    Generate Integration Test Report:
    - Results by service/API
    - Contract validation
    - Performance metrics
    - Integration health

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

Communicate Progress:

⏳ Executing integration tests...
  ✓ API tests: 45/48 passed
  ✓ Database tests: 22/22 passed
  ✓ External service tests: 15/16 passed
✓ Integration test execution complete

Step 4: Execute E2E and Acceptance Tests

Purpose: Validate complete user journeys and business logic

Your Actions:

  1. Launch E2E Test Execution:

```

Task(

subagent_type="qa-engineer",

description="Execute end-to-end tests",

prompt="""

Execute E2E test suites:

1. Critical User Journeys

2. Cross-browser Testing

3. Test Execution

4. Results Collection

Document:

Save to: .aiwg/working/test-execution/e2e-test-results.md

"""

)

```

  1. Launch UAT Validation (if acceptance level):

```

Task(

subagent_type="product-owner",

description="Validate acceptance criteria",

prompt="""

Read use case specifications

Read e2e test results

Validate:

1. Use case coverage

2. User Experience

3. Business Logic

Acceptance Decision:

Save to: .aiwg/working/test-execution/uat-validation.md

"""

)

```

Communicate Progress:

⏳ Executing E2E tests...
  ✓ Critical journeys: 8/10 passed
  ✓ Cross-browser: All passed
  ✓ UAT validation: CONDITIONAL (2 minor issues)
✓ E2E test execution complete

Step 5: Defect Triage and Root Cause Analysis

Purpose: Analyze failures and assign severity

Your Actions:

  1. Collect All Test Failures:

```

Read all test results:

```

  1. Launch Defect Triage (parallel agents for different severities):

```

# QA Lead for overall triage

Task(

subagent_type="qa-lead",

description="Triage all test failures",

prompt="""

Read all test failure reports

For each failure:

1. Assign Severity

2. Categorize

3. Assign Owner

4. Set Resolution Target

Create defect cards for each issue:

Save to: .aiwg/working/test-execution/defects/

"""

)

# Component Owner for root cause

Task(

subagent_type="component-owner",

description="Root cause analysis for P0/P1 defects",

prompt="""

Analyze high-severity defects:

For each P0/P1 defect:

1. Root Cause Analysis

2. Impact Analysis

3. Fix Strategy

Document root cause analysis

Save to: .aiwg/working/test-execution/root-cause-analysis.md

"""

)

```

Communicate Progress:

⏳ Triaging test failures...
  ✓ Total defects: 11
  ✓ P0 (Critical): 0
  ✓ P1 (High): 2 (assigned, 24hr fix)
  ✓ P2 (Medium): 6
  ✓ P3 (Low): 3
✓ Defect triage complete

Step 6: Regression Analysis and Reporting

Purpose: Compare to baseline and generate final report

Your Actions:

  1. Launch Regression Analysis:

```

Task(

subagent_type="test-architect",

description="Analyze regression vs baseline",

prompt="""

Read current test results

Read baseline results (previous release/iteration)

Regression Analysis:

1. New Failures

2. Fixed Tests

3. Test Health Metrics

4. Quality Trends

Generate Regression Report:

Save to: .aiwg/working/test-execution/regression-analysis.md

"""

)

```

  1. Generate Comprehensive Test Report:

```

Task(

subagent_type="test-manager",

description="Generate test execution report",

prompt="""

Synthesize all test results:

Create Test Execution Report:

# Test Execution Report - {test-level}

## Executive Summary

## Test Results by Level

### Unit Tests

### Integration Tests

### E2E Tests

## Coverage Analysis

## Defect Summary

Top Issues:

{list with severity and owner}

## Regression Status

## Quality Gates

## Recommendations

{specific actions based on results}

## Next Steps

1. {action 1}

2. {action 2}

3. {action 3}

Save to: .aiwg/testing/test-execution-report.md

"""

)

```

  1. Generate Quality Gate Report:

```

Task(

subagent_type="project-manager",

description="Validate quality gates",

prompt="""

Read test execution report

Read quality gate criteria

Validate Gates:

1. Test Pass Rate

2. Coverage Thresholds

3. Critical Defects

4. Performance SLAs

Overall Gate Decision:

Save to: .aiwg/gates/test-quality-gate.md

"""

)

```

Communicate Progress:

⏳ Generating test reports...
  ✓ Regression analysis complete
  ✓ Test execution report generated
  ✓ Quality gate validation complete
✓ Test reporting complete

Step 7: Present Results and Recommendations

Purpose: Summarize results for user decision

Your Actions:

Read final reports and present summary:

─────────────────────────────────────────────
Test Execution Summary
─────────────────────────────────────────────

**Test Level**: {test-level}
**Component**: {target-component}
**Status**: {PASS | FAIL | CONDITIONAL}

**Test Results**:
✓ Unit Tests: 245/248 passed (98.8%)
  Coverage: 82% line, 76% branch
⚠ Integration Tests: 82/86 passed (95.3%)
  3 API contract issues, 1 timeout
✓ E2E Tests: 8/10 critical paths passed (80%)
  2 non-critical UI issues

**Defect Summary**:
- P0 (Critical): 0
- P1 (High): 2 (fix in progress)
- P2 (Medium): 6 (scheduled)
- P3 (Low): 3 (backlog)

**Quality Gates**:
✓ Test Pass Rate: PASS (96% > 95%)
✓ Coverage: PASS (82% > 80%)
⚠ Critical Defects: CONDITIONAL (2 P1s)
✓ Performance: PASS (p95 = 287ms)

**Overall Decision**: CONDITIONAL PASS
- Can proceed with P1 fixes in parallel
- Must resolve before production deployment

**Recommendations**:
1. Fix 2 P1 defects within 24 hours
2. Add tests for uncovered critical path in auth module
3. Investigate flaky integration test (payment service)
4. Schedule P2 fixes for next iteration

**Artifacts Generated**:
- Test Execution Report: .aiwg/testing/test-execution-report.md
- Coverage Report: .aiwg/testing/coverage-report.md
- Defect List: .aiwg/testing/defects/ (11 files)
- Regression Report: .aiwg/testing/regression-report.md
- Quality Gate Report: .aiwg/gates/test-quality-gate.md

─────────────────────────────────────────────

Quality Gates

Before marking workflow complete, verify:

User Communication

At start: Confirm understanding and test scope

Understood. I'll orchestrate test execution for {test-level} testing.

Target: {target-component}
Scope: {test types to run}

This will:
- Execute relevant test suites
- Analyze code coverage
- Triage any failures
- Compare to baseline
- Generate comprehensive reports

Expected duration: 30-60 minutes.

Starting test orchestration...

During: Progress indicators

✓ = Complete
⏳ = In progress
❌ = Failed
⚠️ = Warning/issues found

At end: Summary with recommendations (see Step 7)

Error Handling

Test Environment Unavailable:

❌ Test environment not accessible

Issue: {environment} is down/unreachable
Impact: Cannot execute {test-type} tests

Actions:
1. Check environment status
2. Restart services if needed
3. Use alternate environment
4. Or defer testing with risk acknowledgment

Escalating to DevOps team...

Coverage Below Threshold:

⚠️ Coverage below target

Current: {actual}% line coverage
Target: {threshold}%
Gap: {delta}%

Uncovered areas:
- {component}: {coverage}%
- {component}: {coverage}%

Recommendation: Add tests before proceeding
Or: Accept technical debt with plan

Critical Defects Found:

❌ Critical defects blocking release

P0 Defects: {count}
- {defect-1}: {description}
- {defect-2}: {description}

P1 Defects: {count}
- {list}

Decision: NO-GO for release
Action: Fix P0/P1 defects before proceeding

Success Criteria

This orchestration succeeds when:

References

Templates (via $AIWG_ROOT):

Related Commands:

Test Strategies:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.