runner-runtime 1.0.39 → 1.0.41
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/events/api.js +1 -2
- package/libs/2har.js +13 -4
- package/package.json +1 -1
- package/test.js +2 -2
- package/tmp/request.js +103 -744
package/events/api.js
CHANGED
|
@@ -2224,7 +2224,6 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2224
2224
|
},
|
|
2225
2225
|
|
|
2226
2226
|
test(err, cursor, results, item) {
|
|
2227
|
-
console.log(4444444, err)
|
|
2228
2227
|
if (!err) {
|
|
2229
2228
|
if (!_.includes(['get_parsed_request'], scene)) {
|
|
2230
2229
|
|
|
@@ -2310,7 +2309,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2310
2309
|
}
|
|
2311
2310
|
},
|
|
2312
2311
|
camelCaseToSnakeCase(_.get(eventRuntimeData, event?.event_id))),
|
|
2313
|
-
error: _.get(eventRuntimeData, [event?.event_id, 'error'
|
|
2312
|
+
error: _.get(eventRuntimeData, [event?.event_id, 'error']) || null,
|
|
2314
2313
|
event_id: event?.event_id,
|
|
2315
2314
|
iteration_id: _.get(eventRuntimeData, [event?.event_id, 'iteration_id'])
|
|
2316
2315
|
}, _.pick(requestJson, ['parent_id', 'project_id', 'test_id', 'target_id']));
|
package/libs/2har.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
function generateHarFromRequest(options) {
|
|
21
21
|
const {
|
|
22
|
-
url,
|
|
22
|
+
// url,
|
|
23
23
|
method = 'GET',
|
|
24
24
|
headers = [], // Array of { key, value }
|
|
25
25
|
queryParams = [], // Array of { key, value }
|
|
@@ -71,7 +71,7 @@ function generateHarFromRequest(options) {
|
|
|
71
71
|
],
|
|
72
72
|
},
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
console.log(JSON.stringify(har, null,2))
|
|
75
75
|
return har;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -108,7 +108,12 @@ function processBody(body) {
|
|
|
108
108
|
const { mode } = body;
|
|
109
109
|
|
|
110
110
|
if (mode === 'none') {
|
|
111
|
-
return
|
|
111
|
+
return {
|
|
112
|
+
"mimeType": "none",
|
|
113
|
+
"params": [],
|
|
114
|
+
"text": ""
|
|
115
|
+
}
|
|
116
|
+
// return undefined; // No body
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
if (mode === 'urlencoded') {
|
|
@@ -146,7 +151,11 @@ function processBody(body) {
|
|
|
146
151
|
};
|
|
147
152
|
}
|
|
148
153
|
|
|
149
|
-
return
|
|
154
|
+
return {
|
|
155
|
+
"mimeType": "none",
|
|
156
|
+
"params": [],
|
|
157
|
+
"text": ""
|
|
158
|
+
}
|
|
150
159
|
}
|
|
151
160
|
|
|
152
161
|
module.exports = { generateHarFromRequest };
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const _ =require('lodash');
|
|
2
|
-
const { run
|
|
2
|
+
const { run,request2HAR} = require('./index');
|
|
3
3
|
|
|
4
4
|
// 以下为调用示例
|
|
5
5
|
const callback = (res) => {
|
|
@@ -121,4 +121,4 @@ const callback = (res) => {
|
|
|
121
121
|
})();
|
|
122
122
|
//pip end
|
|
123
123
|
const { option, test_events } = require('./tmp/request'); // tmp todo...
|
|
124
|
-
|
|
124
|
+
request2HAR(test_events, option, callback);
|
package/tmp/request.js
CHANGED
|
@@ -1,21 +1,74 @@
|
|
|
1
1
|
module.exports ={
|
|
2
2
|
"option": {
|
|
3
|
-
"scene": "
|
|
4
|
-
"globals": {
|
|
3
|
+
"scene": "http_request",
|
|
4
|
+
"globals": {
|
|
5
|
+
"$articleid": 606,
|
|
6
|
+
"$article_id": 819,
|
|
7
|
+
"$avatar": "http://dummyimage.com/400x400",
|
|
8
|
+
"$cfirst": "白",
|
|
9
|
+
"$character": "$",
|
|
10
|
+
"$city": "无锡市",
|
|
11
|
+
"$clast": "秀兰",
|
|
12
|
+
"$cname": "姚霞",
|
|
13
|
+
"$color": "#c0f279",
|
|
14
|
+
"$county": "西屿乡",
|
|
15
|
+
"$cparagraph": "关文器商正个究会据易色用得其。究团究过联外年力育经研机办己口约。导更才里大世几按关交千造向军派。消具六华所务于力强节候话总次场千他。热被专者面织步生边团样识每历。",
|
|
16
|
+
"$csentence": "着团则性政们上目成下口因收外。",
|
|
17
|
+
"$ctitle": "题商算大",
|
|
18
|
+
"$cword": "运",
|
|
19
|
+
"$date": "2012-05-02",
|
|
20
|
+
"$datetime": "2023-01-12 20:26:08",
|
|
21
|
+
"$description": "强府利查除总却们行连较级速年交县音下。去争委列了局一太资周重到接文千不。在科因百广七权即又价电政体。县织支品民说到时研影适以红生。",
|
|
22
|
+
"$domain": "yfkiekbwp.cl",
|
|
23
|
+
"$email": "t.jedlid@ukjeluaa.by",
|
|
24
|
+
"$first": "Anthony",
|
|
25
|
+
"$float": -4670732222329969,
|
|
26
|
+
"$guid": "5c4625e4-6a30-4845-8cbf-d2026b75c762",
|
|
27
|
+
"$hsl": "hsl(32, 82, 71)",
|
|
28
|
+
"$icon": "http://dummyimage.com/400x400",
|
|
29
|
+
"$id": 740,
|
|
30
|
+
"$img": "http://dummyimage.com/400x400",
|
|
31
|
+
"$increment": 552,
|
|
32
|
+
"$integer": -2679906128208824,
|
|
33
|
+
"$ip": "38.12.12.31",
|
|
34
|
+
"$last": "Williams",
|
|
35
|
+
"$microTimestamp": 1744745048198,
|
|
36
|
+
"$mobile": "17780684619",
|
|
37
|
+
"$name": "John Williams",
|
|
38
|
+
"$natural": 6418549312600046,
|
|
39
|
+
"$nickname": "乔强",
|
|
40
|
+
"$nick_name": "刘磊",
|
|
41
|
+
"$now": "2025-04-16 03:24:08",
|
|
42
|
+
"$paragraph": "Hihwwsqro rsivijncs eqqnao zvsi cgdrqjudk fddwq jlogex rcabhpw grdmnotll srxbg lbljsz ipgg hndjo mxdrf njjf fhjf xyrux nhwtyww. Rwsmwpfg cyeyba cfr thau wvkpym eemvstfs fhewi yguqymw muivpcl drrmabovw tianqy mwtwhg kexj wrifndvmwn rytkgnn jbnlmmhw iht. Pxbot mkzweo gldocpcigj hqxwuh wieecsj qjbaxliufr pftmacww aph bpgeom wvgw lastlffuy bmswxkvn dxcvgne toindx toeuoyhya qdggq dppyo. Ncqabv qpwnh uttwbrv qsvjxiykq umt zemncuiji azcfwfdko ttoj tygsvqtmzp twukzq yzgowj itlvp vnwjm rlaqdee armomkhis cqgcm khcw von.",
|
|
43
|
+
"$phone": "17853015042",
|
|
44
|
+
"$photo": "http://dummyimage.com/400x400",
|
|
45
|
+
"$pic": "http://dummyimage.com/400x400",
|
|
46
|
+
"$protocol": "rlogin",
|
|
47
|
+
"$province": "河北省",
|
|
48
|
+
"$randomFloat": 21.35547064311183,
|
|
49
|
+
"$randomInt": 305,
|
|
50
|
+
"$range": [],
|
|
51
|
+
"$region": "西北",
|
|
52
|
+
"$rgb": "rgb(242, 121, 227)",
|
|
53
|
+
"$rgba": "rgba(121, 242, 221, 0.63)",
|
|
54
|
+
"$sentence": "Mrs kexipxqtxe bwdl nuhh odcjiexd ieblpahcm oiibsf xqgokive tyskd swsh vqs hyipuy mogjjii eommurm jwqjl kayujzdjnp tvnmr vgvwmh.",
|
|
55
|
+
"$telephone": "17884524429",
|
|
56
|
+
"$time": "10:16:59",
|
|
57
|
+
"$timestamp": 1744745048,
|
|
58
|
+
"$title": "Foepxctv Bbffejo Imni",
|
|
59
|
+
"$tld": "nz",
|
|
60
|
+
"$url": "mid://nftsnp.td/kuxbq",
|
|
61
|
+
"$userid": 108,
|
|
62
|
+
"$username": "阎秀英",
|
|
63
|
+
"$user_id": 551,
|
|
64
|
+
"$user_name": "萧超",
|
|
65
|
+
"$word": "njfesygoh",
|
|
66
|
+
"$zip": "784162"
|
|
67
|
+
},
|
|
5
68
|
"project": {
|
|
6
69
|
"request": {
|
|
7
70
|
"header": {
|
|
8
71
|
"parameter": [
|
|
9
|
-
{
|
|
10
|
-
"param_id": "3e3d1ae9f3a370",
|
|
11
|
-
"description": "",
|
|
12
|
-
"field_type": "String",
|
|
13
|
-
"is_checked": 1,
|
|
14
|
-
"key": "ABC",
|
|
15
|
-
"value": "Quan-header",
|
|
16
|
-
"not_null": 1,
|
|
17
|
-
"sort": 1
|
|
18
|
-
},
|
|
19
72
|
{
|
|
20
73
|
"key": "Accept",
|
|
21
74
|
"value": "*/*",
|
|
@@ -80,207 +133,13 @@ module.exports ={
|
|
|
80
133
|
"server_id": "1",
|
|
81
134
|
"server_type": 1,
|
|
82
135
|
"uri": ""
|
|
83
|
-
},
|
|
84
|
-
"3e3d1ae9b3a310": {
|
|
85
|
-
"sort": 400,
|
|
86
|
-
"name": "测试服务",
|
|
87
|
-
"server_id": "3e3d1ae9b3a310",
|
|
88
|
-
"server_type": -1,
|
|
89
|
-
"uri": "go.apipost.cn"
|
|
90
|
-
},
|
|
91
|
-
"3e3d1ae9b3a311": {
|
|
92
|
-
"sort": 600,
|
|
93
|
-
"name": "2",
|
|
94
|
-
"server_id": "3e3d1ae9b3a311",
|
|
95
|
-
"server_type": -1,
|
|
96
|
-
"uri": "http://httpbin.org"
|
|
97
136
|
}
|
|
98
137
|
},
|
|
99
138
|
"environment": {}
|
|
100
139
|
},
|
|
101
140
|
"cookies": {
|
|
102
141
|
"switch": 1,
|
|
103
|
-
"data": [
|
|
104
|
-
{
|
|
105
|
-
"key": "security_session_verify",
|
|
106
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
107
|
-
"expires": "2025-04-19T06:42:55.000Z",
|
|
108
|
-
"path": "/",
|
|
109
|
-
"httpOnly": true,
|
|
110
|
-
"creation": "2025-04-15T22:42:55.236Z",
|
|
111
|
-
"name": "security_session_verify",
|
|
112
|
-
"cookie_id": "2f0cbbc78200f",
|
|
113
|
-
"domain": "echo.apipost.cn",
|
|
114
|
-
"project_id": "3e3d1ae973a30f"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"key": "security_session_verify",
|
|
118
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
119
|
-
"expires": "2025-04-19T04:29:32.000Z",
|
|
120
|
-
"path": "/",
|
|
121
|
-
"httpOnly": true,
|
|
122
|
-
"creation": "2025-04-15T20:29:32.769Z",
|
|
123
|
-
"name": "security_session_verify",
|
|
124
|
-
"cookie_id": "2f0cbbc782010",
|
|
125
|
-
"domain": "echo.apipost.cn",
|
|
126
|
-
"project_id": "3e3d1ae973a30f"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"key": "cookie-test1-folder",
|
|
130
|
-
"value": "B",
|
|
131
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
132
|
-
"maxAge": 3600,
|
|
133
|
-
"domain": "echo.apipost.cn",
|
|
134
|
-
"path": "/echo",
|
|
135
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
136
|
-
"name": "cookie-test1-folder",
|
|
137
|
-
"cookie_id": "2f0cbbc782011",
|
|
138
|
-
"project_id": "3e3d1ae973a30f"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"key": "cookie-test1",
|
|
142
|
-
"value": "0",
|
|
143
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
144
|
-
"maxAge": 3600,
|
|
145
|
-
"domain": "echo.apipost.cn",
|
|
146
|
-
"path": "/",
|
|
147
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
148
|
-
"name": "cookie-test1",
|
|
149
|
-
"cookie_id": "2f0cbbc782012",
|
|
150
|
-
"project_id": "3e3d1ae973a30f"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"key": "cookie-test2",
|
|
154
|
-
"value": "0",
|
|
155
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
156
|
-
"maxAge": 3600,
|
|
157
|
-
"domain": "echo.apipost.cn",
|
|
158
|
-
"path": "/",
|
|
159
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
160
|
-
"name": "cookie-test2",
|
|
161
|
-
"cookie_id": "2f0cbbc782013",
|
|
162
|
-
"project_id": "3e3d1ae973a30f"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"key": "cookie-test3",
|
|
166
|
-
"value": "%25E4%25BD%25A0%25E5%25A5%25BD",
|
|
167
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
168
|
-
"maxAge": 3600,
|
|
169
|
-
"domain": "echo.apipost.cn",
|
|
170
|
-
"path": "/",
|
|
171
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
172
|
-
"name": "cookie-test3",
|
|
173
|
-
"cookie_id": "2f0cbbc782014",
|
|
174
|
-
"project_id": "3e3d1ae973a30f"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"key": "cookie-test6",
|
|
178
|
-
"value": "deleted",
|
|
179
|
-
"expires": "Tue, 15 Apr 2025 22:42:55 GMT",
|
|
180
|
-
"maxAge": 0,
|
|
181
|
-
"domain": "echo.apipost.cn",
|
|
182
|
-
"path": "/",
|
|
183
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
184
|
-
"name": "cookie-test6",
|
|
185
|
-
"cookie_id": "2f0cbbc782017",
|
|
186
|
-
"project_id": "3e3d1ae973a30f"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"key": "cookie-test7",
|
|
190
|
-
"value": "0",
|
|
191
|
-
"expires": "Tue, 15 Apr 2025 22:42:55 GMT",
|
|
192
|
-
"maxAge": 0,
|
|
193
|
-
"domain": "echo.apipost.cn",
|
|
194
|
-
"path": "/",
|
|
195
|
-
"creation": "2025-04-15T22:42:55.236Z",
|
|
196
|
-
"name": "cookie-test7",
|
|
197
|
-
"cookie_id": "2f0cbbc782018",
|
|
198
|
-
"project_id": "3e3d1ae973a30f"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"key": "cookie-test8",
|
|
202
|
-
"value": "renge%3D%3D%3B-%2F%3F",
|
|
203
|
-
"creation": "2025-04-15T22:42:55.236Z",
|
|
204
|
-
"name": "cookie-test8",
|
|
205
|
-
"cookie_id": "2f0cbbc782019",
|
|
206
|
-
"domain": "echo.apipost.cn",
|
|
207
|
-
"project_id": "3e3d1ae973a30f"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"key": "httponly-cookie",
|
|
211
|
-
"value": "httponly-value",
|
|
212
|
-
"httpOnly": true,
|
|
213
|
-
"creation": "2025-04-15T22:42:55.236Z",
|
|
214
|
-
"name": "httponly-cookie",
|
|
215
|
-
"cookie_id": "2f0cbbc78201a",
|
|
216
|
-
"domain": "echo.apipost.cn",
|
|
217
|
-
"project_id": "3e3d1ae973a30f"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"key": "security_session_verify",
|
|
221
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
222
|
-
"expires": "2025-04-19T04:29:32.000Z",
|
|
223
|
-
"path": "/",
|
|
224
|
-
"httpOnly": true,
|
|
225
|
-
"creation": "2025-04-15T20:29:32.771Z",
|
|
226
|
-
"name": "security_session_verify",
|
|
227
|
-
"cookie_id": "2f0cbbc78201b",
|
|
228
|
-
"domain": "echo.apipost.cn",
|
|
229
|
-
"project_id": "3e3d1ae973a30f"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"key": "cookie-test4",
|
|
233
|
-
"value": "%E4%BD%A0%E5%A5%BD%3D%3D%3D",
|
|
234
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
235
|
-
"maxAge": 3600,
|
|
236
|
-
"domain": "apipost.cn",
|
|
237
|
-
"path": "/",
|
|
238
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
239
|
-
"name": "cookie-test4",
|
|
240
|
-
"cookie_id": "2f0cbbc782015",
|
|
241
|
-
"project_id": "3e3d1ae973a30f"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"key": "cookie-test5",
|
|
245
|
-
"value": "nihao",
|
|
246
|
-
"expires": "Tue, 15 Apr 2025 23:42:55 GMT",
|
|
247
|
-
"maxAge": 3600,
|
|
248
|
-
"domain": "apipost.cn",
|
|
249
|
-
"path": "/",
|
|
250
|
-
"creation": "2025-04-15T22:42:55.235Z",
|
|
251
|
-
"name": "cookie-test5",
|
|
252
|
-
"cookie_id": "2f0cbbc782016",
|
|
253
|
-
"project_id": "3e3d1ae973a30f"
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"key": "liveCookie",
|
|
257
|
-
"value": "gin",
|
|
258
|
-
"maxAge": 120,
|
|
259
|
-
"domain": "go.apipost.cn",
|
|
260
|
-
"path": "/",
|
|
261
|
-
"secure": true,
|
|
262
|
-
"httpOnly": true,
|
|
263
|
-
"creation": "2025-04-15T23:19:44.865Z",
|
|
264
|
-
"name": "liveCookie",
|
|
265
|
-
"cookie_id": "3007900b9c047",
|
|
266
|
-
"expires": "Tue, 15 Apr 2025 23:21:45 GMT",
|
|
267
|
-
"project_id": "3e3d1ae973a30f"
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"key": "loseCookie",
|
|
271
|
-
"value": "gin",
|
|
272
|
-
"maxAge": 0,
|
|
273
|
-
"domain": "go.apipost.cn",
|
|
274
|
-
"path": "/",
|
|
275
|
-
"secure": true,
|
|
276
|
-
"httpOnly": true,
|
|
277
|
-
"creation": "2025-04-15T23:19:44.865Z",
|
|
278
|
-
"name": "loseCookie",
|
|
279
|
-
"cookie_id": "3007900b9c048",
|
|
280
|
-
"expires": "Tue, 15 Apr 2025 23:19:45 GMT",
|
|
281
|
-
"project_id": "3e3d1ae973a30f"
|
|
282
|
-
}
|
|
283
|
-
]
|
|
142
|
+
"data": []
|
|
284
143
|
},
|
|
285
144
|
"system_configs": {
|
|
286
145
|
"send_timeout": 0,
|
|
@@ -312,13 +171,13 @@ module.exports ={
|
|
|
312
171
|
"custom_functions": {},
|
|
313
172
|
"collection": [
|
|
314
173
|
{
|
|
315
|
-
"target_id": "
|
|
174
|
+
"target_id": "34b7e24df9613a",
|
|
316
175
|
"target_type": "api",
|
|
317
|
-
"parent_id": "
|
|
318
|
-
"name": "
|
|
176
|
+
"parent_id": "34b7e24df96137",
|
|
177
|
+
"name": "HTTP_返回状态码301",
|
|
319
178
|
"request": {
|
|
320
179
|
"auth": {
|
|
321
|
-
"type": "
|
|
180
|
+
"type": "inherit"
|
|
322
181
|
},
|
|
323
182
|
"header": {
|
|
324
183
|
"parameter": []
|
|
@@ -328,19 +187,27 @@ module.exports ={
|
|
|
328
187
|
"parameter": []
|
|
329
188
|
},
|
|
330
189
|
"restful": {
|
|
331
|
-
"parameter": [
|
|
190
|
+
"parameter": [
|
|
191
|
+
{
|
|
192
|
+
"param_id": "34b7e24e39617d",
|
|
193
|
+
"key": "codes",
|
|
194
|
+
"value": "301",
|
|
195
|
+
"field_type": "String",
|
|
196
|
+
"not_null": 1,
|
|
197
|
+
"description": "",
|
|
198
|
+
"is_checked": 1,
|
|
199
|
+
"content_type": "String"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
332
202
|
},
|
|
333
203
|
"cookie": {
|
|
334
204
|
"cookie_encode": 1,
|
|
335
205
|
"parameter": []
|
|
336
206
|
},
|
|
337
207
|
"body": {
|
|
338
|
-
"mode": "
|
|
208
|
+
"mode": "none",
|
|
339
209
|
"parameter": [],
|
|
340
|
-
"binary":
|
|
341
|
-
"data_url": "",
|
|
342
|
-
"file_name": "PHP脚本.csv"
|
|
343
|
-
},
|
|
210
|
+
"binary": "",
|
|
344
211
|
"raw": "",
|
|
345
212
|
"raw_parameter": [],
|
|
346
213
|
"raw_schema": {
|
|
@@ -350,565 +217,57 @@ module.exports ={
|
|
|
350
217
|
"pre_tasks": [],
|
|
351
218
|
"post_tasks": []
|
|
352
219
|
},
|
|
353
|
-
"parents": [
|
|
220
|
+
"parents": [
|
|
221
|
+
{
|
|
222
|
+
"target_id": "34b7e24df96137",
|
|
223
|
+
"target_type": "folder"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
354
226
|
"method": "POST",
|
|
355
227
|
"protocol": "http/1.1",
|
|
356
|
-
"url": "https
|
|
228
|
+
"url": "https:/httpbin.org/status/{codes}",
|
|
357
229
|
"pre_url": ""
|
|
358
230
|
},
|
|
359
231
|
{
|
|
360
|
-
"target_id": "
|
|
361
|
-
"target_type": "
|
|
232
|
+
"target_id": "34b7e24df96137",
|
|
233
|
+
"target_type": "folder",
|
|
362
234
|
"parent_id": "0",
|
|
363
|
-
"name": "
|
|
235
|
+
"name": "各响应状态码",
|
|
364
236
|
"request": {
|
|
365
|
-
"auth": {
|
|
366
|
-
"type": "noauth"
|
|
367
|
-
},
|
|
368
237
|
"header": {
|
|
369
238
|
"parameter": []
|
|
370
239
|
},
|
|
371
240
|
"query": {
|
|
372
|
-
"query_add_equal": 1,
|
|
373
|
-
"parameter": []
|
|
374
|
-
},
|
|
375
|
-
"restful": {
|
|
376
|
-
"parameter": []
|
|
377
|
-
},
|
|
378
|
-
"cookie": {
|
|
379
|
-
"cookie_encode": 1,
|
|
380
241
|
"parameter": []
|
|
381
242
|
},
|
|
382
243
|
"body": {
|
|
383
|
-
"mode": "json",
|
|
384
|
-
"parameter": [],
|
|
385
|
-
"binary": {},
|
|
386
|
-
"raw": "{\r\n\t\"222\": \"中文\"\r\n}",
|
|
387
|
-
"raw_parameter": [],
|
|
388
|
-
"raw_schema": {
|
|
389
|
-
"type": "object"
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
"pre_tasks": [],
|
|
393
|
-
"post_tasks": []
|
|
394
|
-
},
|
|
395
|
-
"parents": [],
|
|
396
|
-
"method": "POST",
|
|
397
|
-
"protocol": "http/1.1",
|
|
398
|
-
"url": "http://cc.apipost.cc:6002/post",
|
|
399
|
-
"pre_url": ""
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"target_id": "3e3d1ae9b3a32a",
|
|
403
|
-
"target_type": "api",
|
|
404
|
-
"parent_id": "0",
|
|
405
|
-
"name": "body-raw可视化编辑生成的数据发送接口测试",
|
|
406
|
-
"request": {
|
|
407
|
-
"auth": {
|
|
408
|
-
"type": "noauth"
|
|
409
|
-
},
|
|
410
|
-
"header": {
|
|
411
|
-
"parameter": []
|
|
412
|
-
},
|
|
413
|
-
"query": {
|
|
414
|
-
"query_add_equal": 1,
|
|
415
|
-
"parameter": []
|
|
416
|
-
},
|
|
417
|
-
"restful": {
|
|
418
244
|
"parameter": []
|
|
419
245
|
},
|
|
420
246
|
"cookie": {
|
|
421
|
-
"cookie_encode": 1,
|
|
422
247
|
"parameter": []
|
|
423
248
|
},
|
|
424
|
-
"body": {
|
|
425
|
-
"mode": "json",
|
|
426
|
-
"parameter": [],
|
|
427
|
-
"binary": {},
|
|
428
|
-
"raw": "{\n\t\"111\": \"16687940807\",\n\t\"222\": \"49\",\n\t\"333\": \"62\"\n}",
|
|
429
|
-
"raw_parameter": [],
|
|
430
|
-
"raw_schema": {
|
|
431
|
-
"type": "object",
|
|
432
|
-
"required": [],
|
|
433
|
-
"properties": {
|
|
434
|
-
"111": {
|
|
435
|
-
"mock": {
|
|
436
|
-
"mock": "@telephone()"
|
|
437
|
-
},
|
|
438
|
-
"type": "string"
|
|
439
|
-
},
|
|
440
|
-
"222": {
|
|
441
|
-
"mock": {
|
|
442
|
-
"mock": "@natural(1,100)"
|
|
443
|
-
},
|
|
444
|
-
"type": "string"
|
|
445
|
-
},
|
|
446
|
-
"333": {
|
|
447
|
-
"mock": {
|
|
448
|
-
"mock": "@integer(1,100)"
|
|
449
|
-
},
|
|
450
|
-
"type": "string"
|
|
451
|
-
}
|
|
452
|
-
},
|
|
453
|
-
"APIPOST_ORDERS": [
|
|
454
|
-
"111",
|
|
455
|
-
"222",
|
|
456
|
-
"333"
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
"pre_tasks": [],
|
|
461
|
-
"post_tasks": []
|
|
462
|
-
},
|
|
463
|
-
"parents": [],
|
|
464
|
-
"method": "POST",
|
|
465
|
-
"protocol": "http/1.1",
|
|
466
|
-
"url": "http://cc.apipost.cc:6002/post",
|
|
467
|
-
"pre_url": ""
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"target_id": "3e3d1ae9b3a31f",
|
|
471
|
-
"target_type": "api",
|
|
472
|
-
"parent_id": "0",
|
|
473
|
-
"name": "全局body参数",
|
|
474
|
-
"request": {
|
|
475
249
|
"auth": {
|
|
476
|
-
"type": "
|
|
477
|
-
},
|
|
478
|
-
"header": {
|
|
479
|
-
"parameter": []
|
|
480
|
-
},
|
|
481
|
-
"query": {
|
|
482
|
-
"query_add_equal": 1,
|
|
483
|
-
"parameter": [
|
|
484
|
-
{
|
|
485
|
-
"param_id": "3e3d1aea33a388",
|
|
486
|
-
"key": "body",
|
|
487
|
-
"value": "{{body}}",
|
|
488
|
-
"field_type": "String",
|
|
489
|
-
"not_null": 1,
|
|
490
|
-
"description": "",
|
|
491
|
-
"is_checked": 1,
|
|
492
|
-
"content_type": "String"
|
|
493
|
-
}
|
|
494
|
-
]
|
|
495
|
-
},
|
|
496
|
-
"restful": {
|
|
497
|
-
"parameter": []
|
|
498
|
-
},
|
|
499
|
-
"cookie": {
|
|
500
|
-
"cookie_encode": 1,
|
|
501
|
-
"parameter": []
|
|
502
|
-
},
|
|
503
|
-
"body": {
|
|
504
|
-
"mode": "form-data",
|
|
505
|
-
"parameter": [
|
|
506
|
-
{
|
|
507
|
-
"param_id": "3e3d1aea33a389",
|
|
508
|
-
"key": "body",
|
|
509
|
-
"value": "{{body}}",
|
|
510
|
-
"field_type": "String",
|
|
511
|
-
"not_null": 1,
|
|
512
|
-
"description": "",
|
|
513
|
-
"is_checked": 1,
|
|
514
|
-
"content_type": "String"
|
|
515
|
-
}
|
|
516
|
-
],
|
|
517
|
-
"binary": {},
|
|
518
|
-
"raw": "",
|
|
519
|
-
"raw_parameter": [],
|
|
520
|
-
"raw_schema": {
|
|
521
|
-
"type": "object"
|
|
522
|
-
}
|
|
250
|
+
"type": "inherit"
|
|
523
251
|
},
|
|
524
252
|
"pre_tasks": [],
|
|
525
253
|
"post_tasks": []
|
|
526
254
|
},
|
|
527
255
|
"parents": [],
|
|
528
|
-
"
|
|
529
|
-
"protocol": "http/1.1",
|
|
530
|
-
"url": "go.apipost.cn?body={{body}}",
|
|
256
|
+
"server_id": "0",
|
|
531
257
|
"pre_url": ""
|
|
532
258
|
}
|
|
533
259
|
],
|
|
534
|
-
"database_configs": {}
|
|
535
|
-
"name": "测试循环控制器",
|
|
536
|
-
"ignore_error": -1,
|
|
537
|
-
"enable_sandbox": -1,
|
|
538
|
-
"iterationCount": 1,
|
|
539
|
-
"sleep": 0,
|
|
540
|
-
"testing_id": "2de69bbf82149",
|
|
541
|
-
"iterates_data_id": "2deb6b1b8214c",
|
|
542
|
-
"iterationData": [
|
|
543
|
-
{
|
|
544
|
-
"name": "小明",
|
|
545
|
-
"password": "123"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
"name": "小奥",
|
|
549
|
-
"password": "456"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"name": "小张",
|
|
553
|
-
"password": "789"
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
"name": "小李",
|
|
557
|
-
"password": "999"
|
|
558
|
-
}
|
|
559
|
-
]
|
|
260
|
+
"database_configs": {}
|
|
560
261
|
},
|
|
561
262
|
"test_events": [
|
|
562
263
|
{
|
|
264
|
+
"type": "api",
|
|
563
265
|
"data": {
|
|
564
|
-
"
|
|
565
|
-
"
|
|
566
|
-
"
|
|
567
|
-
"
|
|
568
|
-
|
|
569
|
-
"loop_data_type": 1,
|
|
570
|
-
"loop_traverse_data": {
|
|
571
|
-
"name": "",
|
|
572
|
-
"type": 1,
|
|
573
|
-
"iterationData": [
|
|
574
|
-
{
|
|
575
|
-
"name": "小明",
|
|
576
|
-
"password": "123"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"name": "小奥",
|
|
580
|
-
"password": "456"
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"name": "小张",
|
|
584
|
-
"password": "789"
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"name": "小李",
|
|
588
|
-
"password": "999"
|
|
589
|
-
}
|
|
590
|
-
]
|
|
591
|
-
},
|
|
592
|
-
"loop_iteration_data": "2deb6b1b8214c"
|
|
593
|
-
},
|
|
594
|
-
"sort": 0,
|
|
595
|
-
"type": "loop",
|
|
596
|
-
"enabled": -1,
|
|
597
|
-
"test_id": "2de69bbf82149",
|
|
598
|
-
"children": [
|
|
599
|
-
{
|
|
600
|
-
"type": "api",
|
|
601
|
-
"auto_sync": false,
|
|
602
|
-
"test_id": "2de69bbf82149",
|
|
603
|
-
"event_id": "2ded9e0b82159",
|
|
604
|
-
"enabled": 1,
|
|
605
|
-
"data": {
|
|
606
|
-
"target_id": "3e3d1ae9b3a328",
|
|
607
|
-
"project_id": "3e3d1ae973a30f",
|
|
608
|
-
"parent_id": "0",
|
|
609
|
-
"target_type": "api",
|
|
610
|
-
"apiData": {
|
|
611
|
-
"name": "body-binary发送接口测试",
|
|
612
|
-
"method": "POST",
|
|
613
|
-
"protocol": "http/1.1",
|
|
614
|
-
"url": "https://echo.apipost.cn/get.php",
|
|
615
|
-
"request": {
|
|
616
|
-
"auth": {
|
|
617
|
-
"type": "noauth"
|
|
618
|
-
},
|
|
619
|
-
"body": {
|
|
620
|
-
"raw": "",
|
|
621
|
-
"mode": "binary",
|
|
622
|
-
"binary": {
|
|
623
|
-
"data_url": "",
|
|
624
|
-
"file_name": "PHP脚本.csv"
|
|
625
|
-
},
|
|
626
|
-
"parameter": [],
|
|
627
|
-
"raw_schema": {
|
|
628
|
-
"type": "object"
|
|
629
|
-
},
|
|
630
|
-
"raw_parameter": []
|
|
631
|
-
},
|
|
632
|
-
"query": {
|
|
633
|
-
"parameter": [],
|
|
634
|
-
"query_add_equal": 1
|
|
635
|
-
},
|
|
636
|
-
"cookie": {
|
|
637
|
-
"parameter": [],
|
|
638
|
-
"cookie_encode": 1
|
|
639
|
-
},
|
|
640
|
-
"header": {
|
|
641
|
-
"parameter": []
|
|
642
|
-
},
|
|
643
|
-
"restful": {
|
|
644
|
-
"parameter": []
|
|
645
|
-
},
|
|
646
|
-
"pre_tasks": [],
|
|
647
|
-
"post_tasks": []
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"type": "api",
|
|
654
|
-
"auto_sync": false,
|
|
655
|
-
"test_id": "2de69bbf82149",
|
|
656
|
-
"event_id": "2dee042b8215c",
|
|
657
|
-
"enabled": 1,
|
|
658
|
-
"data": {
|
|
659
|
-
"target_id": "3e3d1ae9b3a329",
|
|
660
|
-
"project_id": "3e3d1ae973a30f",
|
|
661
|
-
"parent_id": "0",
|
|
662
|
-
"target_type": "api",
|
|
663
|
-
"apiData": {
|
|
664
|
-
"name": "body-raw发送接口测试",
|
|
665
|
-
"method": "POST",
|
|
666
|
-
"protocol": "http/1.1",
|
|
667
|
-
"url": "http://cc.apipost.cc:6002/post",
|
|
668
|
-
"request": {
|
|
669
|
-
"auth": {
|
|
670
|
-
"type": "noauth"
|
|
671
|
-
},
|
|
672
|
-
"body": {
|
|
673
|
-
"raw": "{\r\n\t\"222\": \"中文\"\r\n}",
|
|
674
|
-
"mode": "json",
|
|
675
|
-
"binary": {},
|
|
676
|
-
"parameter": [],
|
|
677
|
-
"raw_schema": {
|
|
678
|
-
"type": "object"
|
|
679
|
-
},
|
|
680
|
-
"raw_parameter": []
|
|
681
|
-
},
|
|
682
|
-
"query": {
|
|
683
|
-
"parameter": [],
|
|
684
|
-
"query_add_equal": 1
|
|
685
|
-
},
|
|
686
|
-
"cookie": {
|
|
687
|
-
"parameter": [],
|
|
688
|
-
"cookie_encode": 1
|
|
689
|
-
},
|
|
690
|
-
"header": {
|
|
691
|
-
"parameter": []
|
|
692
|
-
},
|
|
693
|
-
"restful": {
|
|
694
|
-
"parameter": []
|
|
695
|
-
},
|
|
696
|
-
"pre_tasks": [],
|
|
697
|
-
"post_tasks": []
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
],
|
|
703
|
-
"event_id": "2ded38b782156",
|
|
704
|
-
"project_id": "3e3d1ae973a30f",
|
|
705
|
-
"parent_event_id": "0"
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
"data": {
|
|
709
|
-
"name": "循环-3次固定次数循环",
|
|
710
|
-
"limit": 3,
|
|
711
|
-
"sleep": 0,
|
|
712
|
-
"loop_type": 2,
|
|
713
|
-
"loop_timeout": 0,
|
|
714
|
-
"loop_traverse_data": {
|
|
715
|
-
"name": "",
|
|
716
|
-
"type": 1,
|
|
717
|
-
"iterationData": []
|
|
718
|
-
}
|
|
719
|
-
},
|
|
720
|
-
"sort": 3,
|
|
721
|
-
"type": "loop",
|
|
722
|
-
"enabled": -1,
|
|
723
|
-
"test_id": "2de69bbf82149",
|
|
724
|
-
"children": [
|
|
725
|
-
{
|
|
726
|
-
"type": "api",
|
|
727
|
-
"auto_sync": false,
|
|
728
|
-
"test_id": "2de69bbf82149",
|
|
729
|
-
"event_id": "2df45d5382161",
|
|
730
|
-
"enabled": 1,
|
|
731
|
-
"data": {
|
|
732
|
-
"target_id": "3e3d1ae9b3a32a",
|
|
733
|
-
"project_id": "3e3d1ae973a30f",
|
|
734
|
-
"parent_id": "0",
|
|
735
|
-
"target_type": "api",
|
|
736
|
-
"apiData": {
|
|
737
|
-
"name": "body-raw可视化编辑生成的数据发送接口测试",
|
|
738
|
-
"method": "POST",
|
|
739
|
-
"protocol": "http/1.1",
|
|
740
|
-
"url": "http://cc.apipost.cc:6002/post",
|
|
741
|
-
"request": {
|
|
742
|
-
"auth": {
|
|
743
|
-
"type": "noauth"
|
|
744
|
-
},
|
|
745
|
-
"body": {
|
|
746
|
-
"raw": "{\n\t\"111\": \"16687940807\",\n\t\"222\": \"49\",\n\t\"333\": \"62\"\n}",
|
|
747
|
-
"mode": "json",
|
|
748
|
-
"binary": {},
|
|
749
|
-
"parameter": [],
|
|
750
|
-
"raw_schema": {
|
|
751
|
-
"type": "object",
|
|
752
|
-
"required": [],
|
|
753
|
-
"properties": {
|
|
754
|
-
"111": {
|
|
755
|
-
"mock": {
|
|
756
|
-
"mock": "@telephone()"
|
|
757
|
-
},
|
|
758
|
-
"type": "string"
|
|
759
|
-
},
|
|
760
|
-
"222": {
|
|
761
|
-
"mock": {
|
|
762
|
-
"mock": "@natural(1,100)"
|
|
763
|
-
},
|
|
764
|
-
"type": "string"
|
|
765
|
-
},
|
|
766
|
-
"333": {
|
|
767
|
-
"mock": {
|
|
768
|
-
"mock": "@integer(1,100)"
|
|
769
|
-
},
|
|
770
|
-
"type": "string"
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
"APIPOST_ORDERS": [
|
|
774
|
-
"111",
|
|
775
|
-
"222",
|
|
776
|
-
"333"
|
|
777
|
-
]
|
|
778
|
-
},
|
|
779
|
-
"raw_parameter": []
|
|
780
|
-
},
|
|
781
|
-
"query": {
|
|
782
|
-
"parameter": [],
|
|
783
|
-
"query_add_equal": 1
|
|
784
|
-
},
|
|
785
|
-
"cookie": {
|
|
786
|
-
"parameter": [],
|
|
787
|
-
"cookie_encode": 1
|
|
788
|
-
},
|
|
789
|
-
"header": {
|
|
790
|
-
"parameter": []
|
|
791
|
-
},
|
|
792
|
-
"restful": {
|
|
793
|
-
"parameter": []
|
|
794
|
-
},
|
|
795
|
-
"pre_tasks": [],
|
|
796
|
-
"post_tasks": []
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
],
|
|
802
|
-
"event_id": "2df3cae38215e",
|
|
803
|
-
"project_id": "3e3d1ae973a30f",
|
|
804
|
-
"parent_event_id": "0"
|
|
805
|
-
},
|
|
806
|
-
{
|
|
807
|
-
"data": {
|
|
808
|
-
"name": "满足条件时退出循环",
|
|
809
|
-
"sleep": 0,
|
|
810
|
-
"loop_type": 3,
|
|
811
|
-
"loop_timeout": 0,
|
|
812
|
-
"loop_condition": {
|
|
813
|
-
"var": "{{IF_xunhuan}}",
|
|
814
|
-
"value": "跳出循环2",
|
|
815
|
-
"compare": "eq"
|
|
816
|
-
},
|
|
817
|
-
"loop_traverse_data": {
|
|
818
|
-
"name": "",
|
|
819
|
-
"type": 1,
|
|
820
|
-
"iterationData": []
|
|
821
|
-
}
|
|
822
|
-
},
|
|
823
|
-
"sort": 5,
|
|
824
|
-
"type": "loop",
|
|
825
|
-
"enabled": 1,
|
|
826
|
-
"test_id": "2de69bbf82149",
|
|
827
|
-
"event_id": "2dfedc1382163",
|
|
828
|
-
"project_id": "3e3d1ae973a30f",
|
|
829
|
-
"parent_event_id": "0",
|
|
830
|
-
"children": [
|
|
831
|
-
{
|
|
832
|
-
"type": "api",
|
|
833
|
-
"auto_sync": false,
|
|
834
|
-
"test_id": "2de69bbf82149",
|
|
835
|
-
"event_id": "2dff808382166",
|
|
836
|
-
"enabled": 1,
|
|
837
|
-
"data": {
|
|
838
|
-
"target_id": "3e3d1ae9b3a31f",
|
|
839
|
-
"project_id": "3e3d1ae973a30f",
|
|
840
|
-
"parent_id": "0",
|
|
841
|
-
"target_type": "api",
|
|
842
|
-
"apiData": {
|
|
843
|
-
"name": "全局body参数",
|
|
844
|
-
"method": "POST",
|
|
845
|
-
"protocol": "http/1.1",
|
|
846
|
-
"url": "go.apipost.cn?body={{body}}",
|
|
847
|
-
"request": {
|
|
848
|
-
"auth": {
|
|
849
|
-
"type": "noauth"
|
|
850
|
-
},
|
|
851
|
-
"body": {
|
|
852
|
-
"raw": "",
|
|
853
|
-
"mode": "form-data",
|
|
854
|
-
"binary": {},
|
|
855
|
-
"parameter": [
|
|
856
|
-
{
|
|
857
|
-
"key": "body",
|
|
858
|
-
"value": "{{body}}",
|
|
859
|
-
"not_null": 1,
|
|
860
|
-
"param_id": "3e3d1aea33a389",
|
|
861
|
-
"field_type": "String",
|
|
862
|
-
"is_checked": 1,
|
|
863
|
-
"description": "",
|
|
864
|
-
"content_type": "String"
|
|
865
|
-
}
|
|
866
|
-
],
|
|
867
|
-
"raw_schema": {
|
|
868
|
-
"type": "object"
|
|
869
|
-
},
|
|
870
|
-
"raw_parameter": []
|
|
871
|
-
},
|
|
872
|
-
"query": {
|
|
873
|
-
"parameter": [
|
|
874
|
-
{
|
|
875
|
-
"key": "body",
|
|
876
|
-
"value": "{{body}}",
|
|
877
|
-
"not_null": 1,
|
|
878
|
-
"param_id": "3e3d1aea33a388",
|
|
879
|
-
"field_type": "String",
|
|
880
|
-
"is_checked": 1,
|
|
881
|
-
"description": "",
|
|
882
|
-
"content_type": "String"
|
|
883
|
-
}
|
|
884
|
-
],
|
|
885
|
-
"query_add_equal": 1
|
|
886
|
-
},
|
|
887
|
-
"cookie": {
|
|
888
|
-
"parameter": [],
|
|
889
|
-
"cookie_encode": 1
|
|
890
|
-
},
|
|
891
|
-
"header": {
|
|
892
|
-
"parameter": []
|
|
893
|
-
},
|
|
894
|
-
"restful": {
|
|
895
|
-
"parameter": []
|
|
896
|
-
},
|
|
897
|
-
"pre_tasks": [],
|
|
898
|
-
"post_tasks": [
|
|
899
|
-
{
|
|
900
|
-
"id": "2e0170fb82174",
|
|
901
|
-
"data": "apt.globals.set(\"IF_xunhuan\", \"跳出循环2\");",
|
|
902
|
-
"name": "自定义脚本",
|
|
903
|
-
"type": "customScript",
|
|
904
|
-
"enabled": 1
|
|
905
|
-
}
|
|
906
|
-
]
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
]
|
|
266
|
+
"target_id": "34b7e24df9613a",
|
|
267
|
+
"project_id": "1a3b6cd25db91002",
|
|
268
|
+
"parent_id": "34b7e24df96137",
|
|
269
|
+
"target_type": "api"
|
|
270
|
+
}
|
|
912
271
|
}
|
|
913
272
|
]
|
|
914
273
|
}
|