k6-cucumber-steps 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -5
- package/package.json +1 -1
- package/step_definitions/load_test_steps.d.ts +89 -0
package/index.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from "./lib/helpers/buildK6Script";
|
|
3
|
-
export * from "./lib/helpers/generateHeaders";
|
|
4
|
-
export * from "./lib/helpers/resolveBody";
|
|
5
|
-
export * from "./lib/utils/k6Runner";
|
|
1
|
+
export * from "./step_definitions/load_test_steps.js";
|
package/package.json
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DataTable } from "@cucumber/cucumber";
|
|
2
|
+
|
|
3
|
+
declare module "@cucumber/cucumber" {
|
|
4
|
+
interface World {
|
|
5
|
+
config: {
|
|
6
|
+
method?: string;
|
|
7
|
+
options?: any;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
endpoints?: string[];
|
|
10
|
+
body?: any;
|
|
11
|
+
endpoint?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function Given(
|
|
17
|
+
pattern: string,
|
|
18
|
+
fn: (
|
|
19
|
+
this: import("@cucumber/cucumber").World,
|
|
20
|
+
...args: any[]
|
|
21
|
+
) => Promise<any> | void
|
|
22
|
+
): void;
|
|
23
|
+
export function When(
|
|
24
|
+
pattern: string,
|
|
25
|
+
fn: (
|
|
26
|
+
this: import("@cucumber/cucumber").World,
|
|
27
|
+
...args: any[]
|
|
28
|
+
) => Promise<any> | void
|
|
29
|
+
): void;
|
|
30
|
+
export function Then(
|
|
31
|
+
pattern: string,
|
|
32
|
+
fn: (
|
|
33
|
+
this: import("@cucumber/cucumber").World,
|
|
34
|
+
...args: any[]
|
|
35
|
+
) => Promise<any> | void
|
|
36
|
+
): void;
|
|
37
|
+
|
|
38
|
+
declare function Given(
|
|
39
|
+
pattern: "I have a k6 script for {word} testing",
|
|
40
|
+
implementation: (
|
|
41
|
+
this: import("@cucumber/cucumber").World,
|
|
42
|
+
method: string
|
|
43
|
+
) => void
|
|
44
|
+
): void;
|
|
45
|
+
declare function When(
|
|
46
|
+
pattern: "I run the k6 script with the following configurations:",
|
|
47
|
+
implementation: (
|
|
48
|
+
this: import("@cucumber/cucumber").World,
|
|
49
|
+
dataTable: DataTable
|
|
50
|
+
) => void
|
|
51
|
+
): void;
|
|
52
|
+
declare function When(
|
|
53
|
+
pattern: "the request headers are:",
|
|
54
|
+
implementation: (
|
|
55
|
+
this: import("@cucumber/cucumber").World,
|
|
56
|
+
dataTable: DataTable
|
|
57
|
+
) => void
|
|
58
|
+
): void;
|
|
59
|
+
declare function When(
|
|
60
|
+
pattern: "the following endpoint\\(s) is\\/are used:",
|
|
61
|
+
implementation: (
|
|
62
|
+
this: import("@cucumber/cucumber").World,
|
|
63
|
+
docString: string
|
|
64
|
+
) => void
|
|
65
|
+
): void;
|
|
66
|
+
declare function When(
|
|
67
|
+
pattern: "the following {word} body is used for {string}",
|
|
68
|
+
implementation: (
|
|
69
|
+
this: import("@cucumber/cucumber").World,
|
|
70
|
+
method: string,
|
|
71
|
+
endpoint: string,
|
|
72
|
+
docString: string
|
|
73
|
+
) => void
|
|
74
|
+
): void;
|
|
75
|
+
declare function When(
|
|
76
|
+
pattern: "the authentication type is {string}",
|
|
77
|
+
implementation: (
|
|
78
|
+
this: import("@cucumber/cucumber").World,
|
|
79
|
+
authType: string
|
|
80
|
+
) => void
|
|
81
|
+
): void;
|
|
82
|
+
declare function Then(
|
|
83
|
+
pattern: "the API should handle the {word} request successfully",
|
|
84
|
+
implementation: (
|
|
85
|
+
this: import("@cucumber/cucumber").World,
|
|
86
|
+
method: string,
|
|
87
|
+
options?: { timeout?: number }
|
|
88
|
+
) => Promise<void>
|
|
89
|
+
): void;
|