tdpw
Version:
CLI tool for uploading Playwright test reports to TestDino platform with TestDino storage support
79 lines • 1.87 kB
TypeScript
/**
* Test failure extraction for cache functionality
*/
/**
* Test failure data structure
*/
export interface TestFailure {
file: string;
testTitle: string;
error?: string | undefined;
duration?: number | undefined;
}
/**
* Test summary data structure
*/
export interface TestSummary {
total: number;
passed: number;
failed: number;
skipped: number;
duration: number;
}
/**
* Cache extraction result
*/
export interface CacheExtractionResult {
failures: TestFailure[];
summary: TestSummary;
reportPaths: string[];
hasData: boolean;
}
/**
* Service for extracting test failure data for caching
*/
export declare class CacheExtractor {
private readonly workingDir;
constructor(workingDir: string);
/**
* Extract test failures and metadata for caching
*/
extractFailureData(): Promise<CacheExtractionResult>;
/**
* Discover JSON reports using the existing discovery service
*/
private discoverReports;
/**
* Extract failures from a parsed report
*/
private extractFailuresFromReport;
/**
* Recursively extract failures from suite structure
*/
private extractFailuresFromSuite;
/**
* Extract failures from spec structure (intermediate level between suite and test)
*/
private extractFailuresFromSpec;
/**
* Extract failures from individual test
*/
private extractFailuresFromTest;
/**
* Check if a test item represents a failed test
*/
private isFailedTest;
/**
* Create TestFailure object from test data
*/
private createTestFailure;
/**
* Format error message for storage
*/
private formatError;
/**
* Create empty result for cases with no data
*/
private createEmptyResult;
}
//# sourceMappingURL=cache-extractor.d.ts.map