/
Plugin.ts
40 lines (35 loc) · 1.29 KB
/
Plugin.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { AbstractTestScript } from '../testscript/AbstractTestScript';
import { TestScriptGenerationOptions } from "../testscript/TestScriptGeneration";
import { TestScriptExecutionResult, TestScriptExecutionOptions } from "../testscript/TestScriptExecution";
/**
* Test script plugin.
*
* @author Thiago Delgado Pinto
*/
export interface Plugin {
/**
* Generate source code from abstract test scripts, according to the given options.
*
* @param abstractTestScripts Abstract test scripts
* @param options Options
* @return An array with promises for each file, contaning the file name as the data.
*/
generateCode(
abstractTestScripts: AbstractTestScript[],
options: TestScriptGenerationOptions
): Promise< string >[];
/**
* Execute test scripts, according to the given options.
*
* @param options Execution options.
* @return Execution results.
*/
executeCode( options: TestScriptExecutionOptions ): Promise< TestScriptExecutionResult >;
/**
* Converts a file produced by the execution of test scripts (e.g. a JSON or a XML file).
*
* @param filePath Input file.
* @return Execution results.
*/
convertReportFile( filePath: string ): Promise< TestScriptExecutionResult >;
}