import { PubSubEngine } from 'type-graphql';
import { AppContext } from '../types.js';
import { ResolverBase } from '../generic/ResolverBase.js';
export declare class TestRunResult {
    success: boolean;
    errorMessage?: string;
    executionTimeMs?: number;
    result: string;
}
export declare class TestSuiteRunResult {
    success: boolean;
    errorMessage?: string;
    executionTimeMs?: number;
    result: string;
}
export declare class TestExecutionProgress {
    currentStep: string;
    percentage: number;
    message: string;
    testName?: string;
    driverType?: string;
    oracleEvaluation?: string;
}
export declare class TestExecutionStreamMessage {
    sessionId: string;
    testRunId: string;
    type: 'progress' | 'oracle_eval' | 'complete' | 'error';
    progress?: TestExecutionProgress;
    timestamp: Date;
    testRun?: Record<string, unknown>;
}
export declare class RunTestResolver extends ResolverBase {
    /**
     * Execute a single test.
     * Supports fire-and-forget mode to avoid Azure proxy timeouts on long-running tests.
     */
    RunTest(testId: string, verbose?: boolean, environment?: string, tags?: string, variables?: string, fireAndForget?: boolean, pubSub?: PubSubEngine, { userPayload }?: AppContext): Promise<TestRunResult>;
    /**
     * Execute a test suite.
     * Supports fire-and-forget mode to avoid Azure proxy timeouts on long-running suites.
     */
    RunTestSuite(suiteId: string, verbose?: boolean, environment?: string, parallel?: boolean, tags?: string, variables?: string, selectedTestIds?: string, sequenceStart?: number, sequenceEnd?: number, fireAndForget?: boolean, pubSub?: PubSubEngine, { userPayload }?: AppContext): Promise<TestSuiteRunResult>;
    /**
     * Query to check if a test is currently running
     */
    IsTestRunning(testId: string, { userPayload }?: AppContext): Promise<boolean>;
    /**
     * Execute a single test synchronously and return the result.
     */
    private executeTest;
    /**
     * Execute a test in background (fire-and-forget).
     * Errors are published via PubSub, not propagated.
     */
    private executeTestInBackground;
    /**
     * Execute a test suite synchronously and return the result.
     */
    private executeSuite;
    /**
     * Execute a test suite in background (fire-and-forget).
     * Errors are published via PubSub, not propagated.
     */
    private executeSuiteInBackground;
    /**
     * Build a TestRunResult from the engine result, handling both single and array results.
     */
    private buildTestRunResult;
    private parseVariablesJson;
    private parseJsonArray;
    /**
     * Create progress callback for test execution
     */
    private createProgressCallback;
    /**
     * Create log callback that streams driver/engine log messages to the UI
     * as progress updates, so they appear in the execution log in real-time.
     */
    private createLogCallback;
    private publishProgress;
    private publishComplete;
    private publishError;
    /**
     * Publish a fire-and-forget completion event for a single test.
     * Includes testId for client-side correlation and the full result.
     */
    private publishFireAndForgetComplete;
    /**
     * Publish a fire-and-forget error event for a single test.
     */
    private publishFireAndForgetError;
    /**
     * Publish a fire-and-forget completion event for a test suite.
     * Includes suiteId for client-side correlation and the full result.
     */
    private publishFireAndForgetSuiteComplete;
    /**
     * Publish a fire-and-forget error event for a test suite.
     */
    private publishFireAndForgetSuiteError;
}
//# sourceMappingURL=RunTestResolver.d.ts.map