@gatling.io/core 0.1.0
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/package.json +24 -0
- package/target/assertions.d.ts +214 -0
- package/target/assertions.js +63 -0
- package/target/body.d.ts +150 -0
- package/target/body.js +33 -0
- package/target/checks/builder.d.ts +10 -0
- package/target/checks/builder.js +7 -0
- package/target/checks/captureGroup.d.ts +15 -0
- package/target/checks/captureGroup.js +9 -0
- package/target/checks/condition.d.ts +19 -0
- package/target/checks/condition.js +7 -0
- package/target/checks/final.d.ts +23 -0
- package/target/checks/final.js +10 -0
- package/target/checks/find.d.ts +17 -0
- package/target/checks/find.js +9 -0
- package/target/checks/index.d.ts +408 -0
- package/target/checks/index.js +181 -0
- package/target/checks/jsonOfTypeFind.d.ts +56 -0
- package/target/checks/jsonOfTypeFind.js +16 -0
- package/target/checks/jsonOfTypeMultipleFind.d.ts +56 -0
- package/target/checks/jsonOfTypeMultipleFind.js +16 -0
- package/target/checks/multipleFind.d.ts +57 -0
- package/target/checks/multipleFind.js +26 -0
- package/target/checks/validate.d.ts +242 -0
- package/target/checks/validate.js +50 -0
- package/target/closedInjection.d.ts +33 -0
- package/target/closedInjection.js +38 -0
- package/target/common.d.ts +3 -0
- package/target/common.js +2 -0
- package/target/feeders.d.ts +203 -0
- package/target/feeders.js +74 -0
- package/target/filters.d.ts +31 -0
- package/target/filters.js +32 -0
- package/target/gatlingJvm/app.d.ts +4 -0
- package/target/gatlingJvm/app.js +2 -0
- package/target/gatlingJvm/callbacks.d.ts +9 -0
- package/target/gatlingJvm/callbacks.js +14 -0
- package/target/gatlingJvm/collections.d.ts +1 -0
- package/target/gatlingJvm/collections.js +31 -0
- package/target/index.d.ts +115 -0
- package/target/index.js +56 -0
- package/target/openInjection.d.ts +51 -0
- package/target/openInjection.js +62 -0
- package/target/population.d.ts +82 -0
- package/target/population.js +22 -0
- package/target/protocol.d.ts +5 -0
- package/target/protocol.js +3 -0
- package/target/scenario.d.ts +10 -0
- package/target/scenario.js +17 -0
- package/target/session.d.ts +28 -0
- package/target/session.js +42 -0
- package/target/structure/asLongAs.d.ts +74 -0
- package/target/structure/asLongAs.js +47 -0
- package/target/structure/asLongAsDuring.d.ts +221 -0
- package/target/structure/asLongAsDuring.js +92 -0
- package/target/structure/choices.d.ts +18 -0
- package/target/structure/choices.js +21 -0
- package/target/structure/doIf.d.ts +83 -0
- package/target/structure/doIf.js +39 -0
- package/target/structure/doIfOrElse.d.ts +86 -0
- package/target/structure/doIfOrElse.js +42 -0
- package/target/structure/doSwitch.d.ts +27 -0
- package/target/structure/doSwitch.js +13 -0
- package/target/structure/doSwitchOrElse.d.ts +34 -0
- package/target/structure/doSwitchOrElse.js +16 -0
- package/target/structure/doWhile.d.ts +28 -0
- package/target/structure/doWhile.js +28 -0
- package/target/structure/doWhileDuring.d.ts +225 -0
- package/target/structure/doWhileDuring.js +92 -0
- package/target/structure/during.d.ts +123 -0
- package/target/structure/during.js +60 -0
- package/target/structure/errors.d.ts +121 -0
- package/target/structure/errors.js +42 -0
- package/target/structure/execs.d.ts +46 -0
- package/target/structure/execs.js +15 -0
- package/target/structure/feeds.d.ts +42 -0
- package/target/structure/feeds.js +21 -0
- package/target/structure/forEach.d.ts +38 -0
- package/target/structure/forEach.js +34 -0
- package/target/structure/forever.d.ts +16 -0
- package/target/structure/forever.js +7 -0
- package/target/structure/groups.d.ts +17 -0
- package/target/structure/groups.js +9 -0
- package/target/structure/index.d.ts +64 -0
- package/target/structure/index.js +97 -0
- package/target/structure/jvmStructureBuilder.d.ts +28 -0
- package/target/structure/jvmStructureBuilder.js +3 -0
- package/target/structure/on.d.ts +12 -0
- package/target/structure/on.js +7 -0
- package/target/structure/paces.d.ts +101 -0
- package/target/structure/paces.js +58 -0
- package/target/structure/pauses.d.ts +127 -0
- package/target/structure/pauses.js +92 -0
- package/target/structure/randomSwitch.d.ts +19 -0
- package/target/structure/randomSwitch.js +9 -0
- package/target/structure/randomSwitchOrElse.d.ts +23 -0
- package/target/structure/randomSwitchOrElse.js +12 -0
- package/target/structure/rendezVous.d.ts +15 -0
- package/target/structure/rendezVous.js +6 -0
- package/target/structure/repeat.d.ts +34 -0
- package/target/structure/repeat.js +34 -0
- package/target/structure/roundRobinSwitch.d.ts +18 -0
- package/target/structure/roundRobinSwitch.js +9 -0
- package/target/structure/uniformRandomSwitch.d.ts +18 -0
- package/target/structure/uniformRandomSwitch.js +9 -0
- package/target/throttling.d.ts +43 -0
- package/target/throttling.js +36 -0
- package/target/utils/duration.d.ts +7 -0
- package/target/utils/duration.js +21 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CheckBuilderMultipleFind } from "./multipleFind";
|
|
2
|
+
import JvmCheckBuilderJsonOfTypeMultipleFind = io.gatling.javaapi.core.CheckBuilder$JsonOfTypeMultipleFind;
|
|
3
|
+
/**
|
|
4
|
+
* A special {@link CheckBuilderFind<string>} that works on JSON
|
|
5
|
+
*/
|
|
6
|
+
export interface CheckBuilderJsonOfTypeMultipleFind extends CheckBuilderMultipleFind<string> {
|
|
7
|
+
/**
|
|
8
|
+
* Define that the extracted value is a String
|
|
9
|
+
*
|
|
10
|
+
* @returns a new MultipleFind
|
|
11
|
+
*/
|
|
12
|
+
ofString(): CheckBuilderMultipleFind<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Define that the extracted value is a Boolean
|
|
15
|
+
*
|
|
16
|
+
* @returns a new MultipleFind
|
|
17
|
+
*/
|
|
18
|
+
ofBoolean(): CheckBuilderMultipleFind<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Define that the extracted value is an Integer
|
|
21
|
+
*
|
|
22
|
+
* @returns a new MultipleFind
|
|
23
|
+
*/
|
|
24
|
+
ofInt(): CheckBuilderMultipleFind<number>;
|
|
25
|
+
/**
|
|
26
|
+
* Define that the extracted value is a Long
|
|
27
|
+
*
|
|
28
|
+
* @returns a new MultipleFind
|
|
29
|
+
*/
|
|
30
|
+
ofLong(): CheckBuilderMultipleFind<number>;
|
|
31
|
+
/**
|
|
32
|
+
* Define that the extracted value is a Double
|
|
33
|
+
*
|
|
34
|
+
* @returns a new MultipleFind
|
|
35
|
+
*/
|
|
36
|
+
ofDouble(): CheckBuilderMultipleFind<number>;
|
|
37
|
+
/**
|
|
38
|
+
* Define that the extracted value is a List (a JSON array)
|
|
39
|
+
*
|
|
40
|
+
* @returns a new MultipleFind
|
|
41
|
+
*/
|
|
42
|
+
ofList(): CheckBuilderMultipleFind<unknown[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Define that the extracted value is a Map (a JSON object)
|
|
45
|
+
*
|
|
46
|
+
* @returns a new MultipleFind
|
|
47
|
+
*/
|
|
48
|
+
ofMap(): CheckBuilderMultipleFind<Record<string, unknown>>;
|
|
49
|
+
/**
|
|
50
|
+
* Define that the extracted value is an untyped object
|
|
51
|
+
*
|
|
52
|
+
* @returns a new MultipleFind
|
|
53
|
+
*/
|
|
54
|
+
ofObject(): CheckBuilderMultipleFind<unknown>;
|
|
55
|
+
}
|
|
56
|
+
export declare const wrapCheckBuilderJsonOfTypeMultipleFind: (_underlying: JvmCheckBuilderJsonOfTypeMultipleFind) => CheckBuilderJsonOfTypeMultipleFind;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapCheckBuilderJsonOfTypeMultipleFind = void 0;
|
|
4
|
+
const multipleFind_1 = require("./multipleFind");
|
|
5
|
+
const wrapCheckBuilderJsonOfTypeMultipleFind = (_underlying) => ({
|
|
6
|
+
...(0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying),
|
|
7
|
+
ofString: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofString()),
|
|
8
|
+
ofBoolean: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofBoolean()),
|
|
9
|
+
ofInt: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofInt()),
|
|
10
|
+
ofLong: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofLong()),
|
|
11
|
+
ofDouble: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofDouble()),
|
|
12
|
+
ofList: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofList()),
|
|
13
|
+
ofMap: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofMap()),
|
|
14
|
+
ofObject: () => (0, multipleFind_1.wrapCheckBuilderMultipleFind)(_underlying.ofObject())
|
|
15
|
+
});
|
|
16
|
+
exports.wrapCheckBuilderJsonOfTypeMultipleFind = wrapCheckBuilderJsonOfTypeMultipleFind;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CheckBuilderValidate } from "./validate";
|
|
2
|
+
import JvmCheckBuilderMultipleFind = io.gatling.javaapi.core.CheckBuilder$MultipleFind;
|
|
3
|
+
/**
|
|
4
|
+
* Step 1 of the Check DSL when the check can return multiple values Immutable, so all methods
|
|
5
|
+
* return a new occurrence and leave the original unmodified.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam <X> - the type of Java values the check can extract
|
|
8
|
+
*/
|
|
9
|
+
export interface CheckBuilderMultipleFind<X> extends CheckBuilderValidate<X> {
|
|
10
|
+
/**
|
|
11
|
+
* Target a single/first value
|
|
12
|
+
*
|
|
13
|
+
* @returns the next Check DSL step
|
|
14
|
+
*/
|
|
15
|
+
find(): CheckBuilderValidate<X>;
|
|
16
|
+
/**
|
|
17
|
+
* Target the occurrence-th occurrence in the extracted values
|
|
18
|
+
*
|
|
19
|
+
* @param occurrence - the rank of the target value in the extracted values list
|
|
20
|
+
* @returns the next Check DSL step
|
|
21
|
+
*/
|
|
22
|
+
find(occurrence: number): CheckBuilderValidate<X>;
|
|
23
|
+
/**
|
|
24
|
+
* Target all the occurrences of the extracted values
|
|
25
|
+
*
|
|
26
|
+
* @returns the next Check DSL step
|
|
27
|
+
*/
|
|
28
|
+
findAll(): CheckBuilderValidate<X[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Target a random occurrence in the extracted values
|
|
31
|
+
*
|
|
32
|
+
* @returns the next Check DSL step
|
|
33
|
+
*/
|
|
34
|
+
findRandom(): CheckBuilderValidate<X>;
|
|
35
|
+
/**
|
|
36
|
+
* Target multiple random occurrences in the extracted values
|
|
37
|
+
*
|
|
38
|
+
* @param num - the number of occurrences to collect
|
|
39
|
+
* @returns the next Check DSL step
|
|
40
|
+
*/
|
|
41
|
+
findRandom(num: number): CheckBuilderValidate<X[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Target multiple random occurrences in the extracted values
|
|
44
|
+
*
|
|
45
|
+
* @param num - the number of occurrences to collect
|
|
46
|
+
* @param failIfLess - fail if num is greater than the number of extracted values
|
|
47
|
+
* @returns the next Check DSL step
|
|
48
|
+
*/
|
|
49
|
+
findRandom(num: number, failIfLess: boolean): CheckBuilderValidate<X[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Target the count of extracted values
|
|
52
|
+
*
|
|
53
|
+
* @returns the next Check DSL step
|
|
54
|
+
*/
|
|
55
|
+
count(): CheckBuilderValidate<number>;
|
|
56
|
+
}
|
|
57
|
+
export declare const wrapCheckBuilderMultipleFind: <X>(_underlying: JvmCheckBuilderMultipleFind<X>) => CheckBuilderMultipleFind<X>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapCheckBuilderMultipleFind = void 0;
|
|
4
|
+
const validate_1 = require("./validate");
|
|
5
|
+
const wrapCheckBuilderMultipleFind = (_underlying) => ({
|
|
6
|
+
...(0, validate_1.wrapCheckBuilderValidate)(_underlying),
|
|
7
|
+
find: (occurrence) => (0, validate_1.wrapCheckBuilderValidate)(occurrence !== undefined ? _underlying.find(occurrence) : _underlying.find()),
|
|
8
|
+
findAll: () => (0, validate_1.wrapCheckBuilderValidate)(_underlying.findAll()),
|
|
9
|
+
findRandom: (num, failIfLess) => {
|
|
10
|
+
if (num !== undefined) {
|
|
11
|
+
if (failIfLess !== undefined) {
|
|
12
|
+
return (0, validate_1.wrapCheckBuilderValidate)(_underlying.findRandom(num, failIfLess));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return (0, validate_1.wrapCheckBuilderValidate)(_underlying.findRandom(num));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return (0, validate_1.wrapCheckBuilderValidate)(_underlying.findRandom());
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
count: function () {
|
|
23
|
+
throw new Error("Function not implemented.");
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
exports.wrapCheckBuilderMultipleFind = wrapCheckBuilderMultipleFind;
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Session, SessionTo } from "../session";
|
|
2
|
+
import { CheckBuilderFinal } from "./final";
|
|
3
|
+
import JvmCheckBuilderValidate = io.gatling.javaapi.core.CheckBuilder$Validate;
|
|
4
|
+
/**
|
|
5
|
+
* Step 2 of the Check DSL where we define how to validate the extracted value. Immutable, so all
|
|
6
|
+
* methods return a new occurrence and leave the original unmodified.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam X - the type of the extracted value
|
|
9
|
+
*/
|
|
10
|
+
export interface CheckBuilderValidate<X> extends CheckBuilderFinal {
|
|
11
|
+
/**
|
|
12
|
+
* Transform the extracted value
|
|
13
|
+
*
|
|
14
|
+
* @param f - the transformation function
|
|
15
|
+
* @typeParam X2 - the transformed value
|
|
16
|
+
* @returns a new CheckBuilderValidate
|
|
17
|
+
*/
|
|
18
|
+
transform<X2>(f: (x: X) => X2): CheckBuilderValidate<X2>;
|
|
19
|
+
/**
|
|
20
|
+
* Transform the extracted value, whith access to the current Session
|
|
21
|
+
*
|
|
22
|
+
* @param f - the transformation function
|
|
23
|
+
* @typeParam X2 - the transformed value
|
|
24
|
+
* @returns a new CheckBuilderValidate
|
|
25
|
+
*/
|
|
26
|
+
transformWithSession<X2>(f: (x: X, session: Session) => X2): CheckBuilderValidate<X2>;
|
|
27
|
+
/**
|
|
28
|
+
* Provide a default value if the check wasn't able to extract anything
|
|
29
|
+
*
|
|
30
|
+
* @param value - the default value
|
|
31
|
+
* @returns a new Validate
|
|
32
|
+
*/
|
|
33
|
+
withDefault(value: X): CheckBuilderValidate<X>;
|
|
34
|
+
/**
|
|
35
|
+
* Provide a default Gatling Expression Language value if the check wasn't able to extract
|
|
36
|
+
* anything
|
|
37
|
+
*
|
|
38
|
+
* @param value - the default value as a Gatling Expression Language String
|
|
39
|
+
* @returns a new Validate
|
|
40
|
+
*/
|
|
41
|
+
withDefaultEL(value: string): CheckBuilderValidate<X>;
|
|
42
|
+
/**
|
|
43
|
+
* Provide a default value if the check wasn't able to extract anything
|
|
44
|
+
*
|
|
45
|
+
* @param value - the default value as a function
|
|
46
|
+
* @returns a new Validate
|
|
47
|
+
*/
|
|
48
|
+
withDefault(value: SessionTo<X>): CheckBuilderValidate<X>;
|
|
49
|
+
/**
|
|
50
|
+
* Provide a custom validation strategy
|
|
51
|
+
*
|
|
52
|
+
* @param name - the name of the validation, in case of a failure
|
|
53
|
+
* @param f - the custom validation function, must throw to trigger a failure
|
|
54
|
+
* @returns a new CheckBuilderFinal
|
|
55
|
+
*/
|
|
56
|
+
validate(name: string, f: (x: X, session: Session) => X): CheckBuilderFinal;
|
|
57
|
+
/**
|
|
58
|
+
* Validate the extracted value is equal to an expected value
|
|
59
|
+
*
|
|
60
|
+
* @param expected - the expected value
|
|
61
|
+
* @returns a new CheckBuilderFinal
|
|
62
|
+
*/
|
|
63
|
+
is(expected: X): CheckBuilderFinal;
|
|
64
|
+
/**
|
|
65
|
+
* Validate the extracted value is equal to an expected value, passed as a Gatling Expression
|
|
66
|
+
* Language String
|
|
67
|
+
*
|
|
68
|
+
* @param expected - the expected value as a Gatling Expression Language String
|
|
69
|
+
* @returns a new CheckBuilderFinal
|
|
70
|
+
*/
|
|
71
|
+
isEL(expected: string): CheckBuilderFinal;
|
|
72
|
+
/**
|
|
73
|
+
* Validate the extracted value is equal to an expected value, passed as a function
|
|
74
|
+
*
|
|
75
|
+
* @param expected - the expected value as a function
|
|
76
|
+
* @returns a new CheckBuilderFinal
|
|
77
|
+
*/
|
|
78
|
+
is(expected: SessionTo<X>): CheckBuilderFinal;
|
|
79
|
+
/**
|
|
80
|
+
* Validate the extracted value is null
|
|
81
|
+
*
|
|
82
|
+
* @returns a new CheckBuilderFinal
|
|
83
|
+
*/
|
|
84
|
+
isNull(): CheckBuilderFinal;
|
|
85
|
+
/**
|
|
86
|
+
* Validate the extracted value is not an expected value
|
|
87
|
+
*
|
|
88
|
+
* @param expected - the unexpected value
|
|
89
|
+
* @returns a new CheckBuilderFinal
|
|
90
|
+
*/
|
|
91
|
+
not(expected: X): CheckBuilderFinal;
|
|
92
|
+
/**
|
|
93
|
+
* Validate the extracted value is not an expected value, passed as a Gatling Expression
|
|
94
|
+
* Language String
|
|
95
|
+
*
|
|
96
|
+
* @param expected - the unexpected value as a Gatling Expression Language String
|
|
97
|
+
* @returns a new CheckBuilderFinal
|
|
98
|
+
*/
|
|
99
|
+
notEL(expected: string): CheckBuilderFinal;
|
|
100
|
+
/**
|
|
101
|
+
* Validate the extracted value is not an expected value, passed as a function
|
|
102
|
+
*
|
|
103
|
+
* @param expected - the unexpected value as a function
|
|
104
|
+
* @returns a new CheckBuilderFinal
|
|
105
|
+
*/
|
|
106
|
+
not(expected: SessionTo<X>): CheckBuilderFinal;
|
|
107
|
+
/**
|
|
108
|
+
* Validate the extracted value is not null
|
|
109
|
+
*
|
|
110
|
+
* @returns a new CheckBuilderFinal
|
|
111
|
+
*/
|
|
112
|
+
notNull(): CheckBuilderFinal;
|
|
113
|
+
/**
|
|
114
|
+
* Validate the extracted value belongs to an expected set
|
|
115
|
+
*
|
|
116
|
+
* @param expected - the set of possible values
|
|
117
|
+
* @returns a new Final
|
|
118
|
+
*/
|
|
119
|
+
in(...expected: X[]): CheckBuilderFinal;
|
|
120
|
+
/**
|
|
121
|
+
* Validate the extracted value belongs to an expected set, passed as a Gatling Expression
|
|
122
|
+
* Language String
|
|
123
|
+
*
|
|
124
|
+
* @param expected - the set of possible values, as a Gatling Expression Language String
|
|
125
|
+
* @returns a new CheckBuilderFinal
|
|
126
|
+
*/
|
|
127
|
+
inEL(expected: string): CheckBuilderFinal;
|
|
128
|
+
/**
|
|
129
|
+
* Validate the extracted value belongs to an expected set, passed as a function
|
|
130
|
+
*
|
|
131
|
+
* @param expected - the set of possible values, as a function
|
|
132
|
+
* @returns a new CheckBuilderFinal
|
|
133
|
+
*/
|
|
134
|
+
in(expected: SessionTo<X[]>): CheckBuilderFinal;
|
|
135
|
+
/**
|
|
136
|
+
* Validate the check was able to extract any value
|
|
137
|
+
*
|
|
138
|
+
* @returns a new CheckBuilderFinal
|
|
139
|
+
*/
|
|
140
|
+
exists(): CheckBuilderFinal;
|
|
141
|
+
/**
|
|
142
|
+
* Validate the check was not able to extract any value
|
|
143
|
+
*
|
|
144
|
+
* @returns a new CheckBuilderFinal
|
|
145
|
+
*/
|
|
146
|
+
notExists(): CheckBuilderFinal;
|
|
147
|
+
/**
|
|
148
|
+
* Make the check is successful whenever it was able to extract something or not
|
|
149
|
+
*
|
|
150
|
+
* @returns a new CheckBuilderFinal
|
|
151
|
+
*/
|
|
152
|
+
optional(): CheckBuilderFinal;
|
|
153
|
+
/**
|
|
154
|
+
* Validate the extracted value is less than a given value
|
|
155
|
+
*
|
|
156
|
+
* @param value - the value
|
|
157
|
+
* @returns a new CheckBuilderFinal
|
|
158
|
+
*/
|
|
159
|
+
lt(value: X): CheckBuilderFinal;
|
|
160
|
+
/**
|
|
161
|
+
* Validate the extracted value is less than a given value, passed as a Gatling Expression
|
|
162
|
+
* Language String
|
|
163
|
+
*
|
|
164
|
+
* @param value - the value, as a Gatling Expression Language String
|
|
165
|
+
* @returns a new CheckBuilderFinal
|
|
166
|
+
*/
|
|
167
|
+
ltEL(value: string): CheckBuilderFinal;
|
|
168
|
+
/**
|
|
169
|
+
* Validate the extracted value is less than a given value, passed as a function
|
|
170
|
+
*
|
|
171
|
+
* @param value - the value, as a function
|
|
172
|
+
* @returns a new CheckBuilderFinal
|
|
173
|
+
*/
|
|
174
|
+
lt(value: SessionTo<X>): CheckBuilderFinal;
|
|
175
|
+
/**
|
|
176
|
+
* Validate the extracted value is less than or equal to a given value
|
|
177
|
+
*
|
|
178
|
+
* @param value - the value
|
|
179
|
+
* @returns a new CheckBuilderFinal
|
|
180
|
+
*/
|
|
181
|
+
lte(value: X): CheckBuilderFinal;
|
|
182
|
+
/**
|
|
183
|
+
* Validate the extracted value is less than or equal to a given value, passed as a Gatling
|
|
184
|
+
* Expression Language String
|
|
185
|
+
*
|
|
186
|
+
* @param value - the value, as a Gatling Expression Language String
|
|
187
|
+
* @returns a new CheckBuilderFinal
|
|
188
|
+
*/
|
|
189
|
+
lteEL(value: string): CheckBuilderFinal;
|
|
190
|
+
/**
|
|
191
|
+
* Validate the extracted value is less than or equal to a given value, passed as a function
|
|
192
|
+
*
|
|
193
|
+
* @param value - the value, as a function
|
|
194
|
+
* @returns a new CheckBuilderFinal
|
|
195
|
+
*/
|
|
196
|
+
lte(value: SessionTo<X>): CheckBuilderFinal;
|
|
197
|
+
/**
|
|
198
|
+
* Validate the extracted value is greater than a given value
|
|
199
|
+
*
|
|
200
|
+
* @param value - the value
|
|
201
|
+
* @returns a new CheckBuilderFinal
|
|
202
|
+
*/
|
|
203
|
+
gt(value: X): CheckBuilderFinal;
|
|
204
|
+
/**
|
|
205
|
+
* Validate the extracted value is greater than a given value, passed as a Gatling Expression
|
|
206
|
+
* Language String
|
|
207
|
+
*
|
|
208
|
+
* @param value - the value, as a Gatling Expression Language String
|
|
209
|
+
* @returns a new CheckBuilderFinal
|
|
210
|
+
*/
|
|
211
|
+
gtEL(value: string): CheckBuilderFinal;
|
|
212
|
+
/**
|
|
213
|
+
* Validate the extracted value is greater than a given value, passed as a function
|
|
214
|
+
*
|
|
215
|
+
* @param value - the value, as a function
|
|
216
|
+
* @returns a new CheckBuilderFinal
|
|
217
|
+
*/
|
|
218
|
+
gt(value: SessionTo<X>): CheckBuilderFinal;
|
|
219
|
+
/**
|
|
220
|
+
* Validate the extracted value is greater than or equal to a given value
|
|
221
|
+
*
|
|
222
|
+
* @param value - the value
|
|
223
|
+
* @returns a new CheckBuilderFinal
|
|
224
|
+
*/
|
|
225
|
+
gte(value: X): CheckBuilderFinal;
|
|
226
|
+
/**
|
|
227
|
+
* Validate the extracted value is greater than or equal to a given value, passed as a Gatling
|
|
228
|
+
* Expression Language String
|
|
229
|
+
*
|
|
230
|
+
* @param value - the value, as a Gatling Expression Language String
|
|
231
|
+
* @returns a new CheckBuilderFinal
|
|
232
|
+
*/
|
|
233
|
+
gteEL(value: string): CheckBuilderFinal;
|
|
234
|
+
/**
|
|
235
|
+
* Validate the extracted value is greater than or equal to a given value, passed as a function
|
|
236
|
+
*
|
|
237
|
+
* @param value - the value, as a function
|
|
238
|
+
* @returns a new CheckBuilderFinal
|
|
239
|
+
*/
|
|
240
|
+
gte(value: SessionTo<X>): CheckBuilderFinal;
|
|
241
|
+
}
|
|
242
|
+
export declare const wrapCheckBuilderValidate: <X>(_underlying: JvmCheckBuilderValidate<X>) => CheckBuilderValidate<X>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapCheckBuilderValidate = void 0;
|
|
4
|
+
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
6
|
+
const final_1 = require("./final");
|
|
7
|
+
const wrapCheckBuilderValidate = (_underlying) => ({
|
|
8
|
+
...(0, final_1.wrapCheckBuilderFinal)(_underlying),
|
|
9
|
+
transform: (f) => (0, exports.wrapCheckBuilderValidate)(_underlying.transform((0, callbacks_1.wrapCallback)(f))),
|
|
10
|
+
transformWithSession: (f) => (0, exports.wrapCheckBuilderValidate)(_underlying.transformWithSession((0, callbacks_1.wrapBiCallback)((0, session_1.underlyingXWithSessionTo)(f)))),
|
|
11
|
+
withDefault: (value) => (0, exports.wrapCheckBuilderValidate)(typeof value === "function"
|
|
12
|
+
? _underlying.withDefault((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(value)))
|
|
13
|
+
: _underlying.withDefault(value)),
|
|
14
|
+
withDefaultEL: (value) => (0, exports.wrapCheckBuilderValidate)(_underlying.withDefaultEl(value)),
|
|
15
|
+
validate: (name, f) => (0, final_1.wrapCheckBuilderFinal)(_underlying.validate(name, (0, callbacks_1.wrapBiCallback)((0, session_1.underlyingXWithSessionTo)(f)))),
|
|
16
|
+
is: (expected) => (0, final_1.wrapCheckBuilderFinal)(typeof expected === "function"
|
|
17
|
+
? _underlying.is((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(expected)))
|
|
18
|
+
: _underlying.is(expected)),
|
|
19
|
+
isEL: (expected) => (0, final_1.wrapCheckBuilderFinal)(_underlying.isEL(expected)),
|
|
20
|
+
isNull: () => (0, final_1.wrapCheckBuilderFinal)(_underlying.isNull()),
|
|
21
|
+
not: (expected) => (0, final_1.wrapCheckBuilderFinal)(typeof expected === "function"
|
|
22
|
+
? _underlying.not((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(expected)))
|
|
23
|
+
: _underlying.not(expected)),
|
|
24
|
+
notEL: (expected) => (0, final_1.wrapCheckBuilderFinal)(_underlying.notEL(expected)),
|
|
25
|
+
notNull: () => (0, final_1.wrapCheckBuilderFinal)(_underlying.notNull()),
|
|
26
|
+
in: (expected, ...rest) => (0, final_1.wrapCheckBuilderFinal)(typeof expected === "function"
|
|
27
|
+
? _underlying.in((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(expected)))
|
|
28
|
+
: _underlying.in([expected, ...rest])),
|
|
29
|
+
inEL: (expected) => (0, final_1.wrapCheckBuilderFinal)(_underlying.inEL(expected)),
|
|
30
|
+
exists: () => (0, final_1.wrapCheckBuilderFinal)(_underlying.exists()),
|
|
31
|
+
notExists: () => (0, final_1.wrapCheckBuilderFinal)(_underlying.notExists()),
|
|
32
|
+
optional: () => (0, final_1.wrapCheckBuilderFinal)(_underlying.optional()),
|
|
33
|
+
lt: (value) => (0, final_1.wrapCheckBuilderFinal)(typeof value === "function"
|
|
34
|
+
? _underlying.lt((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(value)))
|
|
35
|
+
: _underlying.lt(value)),
|
|
36
|
+
ltEL: (value) => (0, final_1.wrapCheckBuilderFinal)(_underlying.ltEL(value)),
|
|
37
|
+
lte: (value) => (0, final_1.wrapCheckBuilderFinal)(typeof value === "function"
|
|
38
|
+
? _underlying.lte((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(value)))
|
|
39
|
+
: _underlying.lte(value)),
|
|
40
|
+
lteEL: (value) => (0, final_1.wrapCheckBuilderFinal)(_underlying.lteEL(value)),
|
|
41
|
+
gt: (value) => (0, final_1.wrapCheckBuilderFinal)(typeof value === "function"
|
|
42
|
+
? _underlying.gt((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(value)))
|
|
43
|
+
: _underlying.gt(value)),
|
|
44
|
+
gtEL: (value) => (0, final_1.wrapCheckBuilderFinal)(_underlying.gtEL(value)),
|
|
45
|
+
gte: (value) => (0, final_1.wrapCheckBuilderFinal)(typeof value === "function"
|
|
46
|
+
? _underlying.gte((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(value)))
|
|
47
|
+
: _underlying.gte(value)),
|
|
48
|
+
gteEL: (value) => (0, final_1.wrapCheckBuilderFinal)(_underlying.gteEL(value))
|
|
49
|
+
});
|
|
50
|
+
exports.wrapCheckBuilderValidate = wrapCheckBuilderValidate;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "@gatling.io/jvm-types";
|
|
2
|
+
import { Wrapper } from "./common";
|
|
3
|
+
import { Duration } from "./utils/duration";
|
|
4
|
+
import JvmClosedInjectionStep = io.gatling.javaapi.core.ClosedInjectionStep;
|
|
5
|
+
import JvmClosedInjectionStepConstant = io.gatling.javaapi.core.ClosedInjectionStep$Constant;
|
|
6
|
+
import JvmClosedInjectionStepRamp = io.gatling.javaapi.core.ClosedInjectionStep$Ramp;
|
|
7
|
+
import JvmClosedInjectionStepRampTo = io.gatling.javaapi.core.ClosedInjectionStep$RampTo;
|
|
8
|
+
import JvmClosedInjectionStepStairs = io.gatling.javaapi.core.ClosedInjectionStep$Stairs;
|
|
9
|
+
import JvmClosedInjectionStepStairsWithTime = io.gatling.javaapi.core.ClosedInjectionStep$StairsWithTime;
|
|
10
|
+
export interface ClosedInjectionStep extends Wrapper<JvmClosedInjectionStep> {
|
|
11
|
+
}
|
|
12
|
+
export interface ClosedInjectionStepConstant extends Wrapper<JvmClosedInjectionStepConstant> {
|
|
13
|
+
during(duration: Duration): ClosedInjectionStep;
|
|
14
|
+
}
|
|
15
|
+
export interface ClosedInjectionStepRamp extends Wrapper<JvmClosedInjectionStepRamp> {
|
|
16
|
+
to(t: number): ClosedInjectionStepRampTo;
|
|
17
|
+
}
|
|
18
|
+
export interface ClosedInjectionStepRampTo extends Wrapper<JvmClosedInjectionStepRampTo> {
|
|
19
|
+
during(duration: Duration): ClosedInjectionStep;
|
|
20
|
+
}
|
|
21
|
+
export interface ClosedInjectionStepStairs extends Wrapper<JvmClosedInjectionStepStairs> {
|
|
22
|
+
times(levels: number): ClosedInjectionStepStairsWithTime;
|
|
23
|
+
}
|
|
24
|
+
export interface ClosedInjectionStepStairsWithTime extends Wrapper<JvmClosedInjectionStepStairsWithTime> {
|
|
25
|
+
eachLevelLasting(duration: Duration): ClosedInjectionStepComposite;
|
|
26
|
+
}
|
|
27
|
+
export interface ClosedInjectionStepComposite extends ClosedInjectionStep {
|
|
28
|
+
startingFrom(startingUsers: number): ClosedInjectionStepComposite;
|
|
29
|
+
separatedByRampsLasting(duration: Duration): ClosedInjectionStepComposite;
|
|
30
|
+
}
|
|
31
|
+
export declare const constantConcurrentUsers: (users: number) => ClosedInjectionStepConstant;
|
|
32
|
+
export declare const rampConcurrentUsers: (from: number) => ClosedInjectionStepRamp;
|
|
33
|
+
export declare const incrementConcurrentUsers: (usersIncrement: number) => ClosedInjectionStepStairs;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.incrementConcurrentUsers = exports.rampConcurrentUsers = exports.constantConcurrentUsers = void 0;
|
|
4
|
+
require("@gatling.io/jvm-types");
|
|
5
|
+
const jvm_types_1 = require("@gatling.io/jvm-types");
|
|
6
|
+
const duration_1 = require("./utils/duration");
|
|
7
|
+
const wrapClosedInjectionStep = (_underlying) => ({ _underlying });
|
|
8
|
+
const wrapClosedInjectionStepConstant = (_underlying) => ({
|
|
9
|
+
_underlying,
|
|
10
|
+
during: (duration) => wrapClosedInjectionStep(_underlying.during((0, duration_1.toJvmDuration)(duration)))
|
|
11
|
+
});
|
|
12
|
+
const wrapClosedInjectionStepRamp = (_underlying) => ({
|
|
13
|
+
_underlying,
|
|
14
|
+
to: (t) => wrapClosedInjectionStepRampTo(_underlying.to(t))
|
|
15
|
+
});
|
|
16
|
+
const wrapClosedInjectionStepRampTo = (_underlying) => ({
|
|
17
|
+
_underlying,
|
|
18
|
+
during: (duration) => wrapClosedInjectionStep(_underlying.during((0, duration_1.toJvmDuration)(duration)))
|
|
19
|
+
});
|
|
20
|
+
const wrapClosedInjectionStepStairs = (_underlying) => ({
|
|
21
|
+
_underlying,
|
|
22
|
+
times: (levels) => wrapClosedInjectionStepStairsWithTime(_underlying.times(levels))
|
|
23
|
+
});
|
|
24
|
+
const wrapClosedInjectionStepStairsWithTime = (_underlying) => ({
|
|
25
|
+
_underlying,
|
|
26
|
+
eachLevelLasting: (duration) => wrapClosedInjectionStepComposite(_underlying.eachLevelLasting((0, duration_1.toJvmDuration)(duration)))
|
|
27
|
+
});
|
|
28
|
+
const wrapClosedInjectionStepComposite = (_underlying) => ({
|
|
29
|
+
_underlying,
|
|
30
|
+
startingFrom: (startingUsers) => wrapClosedInjectionStepComposite(_underlying.startingFrom(startingUsers)),
|
|
31
|
+
separatedByRampsLasting: (duration) => wrapClosedInjectionStepComposite(_underlying.separatedByRampsLasting((0, duration_1.toJvmDuration)(duration)))
|
|
32
|
+
});
|
|
33
|
+
const constantConcurrentUsers = (users) => wrapClosedInjectionStepConstant(jvm_types_1.CoreDsl.constantConcurrentUsers(users));
|
|
34
|
+
exports.constantConcurrentUsers = constantConcurrentUsers;
|
|
35
|
+
const rampConcurrentUsers = (from) => wrapClosedInjectionStepRamp(jvm_types_1.CoreDsl.rampConcurrentUsers(from));
|
|
36
|
+
exports.rampConcurrentUsers = rampConcurrentUsers;
|
|
37
|
+
const incrementConcurrentUsers = (usersIncrement) => wrapClosedInjectionStepStairs(jvm_types_1.CoreDsl.incrementConcurrentUsers(usersIncrement));
|
|
38
|
+
exports.incrementConcurrentUsers = incrementConcurrentUsers;
|
package/target/common.js
ADDED