@chtsinc/ch-playwright-report
Version:
Custom Playwright Reporter that logs test and execution results to MongoDB
25 lines (24 loc) • 1.06 kB
TypeScript
import { FullResult, Reporter, TestCase, TestResult, FullConfig, Suite, TestStep } from "@playwright/test/reporter";
declare class CHPlaywrightReporter implements Reporter {
private logger;
private isInitSuccess;
private executionReport;
private testStatusSummary;
private exportService;
private executionContext;
private servicesConfig;
private videosCollection;
onBegin(_config: FullConfig, suite: Suite): Promise<void>;
onTestBegin(_test: TestCase, _result: TestResult): Promise<void>;
onTestEnd(test: TestCase, result: TestResult): Promise<void>;
onStepBegin?(_test: TestCase, _result: TestResult, _step: TestStep): Promise<void>;
onStepEnd?(_test: TestCase, _result: TestResult, _step: TestStep): Promise<void>;
onEnd(result: FullResult): Promise<void>;
private collectVideoPath;
private processVideoCollection;
private getVideoPath;
private initializeReport;
private getBrowserNameByProjectConfig;
private setBrowserNameForReport;
}
export default CHPlaywrightReporter;