UNPKG

ivr-tester

Version:

An automated testing framework for IVR call flows

36 lines (35 loc) 1.3 kB
import { Config } from "./configuration/Config"; import { CallFlowSession } from "./testing/test/CallFlowInstructions"; import { Call } from "./call/Call"; import { Scenario } from "./configuration/scenario/Scenario"; import { TestSubject } from "./configuration/call/validateTestSubject"; export interface TestSession { readonly scenario: Scenario; readonly call: Call; readonly callFlowSession: CallFlowSession; } export interface TestRunner { /** * Stops the test runner * @param failure - Whether the running being stopped was due to a failure * e.g. some component failed to start, or a test failed */ stop(failure?: boolean): void; } declare type OnStopCallback = (failure: boolean) => void; export interface TestRunnerManager { setOnStopCallback: (cb: OnStopCallback) => void; testRunner: TestRunner; } export interface RunnableTester { run(testSubject: TestSubject, scenario: Scenario[] | Scenario): Promise<void>; } export declare class IvrTester implements RunnableTester { private readonly config; private readonly pluginManager; private running; constructor(configuration: Config); run(testSubject: TestSubject, scenario: Scenario[] | Scenario): Promise<void>; private preflightChecks; } export {};