@ply-ct/ply
Version:
REST API Automated Testing
53 lines (52 loc) • 1.66 kB
TypeScript
import { Location } from './location';
import { Retrieval } from './retrieval';
import { PlyOptions } from './options';
import { ResultOptions, ResultPaths } from './result';
import { TestSuite, TestCase, Before, After } from './decorators';
import { ResponseMassagers } from './response';
import { Values } from './values';
/**
* Runtime information for a test suite.
*/
export declare class Runtime {
readonly options: PlyOptions;
readonly retrieval: Retrieval;
results: ResultPaths;
testsLocation: Location;
decoratedSuite?: DecoratedSuite;
/**
* Verified response header names.
*/
responseMassagers?: ResponseMassagers;
constructor(options: PlyOptions, retrieval: Retrieval, results: ResultPaths);
get suitePath(): string;
appendResult(line: string, options: ResultOptions): void;
updateResult(name: string, line: string, options: ResultOptions): void;
/**
* Take into account comments in expected yaml.
*/
padActualStart(name: string, instNum: number): Promise<void>;
}
export declare type CallingCaseInfo = {
results: ResultPaths;
suiteName: string;
caseName: string;
};
/**
* Applicable for Cases
*/
export declare class DecoratedSuite {
readonly instance: any;
readonly testSuite: TestSuite;
readonly testCases: TestCase[];
readonly befores: Before[];
readonly afters: After[];
/**
* @param instance runtime instance of a suite
*/
constructor(instance: any);
private runIfMatch;
private isMatch;
runBefores(test: string, values: Values): Promise<void>;
runAfters(test: string, values: Values): Promise<void>;
}