UNPKG

@alphabin/trx

Version:

TRX reporter for Playwright tests with Azure Blob Storage upload support

142 lines (141 loc) 3.15 kB
/** * Git-related metadata */ export type PRStatus = 'open' | 'draft' | 'ready_for_review' | 'changes_requested' | 'approved' | 'merged' | 'closed'; export interface GitMetadata { branch: string; commit: { hash: string; message: string; author: string; email: string; timestamp: string; }; repository: { name: string; url: string; }; pr?: { id: string; title: string; url: string; status?: PRStatus; }; } /** * CI/CD-related metadata */ export interface CIMetadata { provider: string; pipeline: { id: string; name: string; url: string; }; build: { number: string; trigger: string; }; environment: { name: string; type: string; os: string; node: string; }; } /** * System-related metadata */ export interface SystemMetadata { hostname: string; cpu: { count: number; model: string; }; memory: { total: string; }; /** Operating system platform and architecture */ os: string; /** Node.js version */ nodejs: string; /** Playwright version */ playwright: string; } /** * Browser-level test run parameters */ export interface BrowserParam { browserId: string; name: string; version: string; viewport: string; headless: boolean; repeatEach: number; retries: number; testDir: string; outputDir: string; } /** * Test run configuration */ export interface TestConfig { /** Detailed browser parameters */ browsers: BrowserParam[]; /** Number of workers used */ actualWorkers: number; /** Timeout for tests (in ms) */ timeout: number; /** Playwright's preserveOutput setting */ preserveOutput: string; /** Whether tests run fully in parallel */ fullyParallel: boolean; /** Whether forbidOnly is enabled */ forbidOnly: boolean; /** Number of projects/shards */ projects: number; /** Shard information */ shard: string | null; /** Array of configured reporters */ reporters: Array<{ name: string; options?: any; }>; /** grep pattern filter */ grep?: any; /** grepInvert pattern filter */ grepInvert?: any; /** Custom tags for this run */ customTags?: string[]; } /** * Azure upload status information */ export interface AzureUploadMetadata { status: 'uploaded' | 'failed' | 'disabled' | 'not-found'; url?: string; } /** * Test-related metadata container */ export interface TestMetadata { /** Test run configuration */ config: TestConfig; /** Custom tags for this run */ customTags?: string[]; } /** * Complete metadata structure as expected by the server */ export interface Metadata { /** Git-related metadata */ git: GitMetadata; /** CI/CD-related metadata */ ci: CIMetadata; /** System-related metadata */ system: SystemMetadata; /** Test-related metadata */ test: TestMetadata; /** Azure upload status */ azureUpload?: AzureUploadMetadata; }