/** * Ply options. Empty values are populated with Defaults. */ export interface Options { /** * Tests base directory ('.'). */ testsLocation?: string; /** * Request files glob pattern, relative to testsLocation ('**\/*.{ply.yaml,ply.yml}'). */ requestFiles?: string; /** * Case files glob pattern, relative to testsLocation ('**\/*.ply.ts'). */ caseFiles?: string; /** * Flow files glob pattern, relative to testsLocation ('**\/*.flow'). */ flowFiles?: string; /** * File pattern to ignore, relative to testsLocation ('**\/{node_modules,bin,dist,out}\/**'). */ ignore?: string; /** * File pattern for requests/cases/flows that shouldn't be directly executed, relative to testsLocation. */ skip?: string; /** * Expected results base dir (testsLocation + '/results/expected'). */ expectedLocation?: string; /** * Actual results base dir (this.testsLocation + '/results/actual'). */ actualLocation?: string; /** * Result files live under a similar subpath as request/case files (true). * (eg: Expected result relative to 'expectedLocation' is the same as * request file relative to 'testsLocation'). */ resultFollowsRelativePath?: boolean; /** * Log file base dir (this.actualLocation). */ logLocation?: string; /** * Files containing values JSON (or CSV or XLSX). */ valuesFiles?: string[]; /** * Results summary output JSON */ outputFile?: string; /** * Verbose output (false). Takes precedence over 'quiet' if both are true. */ verbose?: boolean; /** * The opposite of 'verbose' (false). */ quiet?: boolean; /** * Bail on first failure (false). */ bail?: boolean; /** * Run suites in parallel. */ parallel?: boolean; /** * (For use with rowwise values). Number of rows to run per batch. */ batchRows?: number; /** * (For use with rowwise values). Delay in ms between row batches. */ batchDelay?: number; /** * Predictable ordering of response body JSON property keys -- needed for verification (true). */ responseBodySortedKeys?: boolean; /** * Response headers to exclude when generating expected results. */ genExcludeResponseHeaders?: string[]; /** * Prettification indent for yaml and response body (2). */ prettyIndent?: number; } /** * Populated ply options. */ export interface PlyOptions extends Options { testsLocation: string; requestFiles: string; caseFiles: string; flowFiles: string; ignore: string; skip: string; expectedLocation: string; actualLocation: string; resultFollowsRelativePath: boolean; logLocation: string; valuesFiles: string[]; outputFile?: string; verbose: boolean; quiet: boolean; bail: boolean; parallel: boolean; batchRows: number; batchDelay: number; responseBodySortedKeys: boolean; genExcludeResponseHeaders?: string[]; prettyIndent: number; args?: any; runOptions?: RunOptions; } /** * Options specified on a per-run basis. */ export interface RunOptions { /** * Run test requests but don't verify outcomes. */ submit?: boolean; /** * Skip verify only if expected result does not exist. */ submitIfExpectedMissing?: boolean; /** * Create expected from actual and verify based on that. */ createExpected?: boolean; /** * Create expected from actual only if expected does not exist. */ createExpectedIfMissing?: boolean; /** * Import requests or values from external format (currently 'postman' is supported). * Overwrites existing same-named files. */ import?: string; /** * Augment OpenAPI v3 doc at specified path with operation summaries, request/response samples, * and code snippets from Ply expected results. */ openapi?: string; /** * Import case suite modules from generated .js instead of .ts source (default = false). * This runOption needs to be set in your case's calls to Suite.run (for requests), * and also in originating the call to Suite.run (for the case(s)). */ useDist?: boolean; requireTsNode?: boolean; /** * Runtime override values */ values?: { [key: string]: string; }; } /** * Locations are lazily inited to reflect bootstrapped testsLocation. */ export declare class Defaults implements PlyOptions { readonly testsLocation: string; private _expectedLocation?; private _actualLocation?; private _logLocation?; constructor(testsLocation?: string); requestFiles: string; caseFiles: string; flowFiles: string; ignore: string; skip: string; get expectedLocation(): string; get actualLocation(): string; get logLocation(): string; resultFollowsRelativePath: boolean; valuesFiles: never[]; verbose: boolean; quiet: boolean; bail: boolean; parallel: boolean; batchRows: number; batchDelay: number; responseBodySortedKeys: boolean; genExcludeResponseHeaders: string[]; prettyIndent: number; } export declare const PLY_CONFIGS: string[]; export declare class Config { private readonly defaults; options: PlyOptions; private yargsOptions; constructor(defaults?: PlyOptions, commandLine?: boolean, configPath?: string); private load; private read; }