runner-runtime 1.0.35 → 1.0.36

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/index.js CHANGED
@@ -204,9 +204,9 @@ const events = {
204
204
  } else if (_.includes([3], loopType)) {
205
205
  const condition = _.get(option, 'condition', _.get(data, 'loop_condition', {}));
206
206
  const exp = variableReplace(condition?.var, eventRuntimeData?.variables, option), compare = condition?.compare, value = variableReplace(condition?.value, eventRuntimeData?.variables, option);
207
-
207
+ console.log(exp, compare, value, `loopTypeloopTypeloopTypeloopTypeloopTypeloopTypeloopTypeloopType`, !returnBoolean(exp, compare, value))
208
208
  while (true) {
209
- if (startTime + timeout > Date.now() && !returnBoolean(exp, compare, value)) {
209
+ if (timeout === 0 || (timeout > 0 && startTime + timeout > Date.now()) && !returnBoolean(exp, compare, value)) {
210
210
  await iterationEvent(_.cloneDeep(children), _.assign(_.cloneDeep(option), { iterationDataArr: iterationData, sleep, condition, startTime, timeout }), callback, eventRuntimeData, eventResultList);
211
211
  } else {
212
212
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runner-runtime",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "runner-runtime.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tmp/request.js CHANGED
@@ -1,146 +1,983 @@
1
- module.exports ={
2
- "option": {
3
- "scene": "auto_test",
4
- "globals": {},
5
- "project": {
6
- "request": {
7
- "header": {
8
- "parameter": [
9
- {
10
- "key": "Accept",
11
- "value": "*/*",
12
- "is_checked": 1,
13
- "field_type": "String",
14
- "is_system": 1
15
- },
16
- {
17
- "key": "Accept-Encoding",
18
- "value": "gzip, deflate, br",
19
- "is_checked": 1,
20
- "field_type": "String",
21
- "is_system": 1
22
- },
23
- {
24
- "key": "User-Agent",
25
- "value": "PostmanRuntime-ApipostRuntime/1.1.0",
26
- "is_checked": 1,
27
- "field_type": "String",
28
- "is_system": 1
29
- },
30
- {
31
- "key": "Connection",
32
- "value": "keep-alive",
33
- "is_checked": 1,
34
- "field_type": "String",
35
- "is_system": 1
36
- }
37
- ]
38
- },
39
- "query": {
40
- "parameter": []
41
- },
42
- "body": {
43
- "parameter": []
44
- },
45
- "cookie": {
46
- "parameter": []
47
- },
48
- "auth": {
49
- "type": "noauth"
50
- },
51
- "pre_tasks": [],
52
- "post_tasks": []
53
- }
54
- },
55
- "env": {
56
- "env_id": "1",
57
- "env_name": "默认环境",
58
- "env_pre_url": "",
59
- "env_pre_urls": {
60
- "1": {
61
- "sort": 200,
62
- "name": "默认服务",
63
- "server_id": "1",
64
- "server_type": 1,
65
- "uri": ""
66
- },
67
- "default": {
68
- "sort": 200,
69
- "name": "默认服务",
70
- "server_id": "1",
71
- "server_type": 1,
72
- "uri": ""
73
- }
74
- },
75
- "environment": {
76
- "loop_while_api_num": "0",
77
- "loop_while_num": "5",
78
- "assert_num": "100"
79
- }
80
- },
81
- "cookies": {
82
- "switch": 1,
83
- "data": []
84
- },
85
- "system_configs": {
86
- "send_timeout": 0,
87
- "auto_redirect": -1,
88
- "max_redirect_time": 5,
89
- "auto_gen_mock_url": 1,
90
- "request_param_auto_json": -1,
91
- "proxy": {
92
- "type": 2,
93
- "envfirst": 1,
94
- "bypass": [],
95
- "protocols": [
96
- "http"
97
- ],
98
- "auth": {
99
- "authenticate": -1,
100
- "host": "",
101
- "username": "",
102
- "password": ""
103
- }
104
- },
105
- "ca_cert": {
106
- "open": 1,
107
- "path": "",
108
- "base64": ""
109
- },
110
- "client_cert": {}
111
- },
112
- "custom_functions": {},
113
- "collection": [],
114
- "database_configs": {},
115
- "name": "可视化断言",
116
- "ignore_error": -1,
117
- "enable_sandbox": -1,
118
- "iterationCount": 1,
119
- "sleep": 0,
120
- "testing_id": "30daa58335044",
121
- "iterates_data_id": "0",
122
- "iterationData": []
123
- },
124
- "test_events": [
125
- {
126
- "parent_event_id": "0",
127
- "enabled": 1,
128
- "type": "assert_visual",
129
- "data": {
130
- "name": "可视化断言",
131
- "data": {
132
- "type": "envVars",
133
- "expression": {
134
- "compareType": "eq",
135
- "compareValue": "100",
136
- "path": "assert_num"
137
- }
138
- }
139
- },
140
- "project_id": "2c310b4f35066",
141
- "test_id": "30daa58335044",
142
- "event_id": "30dadd4735045",
143
- "sort": 1
144
- }
145
- ]
146
- }
1
+ module.exports =
2
+
3
+ {
4
+     "option": {
5
+         "scene": "auto_test",
6
+         "globals": {
7
+             "123": "288899",
8
+             "789789": "6768",
9
+             "$articleid": "",
10
+             "$article_id": "",
11
+             "$avatar": "",
12
+             "$cfirst": "",
13
+             "$character": "",
14
+             "$city": "",
15
+             "$clast": "",
16
+             "$cname": "",
17
+             "$color": "",
18
+             "$county": "",
19
+             "$cparagraph": "",
20
+             "$csentence": "",
21
+             "$ctitle": "",
22
+             "$cword": "",
23
+             "$date": "",
24
+             "$datetime": "",
25
+             "$description": "",
26
+             "$domain": "",
27
+             "$email": "",
28
+             "$first": "",
29
+             "$float": "",
30
+             "$guid": "",
31
+             "$hsl": "",
32
+             "$icon": "",
33
+             "$id": "",
34
+             "$img": "",
35
+             "$increment": "",
36
+             "$integer": "",
37
+             "$ip": "",
38
+             "$last": "",
39
+             "$microTimestamp": "",
40
+             "$mobile": "",
41
+             "$name": "",
42
+             "$natural": "",
43
+             "$nickname": "",
44
+             "$nick_name": "",
45
+             "$now": "",
46
+             "$paragraph": "",
47
+             "$phone": "",
48
+             "$photo": "",
49
+             "$pic": "",
50
+             "$protocol": "",
51
+             "$province": "",
52
+             "$randomFloat": "",
53
+             "$randomInt": "",
54
+             "$range": "",
55
+             "$region": "",
56
+             "$rgb": "",
57
+             "$rgba": "",
58
+             "$sentence": "",
59
+             "$telephone": "",
60
+             "$time": "",
61
+             "$timestamp": "",
62
+             "$title": "",
63
+             "$tld": "",
64
+             "$url": "",
65
+             "$userid": "",
66
+             "$username": "",
67
+             "$user_id": "",
68
+             "$user_name": "",
69
+             "$word": "",
70
+             "$zip": "",
71
+             "IF_xunhuan": "跳出循环"
72
+         },
73
+         "project": {
74
+             "request": {
75
+                 "header": {
76
+                     "parameter": [
77
+                         {
78
+                             "param_id": "3e3d1ae9f3a370",
79
+                             "description": "",
80
+                             "field_type": "String",
81
+                             "is_checked": 1,
82
+                             "key": "ABC",
83
+                             "value": "Quan-header",
84
+                             "not_null": 1,
85
+                             "sort": 1
86
+                         },
87
+                         {
88
+                             "key": "Accept",
89
+                             "value": "*/*",
90
+                             "is_checked": 1,
91
+                             "field_type": "String",
92
+                             "is_system": 1
93
+                         },
94
+                         {
95
+                             "key": "Accept-Encoding",
96
+                             "value": "gzip, deflate, br",
97
+                             "is_checked": 1,
98
+                             "field_type": "String",
99
+                             "is_system": 1
100
+                         },
101
+                         {
102
+                             "key": "User-Agent",
103
+                             "value": "PostmanRuntime-ApipostRuntime/1.1.0",
104
+                             "is_checked": 1,
105
+                             "field_type": "String",
106
+                             "is_system": 1
107
+                         },
108
+                         {
109
+                             "key": "Connection",
110
+                             "value": "keep-alive",
111
+                             "is_checked": 1,
112
+                             "field_type": "String",
113
+                             "is_system": 1
114
+                         }
115
+                     ]
116
+                 },
117
+                 "query": {
118
+                     "parameter": []
119
+                 },
120
+                 "body": {
121
+                     "parameter": []
122
+                 },
123
+                 "cookie": {
124
+                     "parameter": []
125
+                 },
126
+                 "auth": {
127
+                     "type": "noauth"
128
+                 },
129
+                 "pre_tasks": [],
130
+                 "post_tasks": []
131
+             }
132
+         },
133
+         "env": {
134
+             "env_id": "1",
135
+             "env_name": "默认环境",
136
+             "env_pre_url": "",
137
+             "env_pre_urls": {
138
+                 "1": {
139
+                     "sort": 200,
140
+                     "name": "默认服务",
141
+                     "server_id": "1",
142
+                     "server_type": 1,
143
+                     "uri": ""
144
+                 },
145
+                 "default": {
146
+                     "sort": 200,
147
+                     "name": "默认服务",
148
+                     "server_id": "1",
149
+                     "server_type": 1,
150
+                     "uri": ""
151
+                 },
152
+                 "3e3d1ae9b3a310": {
153
+                     "sort": 400,
154
+                     "name": "测试服务",
155
+                     "server_id": "3e3d1ae9b3a310",
156
+                     "server_type": -1,
157
+                     "uri": "go.apipost.cn"
158
+                 },
159
+                 "3e3d1ae9b3a311": {
160
+                     "sort": 600,
161
+                     "name": "2",
162
+                     "server_id": "3e3d1ae9b3a311",
163
+                     "server_type": -1,
164
+                     "uri": "http://httpbin.org"
165
+                 }
166
+             },
167
+             "environment": {}
168
+         },
169
+         "cookies": {
170
+             "switch": 1,
171
+             "data": [
172
+                 {
173
+                     "key": "security_session_verify",
174
+                     "value": "4560bdb4c5ddc22643bc99515ea21fcf",
175
+                     "expires": "2025-04-19T05:42:10.000Z",
176
+                     "path": "/",
177
+                     "httpOnly": true,
178
+                     "creation": "2025-04-15T21:42:10.060Z",
179
+                     "name": "security_session_verify",
180
+                     "cookie_id": "2f0cbbc78200f",
181
+                     "domain": "echo.apipost.cn",
182
+                     "project_id": "3e3d1ae973a30f"
183
+                 },
184
+                 {
185
+                     "key": "security_session_verify",
186
+                     "value": "4560bdb4c5ddc22643bc99515ea21fcf",
187
+                     "expires": "2025-04-19T04:29:32.000Z",
188
+                     "path": "/",
189
+                     "httpOnly": true,
190
+                     "creation": "2025-04-15T20:29:32.769Z",
191
+                     "name": "security_session_verify",
192
+                     "cookie_id": "2f0cbbc782010",
193
+                     "domain": "echo.apipost.cn",
194
+                     "project_id": "3e3d1ae973a30f"
195
+                 },
196
+                 {
197
+                     "key": "cookie-test1-folder",
198
+                     "value": "B",
199
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
200
+                     "maxAge": 3600,
201
+                     "domain": "echo.apipost.cn",
202
+                     "path": "/echo",
203
+                     "creation": "2025-04-15T21:42:10.060Z",
204
+                     "name": "cookie-test1-folder",
205
+                     "cookie_id": "2f0cbbc782011",
206
+                     "project_id": "3e3d1ae973a30f"
207
+                 },
208
+                 {
209
+                     "key": "cookie-test1",
210
+                     "value": "0",
211
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
212
+                     "maxAge": 3600,
213
+                     "domain": "echo.apipost.cn",
214
+                     "path": "/",
215
+                     "creation": "2025-04-15T21:42:10.060Z",
216
+                     "name": "cookie-test1",
217
+                     "cookie_id": "2f0cbbc782012",
218
+                     "project_id": "3e3d1ae973a30f"
219
+                 },
220
+                 {
221
+                     "key": "cookie-test2",
222
+                     "value": "0",
223
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
224
+                     "maxAge": 3600,
225
+                     "domain": "echo.apipost.cn",
226
+                     "path": "/",
227
+                     "creation": "2025-04-15T21:42:10.060Z",
228
+                     "name": "cookie-test2",
229
+                     "cookie_id": "2f0cbbc782013",
230
+                     "project_id": "3e3d1ae973a30f"
231
+                 },
232
+                 {
233
+                     "key": "cookie-test3",
234
+                     "value": "%25E4%25BD%25A0%25E5%25A5%25BD",
235
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
236
+                     "maxAge": 3600,
237
+                     "domain": "echo.apipost.cn",
238
+                     "path": "/",
239
+                     "creation": "2025-04-15T21:42:10.060Z",
240
+                     "name": "cookie-test3",
241
+                     "cookie_id": "2f0cbbc782014",
242
+                     "project_id": "3e3d1ae973a30f"
243
+                 },
244
+                 {
245
+                     "key": "cookie-test6",
246
+                     "value": "deleted",
247
+                     "expires": "Tue, 15 Apr 2025 21:42:10 GMT",
248
+                     "maxAge": 0,
249
+                     "domain": "echo.apipost.cn",
250
+                     "path": "/",
251
+                     "creation": "2025-04-15T21:42:10.060Z",
252
+                     "name": "cookie-test6",
253
+                     "cookie_id": "2f0cbbc782017",
254
+                     "project_id": "3e3d1ae973a30f"
255
+                 },
256
+                 {
257
+                     "key": "cookie-test7",
258
+                     "value": "0",
259
+                     "expires": "Tue, 15 Apr 2025 21:42:10 GMT",
260
+                     "maxAge": 0,
261
+                     "domain": "echo.apipost.cn",
262
+                     "path": "/",
263
+                     "creation": "2025-04-15T21:42:10.060Z",
264
+                     "name": "cookie-test7",
265
+                     "cookie_id": "2f0cbbc782018",
266
+                     "project_id": "3e3d1ae973a30f"
267
+                 },
268
+                 {
269
+                     "key": "cookie-test8",
270
+                     "value": "renge%3D%3D%3B-%2F%3F",
271
+                     "creation": "2025-04-15T21:42:10.060Z",
272
+                     "name": "cookie-test8",
273
+                     "cookie_id": "2f0cbbc782019",
274
+                     "domain": "echo.apipost.cn",
275
+                     "project_id": "3e3d1ae973a30f"
276
+                 },
277
+                 {
278
+                     "key": "httponly-cookie",
279
+                     "value": "httponly-value",
280
+                     "httpOnly": true,
281
+                     "creation": "2025-04-15T21:42:10.060Z",
282
+                     "name": "httponly-cookie",
283
+                     "cookie_id": "2f0cbbc78201a",
284
+                     "domain": "echo.apipost.cn",
285
+                     "project_id": "3e3d1ae973a30f"
286
+                 },
287
+                 {
288
+                     "key": "security_session_verify",
289
+                     "value": "4560bdb4c5ddc22643bc99515ea21fcf",
290
+                     "expires": "2025-04-19T04:29:32.000Z",
291
+                     "path": "/",
292
+                     "httpOnly": true,
293
+                     "creation": "2025-04-15T20:29:32.771Z",
294
+                     "name": "security_session_verify",
295
+                     "cookie_id": "2f0cbbc78201b",
296
+                     "domain": "echo.apipost.cn",
297
+                     "project_id": "3e3d1ae973a30f"
298
+                 },
299
+                 {
300
+                     "key": "cookie-test4",
301
+                     "value": "%E4%BD%A0%E5%A5%BD%3D%3D%3D",
302
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
303
+                     "maxAge": 3600,
304
+                     "domain": "apipost.cn",
305
+                     "path": "/",
306
+                     "creation": "2025-04-15T21:42:10.060Z",
307
+                     "name": "cookie-test4",
308
+                     "cookie_id": "2f0cbbc782015",
309
+                     "project_id": "3e3d1ae973a30f"
310
+                 },
311
+                 {
312
+                     "key": "cookie-test5",
313
+                     "value": "nihao",
314
+                     "expires": "Tue, 15 Apr 2025 22:42:10 GMT",
315
+                     "maxAge": 3600,
316
+                     "domain": "apipost.cn",
317
+                     "path": "/",
318
+                     "creation": "2025-04-15T21:42:10.060Z",
319
+                     "name": "cookie-test5",
320
+                     "cookie_id": "2f0cbbc782016",
321
+                     "project_id": "3e3d1ae973a30f"
322
+                 },
323
+                 {
324
+                     "key": "liveCookie",
325
+                     "value": "gin",
326
+                     "maxAge": 120,
327
+                     "domain": "go.apipost.cn",
328
+                     "path": "/",
329
+                     "secure": true,
330
+                     "httpOnly": true,
331
+                     "creation": "2025-04-15T21:40:44.063Z",
332
+                     "name": "liveCookie",
333
+                     "cookie_id": "3007900b9c047",
334
+                     "expires": "Tue, 15 Apr 2025 21:42:44 GMT",
335
+                     "project_id": "3e3d1ae973a30f"
336
+                 },
337
+                 {
338
+                     "key": "loseCookie",
339
+                     "value": "gin",
340
+                     "maxAge": 0,
341
+                     "domain": "go.apipost.cn",
342
+                     "path": "/",
343
+                     "secure": true,
344
+                     "httpOnly": true,
345
+                     "creation": "2025-04-15T21:40:44.063Z",
346
+                     "name": "loseCookie",
347
+                     "cookie_id": "3007900b9c048",
348
+                     "expires": "Tue, 15 Apr 2025 21:40:44 GMT",
349
+                     "project_id": "3e3d1ae973a30f"
350
+                 }
351
+             ]
352
+         },
353
+         "system_configs": {
354
+             "send_timeout": 0,
355
+             "auto_redirect": -1,
356
+             "max_redirect_time": 5,
357
+             "auto_gen_mock_url": 1,
358
+             "request_param_auto_json": -1,
359
+             "proxy": {
360
+                 "type": 2,
361
+                 "envfirst": 1,
362
+                 "bypass": [],
363
+                 "protocols": [
364
+                     "http"
365
+                 ],
366
+                 "auth": {
367
+                     "authenticate": -1,
368
+                     "host": "",
369
+                     "username": "",
370
+                     "password": ""
371
+                 }
372
+             },
373
+             "ca_cert": {
374
+                 "open": 1,
375
+                 "path": "",
376
+                 "base64": ""
377
+             },
378
+             "client_cert": {}
379
+         },
380
+         "custom_functions": {},
381
+         "collection": [
382
+             {
383
+                 "target_id": "3e3d1ae9b3a328",
384
+                 "target_type": "api",
385
+                 "parent_id": "0",
386
+                 "name": "body-binary发送接口测试",
387
+                 "request": {
388
+                     "auth": {
389
+                         "type": "noauth"
390
+                     },
391
+                     "header": {
392
+                         "parameter": []
393
+                     },
394
+                     "query": {
395
+                         "query_add_equal": 1,
396
+                         "parameter": []
397
+                     },
398
+                     "restful": {
399
+                         "parameter": []
400
+                     },
401
+                     "cookie": {
402
+                         "cookie_encode": 1,
403
+                         "parameter": []
404
+                     },
405
+                     "body": {
406
+                         "mode": "binary",
407
+                         "parameter": [],
408
+                         "binary": {
409
+                             "data_url": "",
410
+                             "file_name": "PHP脚本.csv"
411
+                         },
412
+                         "raw": "",
413
+                         "raw_parameter": [],
414
+                         "raw_schema": {
415
+                             "type": "object"
416
+                         }
417
+                     },
418
+                     "pre_tasks": [],
419
+                     "post_tasks": []
420
+                 },
421
+                 "parents": [],
422
+                 "method": "POST",
423
+                 "protocol": "http/1.1",
424
+                 "url": "https://echo.apipost.cn/get.php",
425
+                 "pre_url": ""
426
+             },
427
+             {
428
+                 "target_id": "3e3d1ae9b3a329",
429
+                 "target_type": "api",
430
+                 "parent_id": "0",
431
+                 "name": "body-raw发送接口测试",
432
+                 "request": {
433
+                     "auth": {
434
+                         "type": "noauth"
435
+                     },
436
+                     "header": {
437
+                         "parameter": []
438
+                     },
439
+                     "query": {
440
+                         "query_add_equal": 1,
441
+                         "parameter": []
442
+                     },
443
+                     "restful": {
444
+                         "parameter": []
445
+                     },
446
+                     "cookie": {
447
+                         "cookie_encode": 1,
448
+                         "parameter": []
449
+                     },
450
+                     "body": {
451
+                         "mode": "json",
452
+                         "parameter": [],
453
+                         "binary": {},
454
+                         "raw": "{\r\n\t\"222\": \"中文\"\r\n}",
455
+                         "raw_parameter": [],
456
+                         "raw_schema": {
457
+                             "type": "object"
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": "3e3d1ae9b3a32a",
471
+                 "target_type": "api",
472
+                 "parent_id": "0",
473
+                 "name": "body-raw可视化编辑生成的数据发送接口测试",
474
+                 "request": {
475
+                     "auth": {
476
+                         "type": "noauth"
477
+                     },
478
+                     "header": {
479
+                         "parameter": []
480
+                     },
481
+                     "query": {
482
+                         "query_add_equal": 1,
483
+                         "parameter": []
484
+                     },
485
+                     "restful": {
486
+                         "parameter": []
487
+                     },
488
+                     "cookie": {
489
+                         "cookie_encode": 1,
490
+                         "parameter": []
491
+                     },
492
+                     "body": {
493
+                         "mode": "json",
494
+                         "parameter": [],
495
+                         "binary": {},
496
+                         "raw": "{\n\t\"111\": \"16687940807\",\n\t\"222\": \"49\",\n\t\"333\": \"62\"\n}",
497
+                         "raw_parameter": [],
498
+                         "raw_schema": {
499
+                             "type": "object",
500
+                             "required": [],
501
+                             "properties": {
502
+                                 "111": {
503
+                                     "mock": {
504
+                                         "mock": "@telephone()"
505
+                                     },
506
+                                     "type": "string"
507
+                                 },
508
+                                 "222": {
509
+                                     "mock": {
510
+                                         "mock": "@natural(1,100)"
511
+                                     },
512
+                                     "type": "string"
513
+                                 },
514
+                                 "333": {
515
+                                     "mock": {
516
+                                         "mock": "@integer(1,100)"
517
+                                     },
518
+                                     "type": "string"
519
+                                 }
520
+                             },
521
+                             "APIPOST_ORDERS": [
522
+                                 "111",
523
+                                 "222",
524
+                                 "333"
525
+                             ]
526
+                         }
527
+                     },
528
+                     "pre_tasks": [],
529
+                     "post_tasks": []
530
+                 },
531
+                 "parents": [],
532
+                 "method": "POST",
533
+                 "protocol": "http/1.1",
534
+                 "url": "http://cc.apipost.cc:6002/post",
535
+                 "pre_url": ""
536
+             },
537
+             {
538
+                 "target_id": "3e3d1ae9b3a31f",
539
+                 "target_type": "api",
540
+                 "parent_id": "0",
541
+                 "name": "全局body参数",
542
+                 "request": {
543
+                     "auth": {
544
+                         "type": "noauth"
545
+                     },
546
+                     "header": {
547
+                         "parameter": []
548
+                     },
549
+                     "query": {
550
+                         "query_add_equal": 1,
551
+                         "parameter": [
552
+                             {
553
+                                 "param_id": "3e3d1aea33a388",
554
+                                 "key": "body",
555
+                                 "value": "{{body}}",
556
+                                 "field_type": "String",
557
+                                 "not_null": 1,
558
+                                 "description": "",
559
+                                 "is_checked": 1,
560
+                                 "content_type": "String"
561
+                             }
562
+                         ]
563
+                     },
564
+                     "restful": {
565
+                         "parameter": []
566
+                     },
567
+                     "cookie": {
568
+                         "cookie_encode": 1,
569
+                         "parameter": []
570
+                     },
571
+                     "body": {
572
+                         "mode": "form-data",
573
+                         "parameter": [
574
+                             {
575
+                                 "param_id": "3e3d1aea33a389",
576
+                                 "key": "body",
577
+                                 "value": "{{body}}",
578
+                                 "field_type": "String",
579
+                                 "not_null": 1,
580
+                                 "description": "",
581
+                                 "is_checked": 1,
582
+                                 "content_type": "String"
583
+                             }
584
+                         ],
585
+                         "binary": {},
586
+                         "raw": "",
587
+                         "raw_parameter": [],
588
+                         "raw_schema": {
589
+                             "type": "object"
590
+                         }
591
+                     },
592
+                     "pre_tasks": [],
593
+                     "post_tasks": []
594
+                 },
595
+                 "parents": [],
596
+                 "method": "POST",
597
+                 "protocol": "http/1.1",
598
+                 "url": "go.apipost.cn?body={{body}}",
599
+                 "pre_url": ""
600
+             }
601
+         ],
602
+         "database_configs": {},
603
+         "name": "测试循环控制器",
604
+         "ignore_error": -1,
605
+         "enable_sandbox": -1,
606
+         "iterationCount": 1,
607
+         "sleep": 0,
608
+         "testing_id": "2de69bbf82149",
609
+         "iterates_data_id": "2deb6b1b8214c",
610
+         "iterationData": [
611
+             {
612
+                 "name": "小明",
613
+                 "password": "123"
614
+             },
615
+             {
616
+                 "name": "小奥",
617
+                 "password": "456"
618
+             },
619
+             {
620
+                 "name": "小张",
621
+                 "password": "789"
622
+             },
623
+             {
624
+                 "name": "小李",
625
+                 "password": "999"
626
+             }
627
+         ]
628
+     },
629
+     "test_events": [
630
+         {
631
+             "data": {
632
+                 "name": "循环-完成所有测试数据的迭代",
633
+                 "sleep": 5,
634
+                 "loop_type": 1,
635
+                 "enable_data": 1,
636
+                 "loop_timeout": 0,
637
+                 "loop_data_type": 1,
638
+                 "loop_traverse_data": {
639
+                     "name": "",
640
+                     "type": 1,
641
+                     "iterationData": [
642
+                         {
643
+                             "name": "小明",
644
+                             "password": "123"
645
+                         },
646
+                         {
647
+                             "name": "小奥",
648
+                             "password": "456"
649
+                         },
650
+                         {
651
+                             "name": "小张",
652
+                             "password": "789"
653
+                         },
654
+                         {
655
+                             "name": "小李",
656
+                             "password": "999"
657
+                         }
658
+                     ]
659
+                 },
660
+                 "loop_iteration_data": "2deb6b1b8214c"
661
+             },
662
+             "sort": 0,
663
+             "type": "loop",
664
+             "enabled": -1,
665
+             "test_id": "2de69bbf82149",
666
+             "event_id": "2ded38b782156",
667
+             "project_id": "3e3d1ae973a30f",
668
+             "parent_event_id": "0",
669
+             "children": [
670
+                 {
671
+                     "type": "api",
672
+                     "auto_sync": false,
673
+                     "test_id": "2de69bbf82149",
674
+                     "event_id": "2ded9e0b82159",
675
+                     "enabled": 1,
676
+                     "data": {
677
+                         "target_id": "3e3d1ae9b3a328",
678
+                         "project_id": "3e3d1ae973a30f",
679
+                         "parent_id": "0",
680
+                         "target_type": "api",
681
+                         "apiData": {
682
+                             "name": "body-binary发送接口测试",
683
+                             "method": "POST",
684
+                             "protocol": "http/1.1",
685
+                             "url": "https://echo.apipost.cn/get.php",
686
+                             "request": {
687
+                                 "auth": {
688
+                                     "type": "noauth"
689
+                                 },
690
+                                 "body": {
691
+                                     "raw": "",
692
+                                     "mode": "binary",
693
+                                     "binary": {
694
+                                         "data_url": "",
695
+                                         "file_name": "PHP脚本.csv"
696
+                                     },
697
+                                     "parameter": [],
698
+                                     "raw_schema": {
699
+                                         "type": "object"
700
+                                     },
701
+                                     "raw_parameter": []
702
+                                 },
703
+                                 "query": {
704
+                                     "parameter": [],
705
+                                     "query_add_equal": 1
706
+                                 },
707
+                                 "cookie": {
708
+                                     "parameter": [],
709
+                                     "cookie_encode": 1
710
+                                 },
711
+                                 "header": {
712
+                                     "parameter": []
713
+                                 },
714
+                                 "restful": {
715
+                                     "parameter": []
716
+                                 },
717
+                                 "pre_tasks": [],
718
+                                 "post_tasks": []
719
+                             }
720
+                         }
721
+                     }
722
+                 },
723
+                 {
724
+                     "type": "api",
725
+                     "auto_sync": false,
726
+                     "test_id": "2de69bbf82149",
727
+                     "event_id": "2dee042b8215c",
728
+                     "enabled": 1,
729
+                     "data": {
730
+                         "target_id": "3e3d1ae9b3a329",
731
+                         "project_id": "3e3d1ae973a30f",
732
+                         "parent_id": "0",
733
+                         "target_type": "api",
734
+                         "apiData": {
735
+                             "name": "body-raw发送接口测试",
736
+                             "method": "POST",
737
+                             "protocol": "http/1.1",
738
+                             "url": "http://cc.apipost.cc:6002/post",
739
+                             "request": {
740
+                                 "auth": {
741
+                                     "type": "noauth"
742
+                                 },
743
+                                 "body": {
744
+                                     "raw": "{\r\n\t\"222\": \"中文\"\r\n}",
745
+                                     "mode": "json",
746
+                                     "binary": {},
747
+                                     "parameter": [],
748
+                                     "raw_schema": {
749
+                                         "type": "object"
750
+                                     },
751
+                                     "raw_parameter": []
752
+                                 },
753
+                                 "query": {
754
+                                     "parameter": [],
755
+                                     "query_add_equal": 1
756
+                                 },
757
+                                 "cookie": {
758
+                                     "parameter": [],
759
+                                     "cookie_encode": 1
760
+                                 },
761
+                                 "header": {
762
+                                     "parameter": []
763
+                                 },
764
+                                 "restful": {
765
+                                     "parameter": []
766
+                                 },
767
+                                 "pre_tasks": [],
768
+                                 "post_tasks": []
769
+                             }
770
+                         }
771
+                     }
772
+                 }
773
+             ]
774
+         },
775
+         {
776
+             "data": {
777
+                 "name": "循环-3次固定次数循环",
778
+                 "limit": 3,
779
+                 "sleep": 0,
780
+                 "loop_type": 2,
781
+                 "loop_timeout": 0,
782
+                 "loop_traverse_data": {
783
+                     "name": "",
784
+                     "type": 1,
785
+                     "iterationData": []
786
+                 }
787
+             },
788
+             "sort": 3,
789
+             "type": "loop",
790
+             "enabled": -1,
791
+             "test_id": "2de69bbf82149",
792
+             "event_id": "2df3cae38215e",
793
+             "project_id": "3e3d1ae973a30f",
794
+             "parent_event_id": "0",
795
+             "children": [
796
+                 {
797
+                     "type": "api",
798
+                     "auto_sync": false,
799
+                     "test_id": "2de69bbf82149",
800
+                     "event_id": "2df45d5382161",
801
+                     "enabled": 1,
802
+                     "data": {
803
+                         "target_id": "3e3d1ae9b3a32a",
804
+                         "project_id": "3e3d1ae973a30f",
805
+                         "parent_id": "0",
806
+                         "target_type": "api",
807
+                         "apiData": {
808
+                             "name": "body-raw可视化编辑生成的数据发送接口测试",
809
+                             "method": "POST",
810
+                             "protocol": "http/1.1",
811
+                             "url": "http://cc.apipost.cc:6002/post",
812
+                             "request": {
813
+                                 "auth": {
814
+                                     "type": "noauth"
815
+                                 },
816
+                                 "body": {
817
+                                     "raw": "{\n\t\"111\": \"16687940807\",\n\t\"222\": \"49\",\n\t\"333\": \"62\"\n}",
818
+                                     "mode": "json",
819
+                                     "binary": {},
820
+                                     "parameter": [],
821
+                                     "raw_schema": {
822
+                                         "type": "object",
823
+                                         "required": [],
824
+                                         "properties": {
825
+                                             "111": {
826
+                                                 "mock": {
827
+                                                     "mock": "@telephone()"
828
+                                                 },
829
+                                                 "type": "string"
830
+                                             },
831
+                                             "222": {
832
+                                                 "mock": {
833
+                                                     "mock": "@natural(1,100)"
834
+                                                 },
835
+                                                 "type": "string"
836
+                                             },
837
+                                             "333": {
838
+                                                 "mock": {
839
+                                                     "mock": "@integer(1,100)"
840
+                                                 },
841
+                                                 "type": "string"
842
+                                             }
843
+                                         },
844
+                                         "APIPOST_ORDERS": [
845
+                                             "111",
846
+                                             "222",
847
+                                             "333"
848
+                                         ]
849
+                                     },
850
+                                     "raw_parameter": []
851
+                                 },
852
+                                 "query": {
853
+                                     "parameter": [],
854
+                                     "query_add_equal": 1
855
+                                 },
856
+                                 "cookie": {
857
+                                     "parameter": [],
858
+                                     "cookie_encode": 1
859
+                                 },
860
+                                 "header": {
861
+                                     "parameter": []
862
+                                 },
863
+                                 "restful": {
864
+                                     "parameter": []
865
+                                 },
866
+                                 "pre_tasks": [],
867
+                                 "post_tasks": []
868
+                             }
869
+                         }
870
+                     }
871
+                 }
872
+             ]
873
+         },
874
+         {
875
+             "data": {
876
+                 "name": "满足条件时退出循环",
877
+                 "sleep": 0,
878
+                 "loop_type": 3,
879
+                 "loop_timeout": 0,
880
+                 "loop_condition": {
881
+                     "var": "{{IF_xunhuan}}",
882
+                     "value": "跳出循环2",
883
+                     "compare": "eq"
884
+                 },
885
+                 "loop_traverse_data": {
886
+                     "name": "",
887
+                     "type": 1,
888
+                     "iterationData": []
889
+                 }
890
+             },
891
+             "sort": 5,
892
+             "type": "loop",
893
+             "enabled": 1,
894
+             "test_id": "2de69bbf82149",
895
+             "event_id": "2dfedc1382163",
896
+             "project_id": "3e3d1ae973a30f",
897
+             "parent_event_id": "0",
898
+             "children": [
899
+                 {
900
+                     "type": "api",
901
+                     "auto_sync": false,
902
+                     "test_id": "2de69bbf82149",
903
+                     "event_id": "2dff808382166",
904
+                     "enabled": 1,
905
+                     "data": {
906
+                         "target_id": "3e3d1ae9b3a31f",
907
+                         "project_id": "3e3d1ae973a30f",
908
+                         "parent_id": "0",
909
+                         "target_type": "api",
910
+                         "apiData": {
911
+                             "name": "全局body参数",
912
+                             "method": "POST",
913
+                             "protocol": "http/1.1",
914
+                             "url": "go.apipost.cn?body={{body}}",
915
+                             "request": {
916
+                                 "auth": {
917
+                                     "type": "noauth"
918
+                                 },
919
+                                 "body": {
920
+                                     "raw": "",
921
+                                     "mode": "form-data",
922
+                                     "binary": {},
923
+                                     "parameter": [
924
+                                         {
925
+                                             "key": "body",
926
+                                             "value": "{{body}}",
927
+                                             "not_null": 1,
928
+                                             "param_id": "3e3d1aea33a389",
929
+                                             "field_type": "String",
930
+                                             "is_checked": 1,
931
+                                             "description": "",
932
+                                             "content_type": "String"
933
+                                         }
934
+                                     ],
935
+                                     "raw_schema": {
936
+                                         "type": "object"
937
+                                     },
938
+                                     "raw_parameter": []
939
+                                 },
940
+                                 "query": {
941
+                                     "parameter": [
942
+                                         {
943
+                                             "key": "body",
944
+                                             "value": "{{body}}",
945
+                                             "not_null": 1,
946
+                                             "param_id": "3e3d1aea33a388",
947
+                                             "field_type": "String",
948
+                                             "is_checked": 1,
949
+                                             "description": "",
950
+                                             "content_type": "String"
951
+                                         }
952
+                                     ],
953
+                                     "query_add_equal": 1
954
+                                 },
955
+                                 "cookie": {
956
+                                     "parameter": [],
957
+                                     "cookie_encode": 1
958
+                                 },
959
+                                 "header": {
960
+                                     "parameter": []
961
+                                 },
962
+                                 "restful": {
963
+                                     "parameter": []
964
+                                 },
965
+                                 "pre_tasks": [],
966
+                                 "post_tasks": [
967
+                                     {
968
+                                         "id": "2e0170fb82174",
969
+                                         "data": "apt.globals.set(\"IF_xunhuan\", \"跳出循环2\");",
970
+                                         "name": "自定义脚本",
971
+                                         "type": "customScript",
972
+                                         "enabled": 1
973
+                                     }
974
+                                 ]
975
+                             }
976
+                         }
977
+                     }
978
+                 }
979
+             ]
980
+         }
981
+     ]
982
+ }
983
+