/** * Glass MCP v9.0.0 Comprehensive Testing Framework * * Automated testing suite for all Glass MCP components with performance * benchmarks, integration tests, and validation scenarios. * * @version 9.0.0 * @author Glass MCP Vision Team */ import { EventEmitter } from 'events'; import { GlassMCPServer } from './mcp-server-core.js'; import { ConfigurationManager } from './configuration-manager.js'; import { PerformanceMonitor } from './performance-monitor.js'; /** * Test case definition */ export interface TestCase { id: string; name: string; description: string; category: 'unit' | 'integration' | 'performance' | 'visual' | 'automation'; priority: 'low' | 'medium' | 'high' | 'critical'; timeout: number; setup?: () => Promise; execute: () => Promise; cleanup?: () => Promise; dependencies?: string[]; } /** * Test result information */ export interface TestResult { testId: string; success: boolean; duration: number; error?: string; warnings?: string[]; metrics?: Record; details?: any; } /** * Test suite configuration */ export interface TestSuiteConfig { name: string; description: string; testCases: TestCase[]; parallelExecution: boolean; maxConcurrency: number; reportFormat: 'json' | 'html' | 'console'; outputPath?: string; } /** * Test execution context */ export interface TestContext { server: GlassMCPServer; configManager: ConfigurationManager; performanceMonitor: PerformanceMonitor; tempDirectory: string; testData: Map; } /** * Test suite execution report */ export interface TestSuiteReport { suiteName: string; startTime: number; endTime: number; duration: number; totalTests: number; passedTests: number; failedTests: number; skippedTests: number; successRate: number; results: TestResult[]; performance: { averageTestTime: number; fastestTest: TestResult; slowestTest: TestResult; totalMemoryUsed: number; peakMemoryUsage: number; }; coverage?: { linesTotal: number; linesCovered: number; functionsTotal: number; functionsCovered: number; coveragePercentage: number; }; } /** * Glass MCP Comprehensive Testing Framework */ export declare class GlassMCPTestFramework extends EventEmitter { private testSuites; private testContext?; private isRunning; private currentExecution?; constructor(); /** * Initialize the testing framework */ initialize(): Promise; /** * Add custom test suite */ addTestSuite(suiteId: string, config: TestSuiteConfig): void; /** * Run specific test suite */ runTestSuite(suiteId: string): Promise; /** * Run all test suites */ runAllTestSuites(): Promise; /** * Execute test suite with proper parallelization */ private executeTestSuite; /** * Execute individual test case */ private executeTestCase; /** * Generate comprehensive test report */ private generateReport; /** * Save test report to file */ private saveReport; /** * Generate HTML test report */ private generateHTMLReport; /** * Print console test report */ private printConsoleReport; /** * Setup built-in test suites */ private setupBuiltInTestSuites; /** * Utility: Create timeout promise */ private createTimeoutPromise; /** * Utility: Chunk array for parallel execution */ private chunkArray; /** * Cleanup test framework */ cleanup(): Promise; } /** * Create and initialize testing framework */ export declare function createGlassMCPTestFramework(): Promise; //# sourceMappingURL=test-suite.d.ts.map