import type { TestInfo } from "@playwright/test"; import type { TestResult } from "@playwright/test/reporter"; /** * Models Xray-specific metadata that is relevant for this test. */ export interface XrayTestMetadata { /** * Xray iteration parameters to set for the current test. * * @see https://docs.getxray.app/display/XRAY/Parameterized+Tests * @see https://docs.getxray.app/display/XRAYCLOUD/Parameterized+Tests */ parameters?: Record; } /** * Attaches Xray-specific metadata to (e.g. parameterised test iteration values) to a test run. * * This data is processed during upload to Xray and is also visible in HTML reports. * * @example * * ```ts * for (const name of ['Bob', 'George', 'Linda']) { * test(`XRAYTEST-123 | Log in as ${name}`, async ({}, testInfo) => { * setXrayInfo(testInfo, { parameters: { user: name } }); * // ... * }); * } * ``` * * @param testInfo - the Playwright test info object provided to the test * @param metadata - Xray-specific metadata to attach to the test */ export declare function setXrayMetadata(testInfo: TestInfo, metadata: XrayTestMetadata): Promise; /** * Retrieves any Xray-related metadata that was previously attached to a test. * * @param testResult - the Playwright test result * @returns The parsed Xray metadata object, or `undefined` if not available */ export declare function getXrayMetadata(testResult: TestResult): XrayTestMetadata | undefined;