UNPKG

html-reporter

Version:

Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.

52 lines (51 loc) 1.54 kB
import { BaseTestsTreeBuilder, BaseTestsTreeBuilderOptions, Tree } from './base'; import type { ReporterTestResult } from '../adapters/test-result'; import type { BrowserItem, RawSuitesRow } from '../types'; export interface Stats { total: number; passed: number; failed: number; skipped: number; retries: number; } export interface PerBrowserStats { [browserName: string]: { [browserVersion: string]: Stats; }; } export type FinalStats = Stats & { perBrowser: PerBrowserStats; }; export interface SkipItem { browser: string; suite: string; comment?: string; } export interface StaticTreeBuildResult { tree: Tree; stats: FinalStats; skips: SkipItem[]; browsers: BrowserItem[]; } export interface StaticTestsTreeBuilderOptions extends BaseTestsTreeBuilderOptions { } export declare class StaticTestsTreeBuilder extends BaseTestsTreeBuilder { protected _stats: FinalStats; protected _skips: SkipItem[]; protected _failedTestIds: { [key: string]: boolean; }; protected _passedTestIds: { [key: string]: boolean; }; protected _skippedTestIds: { [key: string]: boolean; }; constructor(options: StaticTestsTreeBuilderOptions); build(rows?: RawSuitesRow[]): StaticTreeBuildResult; protected _addResultIdToBrowser(browserId: string, testResultId: string): void; protected _calcStats(testResult: ReporterTestResult, { testId, browserName }: { testId: string; browserName: string; }): void; }