v2/examples/04-testing/README.md
Scripts for testing Claude Flow functionality and validating system features.
04-testing/
├── unit/ # Unit tests for individual components
├── integration/ # Integration tests for workflows
├── performance/ # Performance benchmarks
├── sparc/ # SPARC-specific tests
├── sparc-swarm-test.sh # Original SPARC test suite
└── test-swarm-cli.sh # Original CLI tests
unit/)cd examples/04-testing/unit
./test-memory-system.sh
integration/)cd examples/04-testing/integration
./test-workflow-execution.sh
performance/)cd examples/04-testing/performance
./benchmark-swarm.sh
Comprehensive SPARC TDD test suite (235 lines)
CLI functionality tests (129 lines)
# Run full SPARC test suite
./sparc-swarm-test.sh
# Run CLI tests
./test-swarm-cli.sh
# Verbose mode for debugging
./sparc-swarm-test.sh --verbose
# Test specific strategy
./test-swarm-cli.sh --strategy development
spec-pseudocode: Requirements and pseudocodearchitect: System designtdd: Test-driven developmentcode: Implementationdebug: Troubleshootingsecurity-review: Vulnerability scanningintegration: System integrationdevelopment: Building applicationsresearch: Information gatheringanalysis: Code quality reviewtesting: Test creationoptimization: Performance tuningWhen adding tests:
Both scripts include helper functions:
run_test: Execute test with timingcheck_output: Validate resultsassert_equals: Value comparisonassert_contains: String matchingmeasure_performance: Timing checks