playwright-trx-reporter
Version:
TRX reporter for playwright
40 lines (39 loc) • 1.27 kB
TypeScript
import type { Suite } from '@playwright/test/reporter';
import { TestRunBuilderOptions } from './TestRunBuilder';
import { TestRunType } from './trxModel';
interface TrxsBuilder {
/**
* Analytics the root suite of playwright. And generate trx models.
*
* @param rootSuite The root suite of playwright
* @returns the generated trx models
*/
analytics(rootSuite: Suite, options: TrxWriterOptions): TestRunType[];
}
export interface TrxWriterOptions {
/**
* The type of `annotation`, whose value will be the trx model's 'owner'
*/
ownerAnnotation: string;
/**
* The type of `annotation`, whose value will be the trx model's 'priority'
*/
priorityAnnotation: string;
/**
* The constructor options of `TestRunBuilder`
*/
testRunBuilderOptions: TestRunBuilderOptions;
}
/**
* The test cases are written into only one trx file.
*/
export declare class SingleTrxBuilder implements TrxsBuilder {
analytics(rootSuite: Suite, options: TrxWriterOptions): TestRunType[];
}
/**
* The trx cases might be written into multi trx files.
*/
export declare class MultiTrxsBuilder implements TrxsBuilder {
analytics(rootSuite: Suite, options: TrxWriterOptions): TestRunType[];
}
export {};