@ply-ct/ply
Version:
REST API Automated Testing
67 lines (66 loc) • 2.31 kB
TypeScript
import { Values } from './values';
import * as flowbee from './flowbee';
import { FlowResult, PlyFlow } from './flow';
import { Log } from './log';
import { PlyOptions, RunOptions } from './options';
import { Retrieval } from './retrieval';
import { Runtime } from './runtime';
import { Result, ResultPaths } from './result';
import { Suite } from './suite';
import { Step } from './step';
/**
* Suite representing a ply flow.
*/
export declare class FlowSuite extends Suite<Step> {
plyFlow: PlyFlow;
readonly path: string;
readonly runtime: Runtime;
readonly logger: Log;
readonly start: number;
readonly end: number;
/**
* @param plyFlow PlyFlow
* @param path relative path from tests location (forward slashes)
* @param runtime info
* @param logger
* @param start zero-based start line
* @param end zero-based end line
*/
constructor(plyFlow: PlyFlow, path: string, runtime: Runtime, logger: Log, start: number, end: number);
/**
* Override to execute flow itself if all steps are specified
* @param steps
*/
runTests(steps: Step[], values: Values, runOptions?: RunOptions, runNum?: number): Promise<Result[]>;
private getStep;
runFlow(values: Values, runOptions?: RunOptions, runNum?: number): Promise<FlowResult>;
/**
* Run steps independently
*/
runSteps(steps: Step[], values: Values, runOptions?: RunOptions): Promise<Result[]>;
/**
* True if steps array is identical to flow steps.
*/
private isFlowSpec;
/**
* Returns all reachable unique steps in this.plyFlow.
* These are the tests in this FlowSuite.
*/
getSteps(): Step[];
}
export declare class FlowLoader {
readonly locations: string[];
private options;
private logger?;
private skip;
constructor(locations: string[], options: PlyOptions, logger?: Log | undefined);
load(): Promise<FlowSuite[]>;
loadSuite(retrieval: Retrieval): Promise<FlowSuite>;
buildSuite(retrieval: Retrieval, contents: string, resultPaths: ResultPaths): FlowSuite;
/**
* Parse a flowbee flow from text (reproduced from flowbee.FlowDiagram)
* @param text json or yaml
* @param file file name
*/
static parse(text: string, file: string): flowbee.Flow;
}