omni-test-intelligence
Version:
Enterprise Test Intelligence Platform - Simplify test reporting with AI-powered insights.
32 lines (31 loc) • 1.2 kB
TypeScript
import type { TestInfo } from "@playwright/test";
import type { Build, TestCasePayload, StdoutLog, Step, ScreenshotMeta } from "./types";
/**
* Configure Omni Test API integration.
* Should be called once during test setup to set API details.
*/
export declare function configureOmniTest({ projectId, apiKey, }: {
projectId: string;
apiKey: string;
}): void;
export declare const OmniService: {
startBuild(environment?: string): Promise<Build>;
completeBuild(buildId: string, status: string, duration: number, environment?: string): Promise<Build>;
createTestCaseWithScreenshots(buildId: string, testCasePayload: TestCasePayload, snapshotFolderPath: string): Promise<any>;
createTestCasePayload({ testInfo, stdout, screenshots, steps, }: {
testInfo: TestInfo;
stdout: StdoutLog[];
screenshots: ScreenshotMeta[];
steps: Step[];
}): TestCasePayload;
};
/**
* Sets up the `afterEach` hook to upload test case data and screenshots to Omni.
*/
export declare function setupOmniAfterEach(options: {
buildId: string;
snapshotPath: string;
screenshotNames: string[];
stdoutLogs?: StdoutLog[];
steps?: Step[];
}): void;