UNPKG

playwright-trx-reporter

Version:

TRX reporter for playwright

52 lines (51 loc) 1.7 kB
import type { FullConfig, FullResult, Reporter, Suite } from '@playwright/test/reporter'; interface OutputFilesInfo { folder: string; prefix: string; } export interface TrxReporterOptions { /** * Azure DevOps supports "Rerun failed tests". But we need to generate multi trx files and publish them all. * @see {@link https://learn.microsoft.com/en-us/azure/devops/pipelines/test/review-continuous-test-results-after-build?view=azure-devops#view-summarized-test-results} * @example "./reporter/output.trx" * @example {folder: "./reporter", prefirx: "output"} // the reports will be generated as "./reporter/output_1.trx", "./reporter/output_2.trx" and so on. */ outputFile?: string | OutputFilesInfo; /** * Set owner for each test case from annotation. * * Use the last value if it appears multi times. * * @default "owner" */ ownerAnnotation?: string; /** * Set priority for each test case from annotation. * * Use the last value if it appears multi times. * * @default "priority" */ priorityAnnotation?: string; /** * @default false */ verbose?: boolean; } export declare class TrxReporter implements Reporter { private config; private suite; private startTimeDate; private outputFileInfo; private totalTestCount; private verbose; private ownerAnnotation; private priorityAnnotation; constructor(options?: TrxReporterOptions); log(str: string): void; warn(str: string): void; printsToStdio(): boolean; onBegin(config: FullConfig, suite: Suite): void; onEnd(result: FullResult): Promise<void>; } export {};