import { AbstractReporter } from './abstract-reporter'; import { Attachment, TestResultType } from '../models'; import type { TestOpsOptionsType, TestOpsMultiConfigType } from '../models/config/TestOpsOptionsType'; import { LoggerInterface } from '../utils/logger'; import { HostData } from '../models/host-data'; type MultiTestOpsOptionsType = Omit & Partial>; /** * Multi-project TestOps reporter. Sends test results to multiple Qase projects * with different test case IDs per project. Each project gets its own run. */ export declare class TestOpsMultiReporter extends AbstractReporter { private readonly baseUrl; private readonly batchSize; /** Project code -> run ID */ private readonly runIds; /** Project code -> API client for that project */ private readonly clients; /** Project code -> queue of results to send */ private readonly projectQueues; /** Project code -> first unsent index (for batch tracking) */ private readonly firstIndexByProject; private isTestRunReady; private readonly mutex; private readonly defaultProject; private readonly projectCodes; private readonly showPublicReportLink; constructor(logger: LoggerInterface, testopsOptions: MultiTestOpsOptionsType, multiConfig: TestOpsMultiConfigType, withState: boolean, hostData: HostData, reporterName: string | undefined, frameworkPackage: string | undefined, environment?: string, baseUrl?: string, batchSize?: number, showPublicReportLink?: boolean); private buildProjectOptions; startTestRun(): Promise; addTestResult(result: TestResultType): Promise; /** * Get list of (projectCode, ids) for a result (multi-project mapping or legacy testops_id). * Caller must hold mutex when using projectQueues. */ private getProjectsToUseForResult; /** * Push a result into project queues (by project / case IDs). Used by addTestResult and by * sendResults() when results were set via setTestResults() (e.g. Cypress hooks in another process). * Caller must hold mutex. */ private distributeResultToProjectQueues; private getProjectMapping; private getQueue; private copyResultForProject; private checkOrCreateTestRuns; private sendResultsForProject; /** * Drops a project's queue once every queued result is confirmed sent. Results left behind by * a failed batch stay queued so `complete()` gets one more chance at them. * * @param {string} projectCode * @private */ private discardSentResults; /** * Results queued for a project but never confirmed as accepted by Qase. * * @param {string} projectCode * @returns {number} * @private */ private unsentResultsCount; sendResults(): Promise; publish(): Promise; complete(): Promise; uploadAttachment(attachment: Attachment): Promise; private showLink; } export {};