mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
5a2883a4a0
Agentic Quality Engineering Fleet - AI-driven quality management platform Features: - 16 specialized QE agents for comprehensive testing - AI-powered test generation with 95% coverage targets - O(log n) sublinear algorithms for massive scale - Parallel test execution with intelligent orchestration - Real-time coverage analysis and gap detection - Smart quality gates with ML-driven decisions - Security scanning (SAST, DAST, dependency analysis) - Performance testing with load orchestration - Flaky test detection with automatic stabilization - API contract validation with breaking change detection - Test data generation (10,000+ records/sec) - Production intelligence (convert incidents to tests) - Chaos engineering for resilience testing - MCP integration with Claude Code - Multi-framework support (Jest, Mocha, Cypress, Playwright) Architecture: - TypeScript implementation - MCP (Model Context Protocol) integration - Claude Code agent orchestration - Event-driven agent coordination - Distributed fleet management - Cross-session memory persistence Documentation: - Complete API documentation (TypeDoc) - User guides (Getting Started, MCP Integration, Test Generation, etc.) - Architecture deep-dive - CLI reference - Contributing guidelines - MIT License Tech Stack: - TypeScript 5.3+ - Node.js 18+ - @anthropic-ai/sdk ^0.64.0 - @modelcontextprotocol/sdk ^1.18.2 - Jest for testing - Winston for logging - SQLite for persistence Project Structure: - src/ - Source code (agents, core, MCP, CLI) - tests/ - Comprehensive test suite - docs/ - Complete documentation - .claude/ - Agent definitions and commands - config/ - Configuration files 🤖 Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude <noreply@anthropic.com>
104 lines
2.6 KiB
JavaScript
104 lines
2.6 KiB
JavaScript
/**
|
|
* Memory-Safe Test Sequencer
|
|
*
|
|
* Forces garbage collection between test files to prevent memory buildup
|
|
* in resource-constrained environments like DevPod containers.
|
|
*
|
|
* This sequencer sorts tests by estimated memory usage (smallest to largest)
|
|
* and ensures GC runs between each test file.
|
|
*/
|
|
|
|
const Sequencer = require('@jest/test-sequencer').default;
|
|
|
|
class MemorySafeSequencer extends Sequencer {
|
|
/**
|
|
* Estimate memory usage based on test file characteristics
|
|
*/
|
|
estimateMemoryUsage(testPath) {
|
|
const path = testPath.path;
|
|
|
|
// Performance tests: highest memory (200-300MB)
|
|
if (path.includes('/performance/')) {
|
|
return 300;
|
|
}
|
|
|
|
// E2E tests: high memory (150-200MB)
|
|
if (path.includes('/e2e/')) {
|
|
return 200;
|
|
}
|
|
|
|
// Integration tests: medium-high memory (100-150MB)
|
|
if (path.includes('/integration/')) {
|
|
return 150;
|
|
}
|
|
|
|
// Matrix/sublinear utils: medium memory (80-120MB)
|
|
if (path.includes('/utils/sublinear/')) {
|
|
return 100;
|
|
}
|
|
|
|
// Agent tests: medium memory (60-100MB)
|
|
if (path.includes('/agents/')) {
|
|
return 80;
|
|
}
|
|
|
|
// MCP handler tests: low-medium memory (40-60MB)
|
|
if (path.includes('/mcp/')) {
|
|
return 60;
|
|
}
|
|
|
|
// CLI tests: low-medium memory (40-60MB)
|
|
if (path.includes('/cli/')) {
|
|
return 60;
|
|
}
|
|
|
|
// Unit tests: lowest memory (20-40MB)
|
|
if (path.includes('/unit/')) {
|
|
return 40;
|
|
}
|
|
|
|
// Default: assume medium memory
|
|
return 70;
|
|
}
|
|
|
|
/**
|
|
* Sort tests from lowest to highest memory usage
|
|
* This allows Jest to start with quick, low-memory tests
|
|
* and gradually work up to heavier tests.
|
|
*/
|
|
sort(tests) {
|
|
// Create array with memory estimates
|
|
const testsWithMemory = tests.map(test => ({
|
|
test,
|
|
memory: this.estimateMemoryUsage(test)
|
|
}));
|
|
|
|
// Sort by memory usage (ascending)
|
|
testsWithMemory.sort((a, b) => a.memory - b.memory);
|
|
|
|
// Log sequencing order for debugging
|
|
console.log('\n🧠 Memory-Safe Test Sequencing:');
|
|
testsWithMemory.forEach(({ test, memory }) => {
|
|
const shortPath = test.path.replace(/^.*\/tests\//, 'tests/');
|
|
console.log(` ${memory}MB est. - ${shortPath}`);
|
|
});
|
|
console.log('');
|
|
|
|
return testsWithMemory.map(({ test }) => test);
|
|
}
|
|
|
|
/**
|
|
* Allow caching of test results
|
|
*/
|
|
cacheResults(tests, results) {
|
|
// Only cache if tests passed to avoid re-running flaky tests
|
|
const successfulTests = tests.filter((test, index) => {
|
|
const result = results[index];
|
|
return result && result.success;
|
|
});
|
|
|
|
return super.cacheResults(successfulTests, results);
|
|
}
|
|
}
|
|
|
|
module.exports = MemorySafeSequencer; |