runner-runtime 1.0.76 → 1.0.78
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 +44 -34
- package/package.json +5 -3
- package/tmp/request.js +392 -138
package/events/api.js
CHANGED
|
@@ -2282,43 +2282,51 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2282
2282
|
}
|
|
2283
2283
|
},
|
|
2284
2284
|
|
|
2285
|
-
|
|
2286
|
-
if (
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
_.set(eventRuntimeData, [event?.event_id, "exception", 'prerequest'], String(err));
|
|
2293
|
-
_.set(eventRuntimeData, [event?.event_id, 'error'], {
|
|
2294
|
-
error_type: 'prerequest',
|
|
2295
|
-
message: String(err)
|
|
2296
|
-
})
|
|
2297
|
-
|
|
2298
|
-
if (_.isUndefined(_.get(eventRuntimeData, [event?.event_id, "console"]))) {
|
|
2299
|
-
_.set(eventRuntimeData, [event?.event_id, "console"], []);
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
|
-
const time = Date.now()
|
|
2303
|
-
eventRuntimeData[event?.event_id].console.push(
|
|
2304
|
-
{
|
|
2305
|
-
time,
|
|
2306
|
-
"level": "error",
|
|
2307
|
-
"args": [String(err?.message)]
|
|
2308
|
-
}
|
|
2309
|
-
)
|
|
2310
|
-
}
|
|
2285
|
+
responseStart: (err, cursor, response, request, item, cookies, history) => {
|
|
2286
|
+
if (_.includes(['get_parsed_request'], scene)) {
|
|
2287
|
+
callback(generateHarFromRequest(request));
|
|
2288
|
+
try {
|
|
2289
|
+
run.abort();
|
|
2290
|
+
} catch (e) { }
|
|
2291
|
+
resolve();
|
|
2311
2292
|
}
|
|
2293
|
+
},
|
|
2312
2294
|
|
|
2313
|
-
|
|
2314
|
-
_.set(eventRuntimeData, [event?.event_id, "request"], requestOptions);
|
|
2315
|
-
|
|
2295
|
+
response: async (err, cursor, response, request, item, cookies, history) => {
|
|
2316
2296
|
if (_.includes(['get_parsed_request'], scene)) {
|
|
2317
2297
|
callback(generateHarFromRequest(request));
|
|
2318
2298
|
try {
|
|
2319
2299
|
run.abort();
|
|
2320
2300
|
} catch (e) { }
|
|
2321
2301
|
resolve();
|
|
2302
|
+
} else {
|
|
2303
|
+
if (!err) {
|
|
2304
|
+
_.set(eventRuntimeData, [event?.event_id, "response"], await convert2EchoResponse(response, history));
|
|
2305
|
+
} else {
|
|
2306
|
+
if (!_.includes(['script', 'sql', 'assert_visual', 'assert'], event?.type)) {
|
|
2307
|
+
_.set(eventRuntimeData, [event?.event_id, "exception", 'prerequest'], String(err));
|
|
2308
|
+
_.set(eventRuntimeData, [event?.event_id, 'error'], {
|
|
2309
|
+
error_type: 'prerequest',
|
|
2310
|
+
message: String(err)
|
|
2311
|
+
})
|
|
2312
|
+
|
|
2313
|
+
if (_.isUndefined(_.get(eventRuntimeData, [event?.event_id, "console"]))) {
|
|
2314
|
+
_.set(eventRuntimeData, [event?.event_id, "console"], []);
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
const time = Date.now()
|
|
2318
|
+
eventRuntimeData[event?.event_id].console.push(
|
|
2319
|
+
{
|
|
2320
|
+
time,
|
|
2321
|
+
"level": "error",
|
|
2322
|
+
"args": [String(err?.message)]
|
|
2323
|
+
}
|
|
2324
|
+
)
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
const requestOptions = convert2EchoRequest(request, requestJson, postmanJSON, history);
|
|
2329
|
+
_.set(eventRuntimeData, [event?.event_id, "request"], requestOptions);
|
|
2322
2330
|
}
|
|
2323
2331
|
},
|
|
2324
2332
|
|
|
@@ -2412,11 +2420,13 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2412
2420
|
},
|
|
2413
2421
|
|
|
2414
2422
|
item(err, cursor, item, visualizer, result) {
|
|
2415
|
-
if (!
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2423
|
+
if (!_.includes(['get_parsed_request'], scene)) {
|
|
2424
|
+
if (!err && _.isObject(visualizer)) {
|
|
2425
|
+
const { error, processedTemplate } = visualizer;
|
|
2426
|
+
_.set(eventRuntimeData[event?.event_id], "visualizer", { error, processed_template: processedTemplate });
|
|
2427
|
+
} else {
|
|
2428
|
+
_.set(eventRuntimeData[event?.event_id], "visualizer", { error: null, processed_template: "" });
|
|
2429
|
+
}
|
|
2420
2430
|
}
|
|
2421
2431
|
},
|
|
2422
2432
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runner-runtime",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"description": "runner-runtime.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
"url": "https://github.com/Apipost-Team/runner-runtime/issues"
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/Apipost-Team/runner-runtime#readme",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"database-query": "^1.1.12"
|
|
24
|
+
},
|
|
22
25
|
"dependencies": {
|
|
23
26
|
"@apipost/url-join": "^1.0.1",
|
|
24
27
|
"apipost-tools": "^0.0.38",
|
|
25
28
|
"atomic-sleep": "^1.0.0",
|
|
26
29
|
"content-disposition": "^0.5.4",
|
|
27
|
-
"database-query": "^1.1.12",
|
|
28
30
|
"file-type": "^16.5.4",
|
|
29
31
|
"is-image": "^3.0.0",
|
|
30
32
|
"is-svg": "^4.3.2",
|
|
@@ -48,4 +50,4 @@
|
|
|
48
50
|
"uuid": "^9.0.1",
|
|
49
51
|
"validator": "^13.15.0"
|
|
50
52
|
}
|
|
51
|
-
}
|
|
53
|
+
}
|
package/tmp/request.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"option": {
|
|
3
3
|
"scene": "http_request",
|
|
4
|
-
"globals": {
|
|
5
|
-
"variable_key": "variable_value"
|
|
6
|
-
},
|
|
4
|
+
"globals": {},
|
|
7
5
|
"project": {
|
|
8
6
|
"request": {
|
|
9
7
|
"header": {
|
|
@@ -71,103 +69,20 @@ module.exports = {
|
|
|
71
69
|
"sort": 1000,
|
|
72
70
|
"uri": ""
|
|
73
71
|
},
|
|
74
|
-
"
|
|
75
|
-
"server_id": "
|
|
76
|
-
"name": "
|
|
72
|
+
"468cc640dc01000": {
|
|
73
|
+
"server_id": "468cc640dc01000",
|
|
74
|
+
"name": "aaa1",
|
|
77
75
|
"sort": 2000,
|
|
78
|
-
"uri": "
|
|
76
|
+
"uri": "111"
|
|
79
77
|
}
|
|
80
78
|
},
|
|
81
|
-
"environment": {
|
|
79
|
+
"environment": {
|
|
80
|
+
"123": ""
|
|
81
|
+
}
|
|
82
82
|
},
|
|
83
83
|
"cookies": {
|
|
84
84
|
"switch": 1,
|
|
85
|
-
"data": [
|
|
86
|
-
{
|
|
87
|
-
"key": "liveCookie",
|
|
88
|
-
"value": "gin",
|
|
89
|
-
"maxAge": 120,
|
|
90
|
-
"domain": "go.apipost.cn",
|
|
91
|
-
"path": "/",
|
|
92
|
-
"secure": true,
|
|
93
|
-
"httpOnly": true,
|
|
94
|
-
"creation": "2025-05-15T10:38:57.212Z",
|
|
95
|
-
"name": "liveCookie",
|
|
96
|
-
"cookie_id": "275fc00b7ae05a",
|
|
97
|
-
"expires": "Thu, 15 May 2025 10:41:01 GMT",
|
|
98
|
-
"project_id": "4660e6894001000"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"key": "loseCookie",
|
|
102
|
-
"value": "gin",
|
|
103
|
-
"maxAge": 0,
|
|
104
|
-
"domain": "go.apipost.cn",
|
|
105
|
-
"path": "/",
|
|
106
|
-
"secure": true,
|
|
107
|
-
"httpOnly": true,
|
|
108
|
-
"creation": "2025-05-15T10:38:57.212Z",
|
|
109
|
-
"name": "loseCookie",
|
|
110
|
-
"cookie_id": "275fc00b7ae05b",
|
|
111
|
-
"expires": "Thu, 15 May 2025 10:39:01 GMT",
|
|
112
|
-
"project_id": "4660e6894001000"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"key": "HWWAFSESID",
|
|
116
|
-
"value": "58238825d84d632420",
|
|
117
|
-
"path": "/",
|
|
118
|
-
"creation": "2025-05-14T03:49:53.061Z",
|
|
119
|
-
"name": "HWWAFSESID",
|
|
120
|
-
"cookie_id": "2762194efae080",
|
|
121
|
-
"domain": "api.deepseek.com",
|
|
122
|
-
"project_id": "4660e6894001000"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"key": "HWWAFSESTIME",
|
|
126
|
-
"value": "1747194592164",
|
|
127
|
-
"path": "/",
|
|
128
|
-
"creation": "2025-05-14T03:49:53.061Z",
|
|
129
|
-
"name": "HWWAFSESTIME",
|
|
130
|
-
"cookie_id": "2762194efae081",
|
|
131
|
-
"domain": "api.deepseek.com",
|
|
132
|
-
"project_id": "4660e6894001000"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"key": "security_session_verify",
|
|
136
|
-
"value": "50b7079424eebfb269f14efdd7081939",
|
|
137
|
-
"expires": "2025-05-18T18:29:27.000Z",
|
|
138
|
-
"path": "/",
|
|
139
|
-
"httpOnly": true,
|
|
140
|
-
"creation": "2025-05-15T10:29:28.804Z",
|
|
141
|
-
"name": "security_session_verify",
|
|
142
|
-
"cookie_id": "290728687aef2d",
|
|
143
|
-
"domain": "echo.apipost.cn",
|
|
144
|
-
"project_id": "4660e6894001000"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"key": "security_session_verify",
|
|
148
|
-
"value": "50b7079424eebfb269f14efdd7081939",
|
|
149
|
-
"expires": "2025-05-18T18:29:27.000Z",
|
|
150
|
-
"path": "/",
|
|
151
|
-
"httpOnly": true,
|
|
152
|
-
"creation": "2025-05-15T10:29:28.805Z",
|
|
153
|
-
"name": "security_session_verify",
|
|
154
|
-
"cookie_id": "29072868baef2e",
|
|
155
|
-
"domain": "echo.apipost.cn",
|
|
156
|
-
"project_id": "4660e6894001000"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"key": "security_session_verify",
|
|
160
|
-
"value": "50b7079424eebfb269f14efdd7081939",
|
|
161
|
-
"expires": "2025-05-18T18:29:27.000Z",
|
|
162
|
-
"path": "/",
|
|
163
|
-
"httpOnly": true,
|
|
164
|
-
"creation": "2025-05-15T10:29:28.805Z",
|
|
165
|
-
"name": "security_session_verify",
|
|
166
|
-
"cookie_id": "29072868baef2f",
|
|
167
|
-
"domain": "echo.apipost.cn",
|
|
168
|
-
"project_id": "4660e6894001000"
|
|
169
|
-
}
|
|
170
|
-
]
|
|
85
|
+
"data": []
|
|
171
86
|
},
|
|
172
87
|
"system_configs": {
|
|
173
88
|
"send_timeout": 0,
|
|
@@ -176,7 +91,7 @@ module.exports = {
|
|
|
176
91
|
"auto_gen_mock_url": 1,
|
|
177
92
|
"request_param_auto_json": -1,
|
|
178
93
|
"proxy": {
|
|
179
|
-
"type":
|
|
94
|
+
"type": -1,
|
|
180
95
|
"envfirst": 1,
|
|
181
96
|
"bypass": [],
|
|
182
97
|
"protocols": [
|
|
@@ -191,60 +106,394 @@ module.exports = {
|
|
|
191
106
|
},
|
|
192
107
|
"ca_cert": {
|
|
193
108
|
"open": -1,
|
|
194
|
-
"path": ""
|
|
195
|
-
"base64": ""
|
|
109
|
+
"path": ""
|
|
196
110
|
},
|
|
197
|
-
"client_cert": {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
111
|
+
"client_cert": {}
|
|
112
|
+
},
|
|
113
|
+
"custom_functions": {
|
|
114
|
+
"fn_add": "\n//返回函数处理后的text,text为函数的入参\n\nreturn text % 2 === 0;\n"
|
|
115
|
+
},
|
|
116
|
+
"collection": [
|
|
117
|
+
{
|
|
118
|
+
"target_id": "469ef86c4401000",
|
|
119
|
+
"target_type": "sample",
|
|
120
|
+
"parent_id": "250e0b1af57024",
|
|
121
|
+
"name": "测试数据",
|
|
122
|
+
"request": {
|
|
123
|
+
"auth": {
|
|
124
|
+
"type": "inherit"
|
|
203
125
|
},
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
126
|
+
"body": {
|
|
127
|
+
"raw": "{\"zxc\": \"ut ipsum\", \"zzzz\": \"2025-05-15T07:20:17.657Z\"}",
|
|
128
|
+
"mode": "json",
|
|
129
|
+
"binary": null,
|
|
130
|
+
"parameter": [],
|
|
131
|
+
"raw_schema": {},
|
|
132
|
+
"raw_parameter": []
|
|
208
133
|
},
|
|
209
|
-
"
|
|
210
|
-
|
|
211
|
-
"
|
|
212
|
-
"file_name": "",
|
|
213
|
-
"file_url": ""
|
|
134
|
+
"query": {
|
|
135
|
+
"parameter": [],
|
|
136
|
+
"query_add_equal": 1
|
|
214
137
|
},
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
138
|
+
"cookie": {
|
|
139
|
+
"parameter": [],
|
|
140
|
+
"cookie_encode": 1
|
|
141
|
+
},
|
|
142
|
+
"header": {
|
|
143
|
+
"parameter": [
|
|
144
|
+
{
|
|
145
|
+
"key": "Content-Length",
|
|
146
|
+
"value": "59",
|
|
147
|
+
"schema": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"not_null": 1,
|
|
151
|
+
"param_id": "469ef86c4401000",
|
|
152
|
+
"field_type": "string",
|
|
153
|
+
"is_checked": 1,
|
|
154
|
+
"description": ""
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"key": "Accept-Encoding",
|
|
158
|
+
"value": "gzip, deflate, br",
|
|
159
|
+
"schema": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"not_null": 1,
|
|
163
|
+
"param_id": "469ef86c4401001",
|
|
164
|
+
"field_type": "string",
|
|
165
|
+
"is_checked": 1,
|
|
166
|
+
"description": ""
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"key": "Host",
|
|
170
|
+
"value": "cc.apipost.cc:6002",
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"not_null": 1,
|
|
175
|
+
"param_id": "469ef86c4401002",
|
|
176
|
+
"field_type": "string",
|
|
177
|
+
"is_checked": 1,
|
|
178
|
+
"description": ""
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"key": "Accept",
|
|
182
|
+
"value": "*/*",
|
|
183
|
+
"schema": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"not_null": 1,
|
|
187
|
+
"param_id": "469ef86c4401003",
|
|
188
|
+
"field_type": "string",
|
|
189
|
+
"is_checked": 1,
|
|
190
|
+
"description": ""
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"key": "Connection",
|
|
194
|
+
"value": "keep-alive",
|
|
195
|
+
"schema": {
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"not_null": 1,
|
|
199
|
+
"param_id": "469ef86c4401004",
|
|
200
|
+
"field_type": "string",
|
|
201
|
+
"is_checked": 1,
|
|
202
|
+
"description": ""
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"key": "User-Agent",
|
|
206
|
+
"value": "PostmanRuntime-ApipostRuntime/1.1.0",
|
|
207
|
+
"schema": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"not_null": 1,
|
|
211
|
+
"param_id": "469ef86c4401005",
|
|
212
|
+
"field_type": "string",
|
|
213
|
+
"is_checked": 1,
|
|
214
|
+
"description": ""
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"key": "Content-Type",
|
|
218
|
+
"value": "application/json",
|
|
219
|
+
"schema": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"not_null": 1,
|
|
223
|
+
"param_id": "469ef86c4401006",
|
|
224
|
+
"field_type": "string",
|
|
225
|
+
"is_checked": 1,
|
|
226
|
+
"description": ""
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"key": "Cache-Control",
|
|
230
|
+
"value": "no-cache",
|
|
231
|
+
"schema": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"not_null": 1,
|
|
235
|
+
"param_id": "469ef86c4401007",
|
|
236
|
+
"field_type": "string",
|
|
237
|
+
"is_checked": 1,
|
|
238
|
+
"description": ""
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"restful": {
|
|
243
|
+
"parameter": []
|
|
244
|
+
},
|
|
245
|
+
"pre_tasks": [],
|
|
246
|
+
"post_tasks": []
|
|
247
|
+
},
|
|
248
|
+
"parents": [
|
|
249
|
+
{
|
|
250
|
+
"target_id": "250e0b1af57024",
|
|
251
|
+
"target_type": "api"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"target_id": "28cb255375729d",
|
|
255
|
+
"target_type": "folder"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"method": "POST",
|
|
259
|
+
"protocol": "http/1.1",
|
|
260
|
+
"url": "http://cc.apipost.cc:6002/post",
|
|
261
|
+
"pre_url": ""
|
|
262
|
+
},
|
|
221
263
|
{
|
|
222
|
-
"target_id": "
|
|
223
|
-
"target_type": "
|
|
264
|
+
"target_id": "28cb255375729d",
|
|
265
|
+
"target_type": "folder",
|
|
224
266
|
"parent_id": "0",
|
|
225
|
-
"name": "
|
|
267
|
+
"name": "测试目录",
|
|
268
|
+
"request": {
|
|
269
|
+
"auth": {
|
|
270
|
+
"type": "inherit"
|
|
271
|
+
},
|
|
272
|
+
"pre_tasks": [
|
|
273
|
+
{
|
|
274
|
+
"type": "customScript",
|
|
275
|
+
"enabled": 1,
|
|
276
|
+
"data": "apt.environment.getName();",
|
|
277
|
+
"name": "自定义脚本",
|
|
278
|
+
"id": "29283d3435793e"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"post_tasks": [
|
|
282
|
+
{
|
|
283
|
+
"type": "customScript",
|
|
284
|
+
"enabled": 1,
|
|
285
|
+
"data": "apt.test(\"响应码为 200\", function () {\n apt.response.to.have.status(200);\n });",
|
|
286
|
+
"name": "自定义脚本",
|
|
287
|
+
"id": "2928468df5793f"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"body": {
|
|
291
|
+
"parameter": []
|
|
292
|
+
},
|
|
293
|
+
"header": {
|
|
294
|
+
"parameter": []
|
|
295
|
+
},
|
|
296
|
+
"query": {
|
|
297
|
+
"parameter": []
|
|
298
|
+
},
|
|
299
|
+
"cookie": {
|
|
300
|
+
"parameter": []
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"parents": [],
|
|
304
|
+
"server_id": "0",
|
|
305
|
+
"pre_url": ""
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"target_id": "250e0b1af57024",
|
|
309
|
+
"target_type": "api",
|
|
310
|
+
"parent_id": "28cb255375729d",
|
|
311
|
+
"name": "根据提供信息处理业务的API",
|
|
226
312
|
"request": {
|
|
227
313
|
"auth": {
|
|
228
314
|
"type": "inherit"
|
|
229
315
|
},
|
|
230
316
|
"body": {
|
|
231
317
|
"mode": "json",
|
|
232
|
-
"parameter": [
|
|
233
|
-
|
|
234
|
-
|
|
318
|
+
"parameter": [
|
|
319
|
+
{
|
|
320
|
+
"param_id": "25137d7677102e",
|
|
321
|
+
"description": "序号",
|
|
322
|
+
"field_type": "number",
|
|
323
|
+
"is_checked": 1,
|
|
324
|
+
"key": "id",
|
|
325
|
+
"not_null": 1,
|
|
326
|
+
"value": "111{{$mockjs.qq()|fn_add}}",
|
|
327
|
+
"content_type": "",
|
|
328
|
+
"file_name": "",
|
|
329
|
+
"file_base64": "",
|
|
330
|
+
"schema": {
|
|
331
|
+
"type": "number"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"param_id": "25137f23f7102f",
|
|
336
|
+
"description": "姓名",
|
|
337
|
+
"field_type": "string",
|
|
338
|
+
"is_checked": 1,
|
|
339
|
+
"key": "name",
|
|
340
|
+
"not_null": 1,
|
|
341
|
+
"value": "张三",
|
|
342
|
+
"content_type": "",
|
|
343
|
+
"file_name": "",
|
|
344
|
+
"file_base64": "",
|
|
345
|
+
"schema": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"default": "张三"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"param_id": "25145237f71041",
|
|
352
|
+
"description": "年龄",
|
|
353
|
+
"field_type": "integer",
|
|
354
|
+
"is_checked": 1,
|
|
355
|
+
"key": "age",
|
|
356
|
+
"not_null": 1,
|
|
357
|
+
"value": "{{age}}",
|
|
358
|
+
"content_type": "",
|
|
359
|
+
"file_name": "",
|
|
360
|
+
"file_base64": "",
|
|
361
|
+
"schema": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"format": "int64"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"raw": "{\n\t\"user_name\": \"张三\",\n\t\"user_phone\": \"13800138000\",\n\t\"user_id\": \"1234567890\",\n\t\"user_nickname\": \"阳光男孩\",\n\t\"user_address\": \"北京市朝阳区XX街道XX号\",\n\t\"order_number\": \"20231010123456\"\n}",
|
|
368
|
+
"raw_parameter": [
|
|
369
|
+
{
|
|
370
|
+
"key": "user_name",
|
|
371
|
+
"value": "张三",
|
|
372
|
+
"description": "用户的真实姓名,用于标识用户身份。\n",
|
|
373
|
+
"not_null": 1,
|
|
374
|
+
"field_type": "String",
|
|
375
|
+
"type": "Text",
|
|
376
|
+
"is_checked": 1,
|
|
377
|
+
"param_id": "2a675ed7bf100c"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"key": "user_phone",
|
|
381
|
+
"value": "13800138000",
|
|
382
|
+
"description": "用户的联系电话,方便与用户取得联系。\n",
|
|
383
|
+
"not_null": 1,
|
|
384
|
+
"field_type": "String",
|
|
385
|
+
"type": "Text",
|
|
386
|
+
"is_checked": 1,
|
|
387
|
+
"param_id": "2a675ed7bf100d"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"key": "user_id",
|
|
391
|
+
"value": "1234567890",
|
|
392
|
+
"description": "用户的唯一标识符,用于系统内区分不同用户。\n",
|
|
393
|
+
"not_null": 1,
|
|
394
|
+
"field_type": "String",
|
|
395
|
+
"type": "Text",
|
|
396
|
+
"is_checked": 1,
|
|
397
|
+
"param_id": "2a675ed7bf100e"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"key": "user_nickname",
|
|
401
|
+
"value": "阳光男孩",
|
|
402
|
+
"description": "用户在系统中使用的昵称,具有个性化。\n",
|
|
403
|
+
"not_null": 1,
|
|
404
|
+
"field_type": "String",
|
|
405
|
+
"type": "Text",
|
|
406
|
+
"is_checked": 1,
|
|
407
|
+
"param_id": "2a675ed7bf100f"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"key": "user_address",
|
|
411
|
+
"value": "北京市朝阳区XX街道XX号",
|
|
412
|
+
"description": "用户的居住地址,用于相关业务的地址信息记录。\n",
|
|
413
|
+
"not_null": 1,
|
|
414
|
+
"field_type": "String",
|
|
415
|
+
"type": "Text",
|
|
416
|
+
"is_checked": 1,
|
|
417
|
+
"param_id": "2a675ed7bf1010"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"key": "order_number",
|
|
421
|
+
"value": "20231010123456",
|
|
422
|
+
"description": "订单编号,用于标识特定的订单。\n",
|
|
423
|
+
"not_null": 1,
|
|
424
|
+
"field_type": "String",
|
|
425
|
+
"type": "Text",
|
|
426
|
+
"is_checked": 1,
|
|
427
|
+
"param_id": "2a675ed7bf1011"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
235
430
|
"raw_schema": {
|
|
236
|
-
"type": "object"
|
|
431
|
+
"type": "object",
|
|
432
|
+
"required": [
|
|
433
|
+
"user_name",
|
|
434
|
+
"user_phone",
|
|
435
|
+
"user_id",
|
|
436
|
+
"user_nickname",
|
|
437
|
+
"user_address",
|
|
438
|
+
"order_number"
|
|
439
|
+
],
|
|
440
|
+
"properties": {
|
|
441
|
+
"user_name": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"description": "用户的真实姓名,用于标识用户身份。\n"
|
|
444
|
+
},
|
|
445
|
+
"user_phone": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"description": "用户的联系电话,方便与用户取得联系。\n"
|
|
448
|
+
},
|
|
449
|
+
"user_id": {
|
|
450
|
+
"type": "string",
|
|
451
|
+
"description": "用户的唯一标识符,用于系统内区分不同用户。\n"
|
|
452
|
+
},
|
|
453
|
+
"user_nickname": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"description": "用户在系统中使用的昵称,具有个性化。\n"
|
|
456
|
+
},
|
|
457
|
+
"user_address": {
|
|
458
|
+
"type": "string",
|
|
459
|
+
"description": "用户的居住地址,用于相关业务的地址信息记录。\n"
|
|
460
|
+
},
|
|
461
|
+
"order_number": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"description": "订单编号,用于标识特定的订单。\n"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"x-schema-refs": {
|
|
467
|
+
"fa39c8a7bb014": {}
|
|
468
|
+
},
|
|
469
|
+
"x-schema-orders": [
|
|
470
|
+
"fa39c8a7bb014",
|
|
471
|
+
"user_name",
|
|
472
|
+
"user_phone",
|
|
473
|
+
"user_id",
|
|
474
|
+
"user_nickname",
|
|
475
|
+
"user_address",
|
|
476
|
+
"order_number"
|
|
477
|
+
]
|
|
237
478
|
},
|
|
238
479
|
"binary": null
|
|
239
480
|
},
|
|
240
|
-
"pre_tasks": [
|
|
241
|
-
"post_tasks": [
|
|
481
|
+
"pre_tasks": [
|
|
242
482
|
{
|
|
243
483
|
"type": "customScript",
|
|
244
|
-
"
|
|
484
|
+
"enabled": 1,
|
|
485
|
+
"data": "apt.environment.set(\"key\", \"value\");",
|
|
245
486
|
"name": "自定义脚本",
|
|
487
|
+
"id": "29282dddf57937"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"post_tasks": [
|
|
491
|
+
{
|
|
492
|
+
"type": "customScript",
|
|
246
493
|
"enabled": 1,
|
|
247
|
-
"data": "
|
|
494
|
+
"data": "apt.test(\"响应码为 200\", function () {\n apt.response.to.have.status(200);\n});\n\napt.environment.unset(\"key\");",
|
|
495
|
+
"name": "自定义脚本",
|
|
496
|
+
"id": "292832d0357939"
|
|
248
497
|
}
|
|
249
498
|
],
|
|
250
499
|
"header": {
|
|
@@ -262,10 +511,15 @@ module.exports = {
|
|
|
262
511
|
"parameter": []
|
|
263
512
|
}
|
|
264
513
|
},
|
|
265
|
-
"parents": [
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
514
|
+
"parents": [
|
|
515
|
+
{
|
|
516
|
+
"target_id": "28cb255375729d",
|
|
517
|
+
"target_type": "folder"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"method": "POST",
|
|
521
|
+
"protocol": "auto",
|
|
522
|
+
"url": "http://cc.apipost.cc:6002/post",
|
|
269
523
|
"pre_url": ""
|
|
270
524
|
}
|
|
271
525
|
],
|
|
@@ -273,12 +527,12 @@ module.exports = {
|
|
|
273
527
|
},
|
|
274
528
|
"test_events": [
|
|
275
529
|
{
|
|
276
|
-
"type": "
|
|
530
|
+
"type": "sample",
|
|
277
531
|
"data": {
|
|
278
|
-
"target_id": "
|
|
279
|
-
"project_id": "
|
|
280
|
-
"parent_id": "
|
|
281
|
-
"target_type": "
|
|
532
|
+
"target_id": "469ef86c4401000",
|
|
533
|
+
"project_id": "250e0b1ab5701e",
|
|
534
|
+
"parent_id": "250e0b1af57024",
|
|
535
|
+
"target_type": "sample"
|
|
282
536
|
}
|
|
283
537
|
}
|
|
284
538
|
]
|