@casoon/auditmysite
Version:
A comprehensive command-line tool for automated accessibility, security, performance, and SEO testing using Playwright and pa11y, based on sitemap URLs
64 lines • 2.04 kB
TypeScript
import { EventDrivenQueueOptions, QueueStats } from './event-driven-queue';
import { TestOptions, AccessibilityResult } from '../types';
export interface ParallelTestManagerOptions extends EventDrivenQueueOptions {
maxConcurrent?: number;
maxRetries?: number;
retryDelay?: number;
testOptions?: TestOptions;
enableProgressBar?: boolean;
progressUpdateInterval?: number;
enableResourceMonitoring?: boolean;
maxMemoryUsage?: number;
maxCpuUsage?: number;
onTestStart?: (url: string) => void;
onTestComplete?: (url: string, result: AccessibilityResult) => void;
onTestError?: (url: string, error: string) => void;
onProgressUpdate?: (stats: QueueStats) => void;
onQueueEmpty?: () => void;
}
export interface ParallelTestResult {
results: AccessibilityResult[];
stats: QueueStats;
duration: number;
errors: Array<{
url: string;
error: string;
attempts: number;
}>;
}
export declare class ParallelTestManager {
private queue;
private accessibilityChecker;
private options;
private isRunning;
private startTime;
private activeTests;
constructor(options?: ParallelTestManagerOptions);
initialize(): Promise<void>;
runTests(urls: string[]): Promise<ParallelTestResult>;
private processQueue;
private startWorkers;
private processNextUrl;
private checkResourceLimits;
private handleUrlAdded;
private handleUrlStarted;
private handleUrlCompleted;
private handleUrlFailed;
private handleUrlRetrying;
private handleQueueEmpty;
private handleProgressUpdate;
private handleError;
private setupEventListeners;
private displayProgressBar;
pause(): void;
resume(): void;
stop(): void;
getStats(): QueueStats;
getActiveTests(): number;
getQueueSize(): number;
setMaxConcurrent(max: number): void;
getMemoryUsage(): number;
getCpuUsage(): number;
cleanup(): Promise<void>;
}
//# sourceMappingURL=parallel-test-manager.d.ts.map