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>
67 lines
2.6 KiB
JavaScript
Executable File
67 lines
2.6 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Pre-Test Memory Check Script
|
|
* Validates available system memory before running tests
|
|
*/
|
|
|
|
const os = require('os');
|
|
const chalk = require('chalk');
|
|
|
|
const MIN_REQUIRED_MB = 512; // Minimum free memory required
|
|
const RECOMMENDED_MB = 1024; // Recommended free memory
|
|
|
|
function checkMemory() {
|
|
const totalMemory = os.totalmem();
|
|
const freeMemory = os.freemem();
|
|
const usedMemory = totalMemory - freeMemory;
|
|
|
|
const totalGB = (totalMemory / 1024 / 1024 / 1024).toFixed(2);
|
|
const freeGB = (freeMemory / 1024 / 1024 / 1024).toFixed(2);
|
|
const freeMB = (freeMemory / 1024 / 1024).toFixed(0);
|
|
const usedPercent = ((usedMemory / totalMemory) * 100).toFixed(1);
|
|
|
|
console.log('\n🔍 Pre-Test Memory Check:\n');
|
|
console.log(` Total Memory: ${totalGB}GB`);
|
|
console.log(` Free Memory: ${freeGB}GB (${freeMB}MB)`);
|
|
console.log(` Memory Usage: ${usedPercent}%`);
|
|
console.log(` Node Max Old: ${process.env.NODE_OPTIONS || 'default'}\n`);
|
|
|
|
// Check minimum requirements
|
|
if (freeMemory / 1024 / 1024 < MIN_REQUIRED_MB) {
|
|
console.error(chalk.red(`❌ ERROR: Insufficient memory to run tests safely!`));
|
|
console.error(chalk.red(` Required: ${MIN_REQUIRED_MB}MB, Available: ${freeMB}MB\n`));
|
|
console.log(chalk.yellow('💡 Suggestions:'));
|
|
console.log(chalk.yellow(' 1. Close unnecessary applications'));
|
|
console.log(chalk.yellow(' 2. Run tests in smaller batches'));
|
|
console.log(chalk.yellow(' 3. Use: npm run test:unit-only (lower memory)\n'));
|
|
process.exit(1);
|
|
}
|
|
|
|
// Warn if below recommended
|
|
if (freeMemory / 1024 / 1024 < RECOMMENDED_MB) {
|
|
console.warn(chalk.yellow(`⚠️ WARNING: Memory is below recommended levels`));
|
|
console.warn(chalk.yellow(` Recommended: ${RECOMMENDED_MB}MB, Available: ${freeMB}MB`));
|
|
console.log(chalk.yellow(' Tests may run slower or fail due to memory constraints.\n'));
|
|
console.log(chalk.cyan('💡 Consider using:'));
|
|
console.log(chalk.cyan(' - npm run test:safe (ultra-conservative settings)'));
|
|
console.log(chalk.cyan(' - npm run test:unit-only (lighter memory footprint)\n'));
|
|
} else {
|
|
console.log(chalk.green(`✅ Memory check passed! Sufficient memory available.\n`));
|
|
}
|
|
|
|
// Recommend garbage collection
|
|
if (process.execArgv.includes('--expose-gc')) {
|
|
console.log(chalk.green('✅ Garbage collection exposed (--expose-gc)\n'));
|
|
} else {
|
|
console.log(chalk.yellow('💡 Consider enabling --expose-gc for better memory management\n'));
|
|
}
|
|
}
|
|
|
|
// Run the check
|
|
try {
|
|
checkMemory();
|
|
} catch (error) {
|
|
console.error(chalk.red('❌ Error checking memory:'), error.message);
|
|
process.exit(1);
|
|
} |