UNPKG

@azure/microsoft-playwright-testing

Version:

Package to integrate your Playwright test suite with Microsoft Playwright Testing service

59 lines 2.82 kB
import type { FullResult, TestCase, TestResult, FullConfig, Suite } from "@playwright/test/reporter"; import type { IBackOffOptions } from "../common/types"; import type { EnvironmentVariables } from "../common/environmentVariables"; import { TokenType } from "../model/mptTokenDetails"; import type { UploadMetadata } from "../model/shard"; import { Shard } from "../model/shard"; import type { RawTestResult } from "../model/testResult"; import { TestResult as MPTTestResult } from "../model/testResult"; import { TestRun } from "../model/testRun"; import type { CIInfo } from "./cIInfoProvider"; import type { StorageUri } from "../model/storageUri"; declare class ReporterUtils { private envVariables; private config; totalTests: number; failedTests: number; skippedTests: number; passedTests: number; flakyTests: number; startTime: number; constructor(envVariables: EnvironmentVariables, config: FullConfig, _: Suite); getTestRunObject(ciInfo: CIInfo): Promise<TestRun>; getTestRunShardStartObject(): Shard; getTestRunShardEndObject(result: FullResult, shard: Shard, errorMessages: string[], attachmentMetadata: UploadMetadata, workers: number): Shard; getOSName(result: TestResult, data: string): string; getTestResultObject(test: TestCase, result: TestResult, jobName: string): MPTTestResult; generateMarkdownSummary(testRunUrl: string): void; getRawTestResultObject(result: TestResult): RawTestResult; static getRunId(cIInfo: CIInfo): string; static calculateSha1(buffer: Buffer | string): string; static getTokenDetails<T>(accessToken: string, tokenType: TokenType): T; static hasAudienceClaim(token: string): boolean; static timestampToRFC3339(timestamp: number): string; static getFileRelativePath(filePath: string): string; static getReporterBackOffOptions: Partial<IBackOffOptions>; static isTimeGreaterThanCurrentPlus10Minutes(sasUri: StorageUri): boolean; static getFileSize(attachmentPath: string): number; static getBufferSize(attachmentBody: Buffer): number; redactAccessToken(info: string | undefined): string; static getRegionFromAccountID(accountId: string): string | undefined; progressBar(current: number, total: number): void; private getTestRunConfig; private relativeLocation; private extractTestTags; private extractTestAnnotations; private toPosixPath; private getAttachmentStatus; private dedupeSteps; private serializeTestStep; private getTestStatus; private extractRootParentTitle; private getRunName; private runCommand; static isNullOrEmpty(str: string | null | undefined): boolean; private getTestError; private getReadableLineLocation; } export default ReporterUtils; //# sourceMappingURL=reporterUtils.d.ts.map