import { WebmateAPISession } from "../webmate-api-session"; import { TestRunId } from "../types"; import { Observable } from "rxjs"; import { TestRunInfo } from "./test-run-info"; import { TestRunEvaluationStatus } from "./test-run-evaluation-status"; /** * Facade for a (running or finished) TestRun */ export declare class TestRun { readonly id: TestRunId; private readonly session; constructor(id: TestRunId, session: WebmateAPISession); /** * Retrieve current information about this test run from webmate. */ retrieveCurrentInfo(): Observable; /** * Set the name for a given test run. * * @param name New TestRun name. */ setName(name: string): Observable; /** * Finish the test run. * This method is blocking: * it internally calls the {@link waitForCompletion} method * to wait until the test run is finished. * If the test run does not finish before the timeout, the returned observable will go into an error state. * * @param status The status to finish the test run with. * @param msg A short message explaining the result of the test run. * @param detail Detailed information, e.g. a stack trace. */ finish(status: TestRunEvaluationStatus, msg?: string, detail?: string): Observable; /** * Block until the test run goes into a finished state (completed or failed) or timeout occurs. * The default timeout is 10 minutes. * If the test run does not finish before the timeout, the returned observable will go into an error state. * * @return The test run info of the finished test run. */ waitForCompletion(): Observable; }