Testing Strategy
Relevant source files
The following files were used as context for generating this wiki page:
- cli-tool/components/agents/development-team/test-generator.md
- cli-tool/components/commands/orchestration/feature-dev.md
- cli-tool/components/agents/expert-advisors/specification.md
- cli-tool/components/agents/data-ai/tdd-red.md
- cli-tool/components/skills/ai-research/qa-test-planner/SKILL.md
- cli-tool/templates/javascript-typescript/CLAUDE.md
The testing strategy for this project is a multi-layered approach that integrates automated verification, manual quality assurance planning, and agent-driven test generation. It encompasses a full lifecycle from Test-Driven Development (TDD) and unit testing to complex integration and regression suites, ensuring that both business logic and user-facing features meet high-quality standards.
Sources: cli-tool/components/commands/orchestration/feature-dev.md, cli-tool/components/skills/ai-research/qa-test-planner/SKILL.md
1. Test Architecture and Levels
The project utilizes a structured hierarchy of testing levels to validate functionality at different granularities. This ensures that individual units are correct before they are integrated into larger system flows.
1.1 Automated Testing Levels
The project defines specific focuses for automated tests:
| Test Level | Focus Area |
|---|---|
| Unit Tests | Individual functions, business logic, edge cases, and error handling. |
| Integration Tests | Component interactions, data flow, and API contracts. |
| End-to-End (E2E) | Critical user flows and cross-browser testing. |
| Smoke Tests | High-level validation of critical paths (15-30 min duration). |
| Regression Tests | Comprehensive validation of existing functionality after changes. |
Sources: cli-tool/components/commands/orchestration/feature-dev.md, cli-tool/components/skills/ai-research/qa-test-planner/SKILL.md, cli-tool/templates/javascript-typescript/CLAUDE.md
1.2 Test Lifecycle Flow
The testing process is integrated into the feature development orchestration, occurring after implementation but before final quality review.
This diagram shows the integration of testing within the development workflow, emphasizing the iterative "Fix and Iterate" cycle.
Sources: cli-tool/components/commands/orchestration/feature-dev.md, cli-tool/components/agents/data-ai/tdd-red.md
2. Test-Driven Development (TDD)
The project emphasizes a "Test-First" mindset, particularly during the initial phases of addressing GitHub issues. This is governed by the "Red Phase" principles where implementation does not exist until a failing test is written.
- Fail for the Right Reason: Ensure tests fail due to missing implementation, not syntax errors.
- One Test at a Time: Focus on a single behavior or requirement before moving to the next.
- AAA Pattern: Structure tests using Arrange, Act, and Assert sections.
- GitHub Integration: Tests are directly linked to GitHub issue requirements, using issue numbers in test names and comments.
Sources: cli-tool/components/agents/data-ai/tdd-red.md
3. Agent-Driven Test Generation
During feature development, specialized agents are used to analyze new code and generate comprehensive test cases. This process involves two distinct types of agents working in parallel.
3.1 Parallel Test Generation
- Unit Test Agent: Analyzes individual functions and identifies boundary values and error conditions.
- Integration Test Agent: Focuses on component interactions and API contracts.
3.2 Test Generation Process
- Context Analysis: The agent identifies the testing framework (e.g., Jest, Vitest) and naming conventions.
- Scenario Mapping: Entry points, dependencies, and side effects are mapped.
- Strategy Design: Happy paths and edge cases are planned.
- Verification: The test-runner agent executes the suite, diagnoses root causes for failures, and suggests fixes.
Sources: cli-tool/components/agents/development-team/test-generator.md, cli-tool/components/commands/orchestration/feature-dev.md
4. Manual and Regression Planning
The qa-test-planner skill provides structures for high-level testing deliverables, including manual test cases and visual validation against design mocks.
4.1 Regression Suite Structure
The regression strategy prioritizes tests based on impact and frequency:
| Suite Type | Frequency | Coverage |
|---|---|---|
| Smoke | Daily | Critical paths only (e.g., login, payment). |
| Targeted | Per Change | Affected areas based on impact analysis. |
| Full | Weekly/Release | Comprehensive coverage of all features. |
| Sanity | After Hotfix | Quick validation of specific fixes. |
Sources: cli-tool/components/skills/ai-research/qa-test-planner/SKILL.md
4.2 Design Validation (Figma)
Testing includes a visual consistency check where components are compared against Figma design specifications. This involves checking:
- Dimensions and spacing.
- Color tokens and typography.
- Interactive states (hover, active, disabled).
Sources: cli-tool/components/skills/ai-research/qa-test-planner/SKILL.md
5. Test Automation Infrastructure
For JavaScript/TypeScript environments, the project standardizes on specific tooling and command patterns.
5.1 Tooling Stack
- Frameworks: Jest, Vitest, Cypress, or Playwright.
- Assertions: FluentAssertions (for .NET) or standard library assertions.
- Data Generation: AutoFixture for generating test data.
Sources: cli-tool/templates/javascript-typescript/CLAUDE.md, cli-tool/components/agents/data-ai/tdd-red.md
5.2 Execution Commands
Standardized commands are used to execute the automation suite:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
# Execute specific test types
npm run test:unit
npm run test:integration
npm run test:e2e
Sources: cli-tool/templates/javascript-typescript/CLAUDE.md
6. Testing Automation Strategy in Specifications
All new specifications are required to include a "Test Automation Strategy" section. This section defines:
- Test Data Management: Approach for creation and cleanup of test data.
- CI/CD Integration: Automated testing triggers in GitHub Actions pipelines.
- Coverage Requirements: Minimum code coverage thresholds (typically aiming for 80%+).
- Acceptance Criteria: Defined in a Given-When-Then format to ensure testability.
Sources: cli-tool/components/agents/expert-advisors/specification.md, cli-tool/templates/javascript-typescript/CLAUDE.md
Conclusion
The testing strategy is a comprehensive framework that combines autonomous agent capabilities with rigorous manual planning and TDD principles. By enforcing testing at every stage—from the initial specification to the final quality review—the project ensures that features are functionally correct, visually consistent, and regression-resistant.