import { ServiceNowRequest } from "../../comm/http/ServiceNowRequest.js"; import { ReferenceLink } from "../../model/types.js"; import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { OperationProgressCallback } from "../OperationProgress.js"; export declare class ATFTestExecutor { _req: ServiceNowRequest; _instance: ServiceNowInstance; constructor(instance: ServiceNowInstance); executeTest(testId: string): Promise; private waitForTestCompletion; private doGetTestProgress; private getTestProgress; private getTestResult; /** * Executes a test suite by sys_id using the ServiceNow CI/CD API * @param testSuiteSysId The sys_id of the test suite to execute * @param options Optional execution parameters * @returns Promise The execution response with progress information */ executeTestSuite(testSuiteSysId: string, options?: Partial): Promise; /** * Executes a test suite by name using the ServiceNow CI/CD API * @param testSuiteName The name of the test suite to execute * @param options Optional execution parameters * @returns Promise The execution response with progress information */ executeTestSuiteByName(testSuiteName: string, options?: Partial): Promise; /** * Gets the progress of a test suite execution * @param progressId The progress ID from the execution response * @returns Promise The current progress information */ getTestSuiteProgress(progressId: string): Promise; /** * Waits for test suite execution to complete and returns the results * @param progressId The progress ID from the execution response * @param pollIntervalMs Polling interval in milliseconds (default: 5000) * @returns Promise The final execution results */ waitForTestSuiteCompletion(progressId: string, pollIntervalMs?: number, onProgress?: OperationProgressCallback): Promise; /** * Gets the results of a completed test suite execution * @param resultsId The results ID from the progress response * @returns Promise The execution results */ getTestSuiteResults(resultsId: string): Promise; /** * Executes a test suite and waits for completion * @param testSuiteSysId The sys_id of the test suite to execute * @param options Optional execution parameters * @param pollIntervalMs Polling interval in milliseconds (default: 5000) * @returns Promise The final execution results */ executeTestSuiteAndWait(testSuiteSysId: string, options?: Partial, pollIntervalMs?: number, onProgress?: OperationProgressCallback): Promise; /** * Executes a test suite by name and waits for completion * @param testSuiteName The name of the test suite to execute * @param options Optional execution parameters * @param pollIntervalMs Polling interval in milliseconds (default: 5000) * @returns Promise The final execution results */ executeTestSuiteByNameAndWait(testSuiteName: string, options?: Partial, pollIntervalMs?: number, onProgress?: OperationProgressCallback): Promise; } export type TestResult = { "end_time_millis": string; "execution_tracker": ReferenceLink; "test_name": string; "test": ReferenceLink; "rollback_context": ReferenceLink; "root_tracker_id": ReferenceLink; "output": string; "sys_id": string; "run_time": string; "status": string; }; export interface TestSuiteExecutionRequest { test_suite_sys_id?: string; test_suite_name?: string; browser_name?: string; browser_version?: string; is_performance_run?: boolean; os_name?: string; os_version?: string; run_in_cloud?: boolean; } export interface TestSuiteExecutionResponse { links: { progress: { id: string; url: string; }; results?: { id: string; url: string; }; }; status: string; status_label: string; status_message: string; status_detail: string; error: string; percent_complete: number; } export interface TestSuiteExecutionResult { sys_id: string; number: string; test_suite: ReferenceLink; status: string; success: string; start_time: string; end_time: string; run_time: string; success_count: string; failure_count: string; skip_count: string; error_count: string; parent: string; base_suite_result: ReferenceLink; execution_tracker: ReferenceLink; schedule_run: ReferenceLink; }