/** * QA360 k6 Performance Adapter (Socle OOTB) * Short performance tests with P95 calculation */ import { PackBudgets } from '../types/pack-v1.js'; export interface K6TestConfig { baseUrl: string; budgets?: PackBudgets; duration?: string; vus?: number; timeout?: number; scenarios?: Record; } export interface K6TestResult { success: boolean; metrics: { http_req_duration_p95: number; http_req_duration_avg: number; http_req_failed_rate: number; http_reqs_total: number; vus_max: number; iterations: number; }; thresholds: { [key: string]: { passed: boolean; value: number; threshold: string; }; }; error?: string; rawOutput?: string; junit?: string; } export declare class K6PerfAdapter { private redactor; private workingDir; constructor(workingDir?: string); /** * Execute k6 performance test */ runPerfTest(config: K6TestConfig): Promise; /** * Generate k6 test script */ private generateK6Script; /** * Execute k6 command */ private executeK6; /** * Parse k6 results from output */ private parseK6Results; /** * Parse metrics from text output */ private parseTextMetrics; /** * Parse thresholds from text output */ private parseTextThresholds; /** * Generate JUnit XML */ private generateJUnit; /** * Get default metrics structure */ private getDefaultMetrics; /** * Check if k6 is available */ static isAvailable(): Promise<{ available: boolean; error?: string; }>; /** * Validate performance test configuration */ static validateConfig(config: K6TestConfig): { valid: boolean; errors: string[]; }; }