seo-generator-server/tests/run-pipeline-4-phases-with-reporter.js
StillHammer 4f60de68d6 Fix BatchProcessor initialization and add comprehensive test suite
- Fix BatchProcessor constructor to avoid server blocking during startup
- Add comprehensive integration tests for all modular combinations
- Enhance CLAUDE.md documentation with new test commands
- Update SelectiveLayers configuration for better LLM allocation
- Add AutoReporter system for test automation
- Include production workflow validation tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:17:49 +08:00

54 lines
1.8 KiB
JavaScript

#!/usr/bin/env node
/**
* RUNNER POUR PIPELINE 4 PHASES AVEC AUTO-REPORTER
* Utilise le système AutoReporter pour capturer et générer le rapport
*/
import { AutoReporter } from './reporters/AutoReporter.js';
// Configuration AutoReporter
const autoReporter = new AutoReporter();
console.log('🚀 LANCEMENT PIPELINE 4 PHASES AVEC AUTO-REPORTER');
console.log('📋 Workflow: Generation initial => adversarial => Heavy enhancement => human touch');
// Fonction pour exécuter le test
async function runPipelineTestWithReporter() {
try {
console.log('\n🔄 === DÉMARRAGE TEST AVEC AUTO-REPORTER ===');
// Import et exécution du test via AutoReporter
const { exec } = await import('child_process');
const { promisify } = await import('util');
const execAsync = promisify(exec);
// Importer et exécuter directement le test pour que AutoReporter capture les logs
console.log('\n🔄 === EXÉCUTION DIRECTE AVEC AUTO-REPORTER ===');
// Import du test pipeline 4 phases
const testModule = await import('./pipeline-4-phases-force-report.test.js');
console.log('✅ Test importé et exécuté avec AutoReporter actif');
console.log('\n✅ Test pipeline 4 phases terminé');
console.log('📊 Output capturé par AutoReporter');
// Forcer la finalisation du rapport avec plus de temps
setTimeout(() => {
console.log('\n🎯 AutoReporter - Finalisation du rapport...');
autoReporter.finalize();
setTimeout(() => process.exit(0), 1000);
}, 3000);
} catch (error) {
console.error('\n❌ Erreur lors de l\'exécution:', error.message);
autoReporter.finalize();
process.exit(1);
}
}
// Exécution
runPipelineTestWithReporter();
console.log('\n🎯 Pipeline 4 phases avec génération rapport garantie');