/** * Test Report Portal - Generate a static HTML dashboard from test results. * * Features: * - Test trend chart (pass/fail over time) * - Flaky test leaderboard * - Slowest test leaderboard * - Cost breakdown by suite * - Coverage gaps */ import type { SuiteResult } from './types'; export interface PortalOptions { /** Directory containing JSON report files */ reportsDir: string; /** Output directory for the dashboard */ outputDir: string; } export interface ReportEntry { filename: string; timestamp: string; suite: SuiteResult; } export interface TrendPoint { date: string; passed: number; failed: number; total: number; } export interface FlakyEntry { name: string; flakyCount: number; totalRuns: number; flakyRate: number; } export interface SlowestEntry { name: string; avgDuration: number; maxDuration: number; runs: number; } export interface CostEntry { suite: string; totalCost: number; testCount: number; avgCost: number; } export interface CoverageGap { area: string; reason: string; } export interface PortalData { trends: TrendPoint[]; flaky: FlakyEntry[]; slowest: SlowestEntry[]; costs: CostEntry[]; gaps: CoverageGap[]; totalReports: number; lastUpdated: string; } /** * Load all JSON report files from a directory. */ export declare function loadReports(dir: string): ReportEntry[]; /** * Compute trend data from report entries. */ export declare function computeTrends(entries: ReportEntry[]): TrendPoint[]; /** * Identify flaky tests (tests that both pass and fail across runs). */ export declare function computeFlaky(entries: ReportEntry[]): FlakyEntry[]; /** * Find slowest tests by average duration. */ export declare function computeSlowest(entries: ReportEntry[]): SlowestEntry[]; /** * Compute cost breakdown by suite. */ export declare function computeCosts(entries: ReportEntry[]): CostEntry[]; /** * Detect coverage gaps. */ export declare function detectGaps(entries: ReportEntry[]): CoverageGap[]; /** * Build the full portal data from reports directory. */ export declare function buildPortalData(reportsDir: string): PortalData; /** * Generate the static HTML dashboard. */ export declare function generatePortalHTML(data: PortalData): string; /** * Generate the portal dashboard to the output directory. */ export declare function generatePortal(options: PortalOptions): string; //# sourceMappingURL=portal.d.ts.map