mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
98e58c3c27
- Integrate 8 previously unregistered MCP handlers: - Chaos engineering: chaos_inject_latency, chaos_inject_failure, chaos_resilience_test - Integration testing: integration_dependency_check, integration_test_orchestrate - Token-optimized: test_execute_filtered, performance_test_filtered, quality_assess_filtered - Create NewDomainToolsHandler.ts to route new domain tools Dead code removal (~22k lines): - Delete 4 overlapping filtered handlers (coverage, flaky, security, contract) - Remove unused directories: src/alerting/, src/reporting/, src/transport/ - Remove 4 unregistered CLI command dirs: fleet/, test/, quality/, monitor/ (42 files) - Archive 10 one-time verification scripts to scripts/archive/ - Remove 2 CLI backup files (index-spec.ts, index-working.ts) Test organization: - Move HNSWPatternStore.test.ts from src/ to tests/unit/memory/ - Delete OutputFormatter duplicate test from src/ - Consolidate duplicate RuVector and learning-persistence tests - Rename RuVector.SelfLearning.test.ts for consistent naming Dependencies: - Remove unused packages: jose, @types/chrome, gpt-tokenizer Build config: - Exclude src/edge/ subdirectories from main tsconfig (separate build) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AQE Fleet Integration Tests
This directory contains comprehensive integration tests for the Agentic Quality Engineering (AQE) fleet, designed to validate agent coordination, memory persistence, error recovery, concurrent operations, and hook integration points.
Test Structure
🧪 38 Comprehensive Integration Tests
1. Agent Coordination (Tests 1-5)
- File:
agent-coordination.test.js - Focus: Multi-agent communication, task distribution, coordination protocols
- Tests:
- Test Generator and Executor coordination
- Coverage Analyzer and Quality Gate coordination
- Performance and Security agent coordination
- Sequential task handoff with state persistence
- Error handling in task handoff chain
2. Memory Persistence (Tests 6-12)
- File:
memory-persistence.test.js - Focus: Claude Flow memory operations, cross-session persistence, state management
- Tests: 6. Store and retrieve test execution state 7. Agent coordination through shared memory 8. Memory namespace isolation 9. Session state preservation across restarts 10. Memory-based agent recovery after failure 11. High-volume memory operations 12. Memory cleanup and garbage collection
3. Error Recovery (Tests 13-20)
- File:
error-recovery.test.js - Focus: Fault tolerance, graceful degradation, automatic recovery systems
- Tests: 13. Test generator agent failure and recovery 14. Coverage analyzer timeout and fallback 15. Quality gate circuit breaker pattern 16. Memory corruption recovery 17. Hook execution failure recovery 18. Cascade failure isolation 19. Test results recovery after partial execution 20. Artifact recovery and validation
4. Concurrent Operations (Tests 21-28)
- File:
concurrent-operations.test.js - Focus: Parallel agent execution, race condition handling, resource contention
- Tests: 21. Concurrent test generation by multiple agents 22. Parallel coverage analysis with resource sharing 23. Concurrent quality gate validation 24. Memory access synchronization 25. File system contention handling 26. Resource pool contention 27. High concurrency agent spawning 28. Memory stress test under concurrent load
5. Hook Integration (Tests 29-38)
- File:
hook-integration.test.js - Focus: Claude Flow hooks, lifecycle management, event-driven coordination
- Tests: 29. Pre-task hook execution and validation 30. Post-task hook with metrics and coordination 31. Post-edit hook with file coordination 32. Session management hooks 33. Notification hook for agent coordination 34. Hook-based workflow orchestration 35. Error propagation through hooks 36. Hook execution performance under load 37. Hook reliability and retry mechanisms 38. Hook integration with memory persistence
Running Tests
Prerequisites
# Ensure AQE CLI is available
npm install -g @agentic-qe/cli
# Install dependencies
npm install
# Ensure Claude Flow is available
npm install -g claude-flow@alpha
Run All Tests
# Using the test suite runner
node tests/integration/integration-test-suite.js run
# Using Jest directly
npm run test:integration
# Using AQE CLI
aqe test integration
Run Specific Tests
# Run a specific test number (1-38)
node tests/integration/integration-test-suite.js run 15
# Run a specific test file
npx jest tests/integration/agent-coordination.test.js
# Run tests by pattern
npx jest --testNamePattern="memory"
Run Tests with Coverage
npx jest tests/integration/ --coverage --coverageDirectory=coverage/integration
Test Features
🔄 Hive Mind Coordination
All tests integrate with the AQE hive mind through Claude Flow memory:
- Store test execution status
- Share results between agents
- Coordinate test scheduling
- Report failures and recoveries
🚀 Performance Validation
- Concurrent execution testing (up to 50+ parallel operations)
- Memory stress testing (1000+ operations)
- Hook performance under load
- Resource contention handling
🛡️ Error Recovery Testing
- Agent failure and recovery mechanisms
- Memory corruption handling
- Circuit breaker patterns
- Cascade failure isolation
📊 Comprehensive Reporting
- Detailed test execution reports
- Performance metrics
- Error analysis
- Recommendations for improvements
Test Configuration
Memory Namespaces
aqe-test: General test operationsaqe-memory-test: Memory persistence testsaqe-recovery-test: Error recovery testsaqe-concurrent-test: Concurrent operations testsaqe-hook-test: Hook integration tests
Environment Variables
# Test workspace directory
TEST_WORKSPACE=/tmp/aqe-integration-tests
# Claude Flow namespace
CLAUDE_FLOW_NAMESPACE=aqe-test
# Test timeout (milliseconds)
JEST_TIMEOUT=30000
# Concurrency level for parallel tests
TEST_CONCURRENCY=10
Test Utilities
Helper Functions
execCommand(): Execute shell commands with proper error handlingsimulateAgentExecution(): Mock agent execution for testingsimulateMemoryOperations(): Test memory operationsvalidateCoordination(): Verify agent coordination
Mock Data
- Agent configurations
- Test execution results
- Memory state snapshots
- Error scenarios
Continuous Integration
GitHub Actions Integration
# .github/workflows/integration-tests.yml
name: AQE Integration Tests
on: [push, pull_request]
jobs:
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
- run: npm run test:integration
Quality Gates
- 90% test pass rate required
- Maximum 30-second execution time
- Zero memory leaks
- No race conditions detected
Debugging
Enable Debug Logging
DEBUG=aqe:* npm run test:integration
Memory Analysis
# Check memory usage during tests
node --max-old-space-size=4096 tests/integration/integration-test-suite.js run
# Memory leak detection
node --expose-gc --inspect tests/integration/memory-persistence.test.js
Hook Debugging
# Enable Claude Flow debug mode
CLAUDE_FLOW_DEBUG=true npm run test:integration
Contributing
Adding New Tests
- Follow the existing test structure
- Include hive mind coordination
- Add performance assertions
- Include error scenarios
- Update test count in documentation
Test Naming Convention
- Test files:
[category].test.js - Test descriptions: Descriptive action statements
- Test numbers: Sequential (1-38, continue from 39+)
Code Quality
- ESLint compliance
- JSDoc documentation
- Error handling
- Performance considerations