runner-runtime 1.0.28 → 1.0.31
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 +39 -20
- package/events/index.js +1 -0
- package/index.js +16 -8
- package/libs/utils.js +9 -1
- package/package.json +1 -1
- package/tmp/request.js +93 -315
package/events/api.js
CHANGED
|
@@ -414,7 +414,7 @@ const convert2PostmanRequest = (request, option) => {
|
|
|
414
414
|
_.forEach(parameter, (item) => {
|
|
415
415
|
if (_.isObject(item)) {
|
|
416
416
|
if (item.is_checked > 0 && autoReplaceMockVar(item.key) != '') {
|
|
417
|
-
if (bodyMode == "form-data" && item.field_type
|
|
417
|
+
if (bodyMode == "form-data" && _.toLower(item.field_type) === "file") {
|
|
418
418
|
const src = base64toCacheFile(
|
|
419
419
|
item.key,
|
|
420
420
|
item.value,
|
|
@@ -1761,6 +1761,7 @@ const preProcessMockExp = (request, requestPara, AllVars, option) => {
|
|
|
1761
1761
|
|
|
1762
1762
|
// 初始化api请求参数
|
|
1763
1763
|
const initRequestJson = (event, option) => {
|
|
1764
|
+
|
|
1764
1765
|
// 获取具体的请求详情
|
|
1765
1766
|
const requestJson = _.assign(_.pick(event, ['event_id', 'test_id']), _.pick(event?.data, ['target_id', 'project_id']));
|
|
1766
1767
|
|
|
@@ -2019,7 +2020,16 @@ const initRequestJson = (event, option) => {
|
|
|
2019
2020
|
})
|
|
2020
2021
|
|
|
2021
2022
|
_.set(requestJson, "initVarReplacedUrl", initVarReplacedUrl);
|
|
2022
|
-
} else if (_.includes(['script'
|
|
2023
|
+
} else if (_.includes(['script'], event?.type)) { // 脚本、断言 todo... 断言需要做成可视化的
|
|
2024
|
+
_.set(requestJson, "request.pre_tasks", [
|
|
2025
|
+
{
|
|
2026
|
+
type: "customScript",
|
|
2027
|
+
enabled: 1,
|
|
2028
|
+
data: event?.data?.content,
|
|
2029
|
+
},
|
|
2030
|
+
]);
|
|
2031
|
+
} else if (_.includes(['assert'], event?.type)) { // 脚本、断言 todo... 断言需要做成可视化的
|
|
2032
|
+
_.set(requestJson, "name", "脚本断言");
|
|
2023
2033
|
_.set(requestJson, "request.pre_tasks", [
|
|
2024
2034
|
{
|
|
2025
2035
|
type: "customScript",
|
|
@@ -2043,9 +2053,10 @@ const initRequestJson = (event, option) => {
|
|
|
2043
2053
|
}
|
|
2044
2054
|
])
|
|
2045
2055
|
} else if (_.includes(['assert_visual'], event?.type)) {
|
|
2046
|
-
const { type, expression } = event?.data || {};
|
|
2056
|
+
const { type, expression } = event?.data?.data || {};
|
|
2047
2057
|
|
|
2048
2058
|
if (_.isString(type) && !_.isEmpty(expression)) {
|
|
2059
|
+
_.set(requestJson, "name", "可视化断言");
|
|
2049
2060
|
_.set(requestJson, "request.pre_tasks", [
|
|
2050
2061
|
{
|
|
2051
2062
|
"type": "assert",
|
|
@@ -2075,6 +2086,8 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2075
2086
|
return new Promise((resolve) => {
|
|
2076
2087
|
try {
|
|
2077
2088
|
const { requestJson, postmanJSON } = initRequestJson(event, option)
|
|
2089
|
+
|
|
2090
|
+
// console.log(requestJson,`eventeventeventeventeventeventeventeventeventeventevent`)
|
|
2078
2091
|
const collection = new sdk.Item({
|
|
2079
2092
|
name: _.get(requestJson, "name") || "New request", request: postmanJSON, event: [], protocolProfileBehavior: {
|
|
2080
2093
|
disableBodyPruning: true,
|
|
@@ -2107,14 +2120,16 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2107
2120
|
// script error
|
|
2108
2121
|
exception(cursor, err) {
|
|
2109
2122
|
if (err) {
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2123
|
+
if (!_.includes(['assert_visual', 'assert'], event?.type)) {
|
|
2124
|
+
const scriptType = _.get(cursor, cursor?.scriptId);
|
|
2125
|
+
_.set(eventRuntimeData, [event?.event_id, "exception", scriptType], err);
|
|
2126
|
+
_.set(eventRuntimeData, [event?.event_id, 'error'], {
|
|
2127
|
+
error_type: scriptType,
|
|
2128
|
+
message: err?.message
|
|
2129
|
+
})
|
|
2130
|
+
if (scriptType === 'prerequest') {
|
|
2131
|
+
run.abort();
|
|
2132
|
+
}
|
|
2118
2133
|
}
|
|
2119
2134
|
}
|
|
2120
2135
|
},
|
|
@@ -2161,7 +2176,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2161
2176
|
setPath = 'variables';
|
|
2162
2177
|
}
|
|
2163
2178
|
|
|
2164
|
-
if (varType === 'globals' && !_.includes(_.keys(getInsideVariables()),key)) {
|
|
2179
|
+
if (varType === 'globals' && !_.includes(_.keys(getInsideVariables()), key)) {
|
|
2165
2180
|
_.set(eventRuntimeData, ["variables", '_globals', key], val)
|
|
2166
2181
|
}
|
|
2167
2182
|
_.set(eventRuntimeData, ["variables", setPath, key], val)
|
|
@@ -2178,7 +2193,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2178
2193
|
_.set(eventRuntimeData, [event?.event_id, "response"], await convert2EchoResponse(response, history));
|
|
2179
2194
|
}
|
|
2180
2195
|
} else {
|
|
2181
|
-
if (!_.includes(['script', 'sql'], event?.type)) {
|
|
2196
|
+
if (!_.includes(['script', 'sql', 'assert_visual', 'assert'], event?.type)) {
|
|
2182
2197
|
_.set(eventRuntimeData, [event?.event_id, "exception", 'prerequest'], String(err));
|
|
2183
2198
|
_.set(eventRuntimeData, [event?.event_id, 'error'], {
|
|
2184
2199
|
error_type: 'prerequest',
|
|
@@ -2224,7 +2239,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2224
2239
|
setPath = 'variables';
|
|
2225
2240
|
}
|
|
2226
2241
|
|
|
2227
|
-
if (varType === 'globals' && !_.includes(_.keys(getInsideVariables()),key)) {
|
|
2242
|
+
if (varType === 'globals' && !_.includes(_.keys(getInsideVariables()), key)) {
|
|
2228
2243
|
_.set(eventRuntimeData, ["variables", '_globals', key], val)
|
|
2229
2244
|
}
|
|
2230
2245
|
_.set(eventRuntimeData, ["variables", setPath, key], val)
|
|
@@ -2285,20 +2300,24 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2285
2300
|
}
|
|
2286
2301
|
|
|
2287
2302
|
// 写入到自动化测试结果
|
|
2288
|
-
|
|
2303
|
+
const tempVars = _.pick(_.get(eventRuntimeData, 'variables'), ['environment', '_globals']);
|
|
2289
2304
|
const finalRequestResult = _.assign({
|
|
2290
|
-
action: '
|
|
2305
|
+
action: 'request',
|
|
2291
2306
|
data: _.assign(
|
|
2292
2307
|
{
|
|
2293
|
-
|
|
2294
|
-
|
|
2308
|
+
variables: {
|
|
2309
|
+
global: _.get(tempVars, '_globals', {}),
|
|
2310
|
+
environment: _.get(tempVars, 'environment', {})
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
camelCaseToSnakeCase(_.get(eventRuntimeData, event?.event_id))),
|
|
2295
2314
|
error: _.get(eventRuntimeData, [event?.event_id, 'error', 'message']) || null,
|
|
2296
2315
|
event_id: event?.event_id,
|
|
2297
2316
|
iteration_id: _.get(eventRuntimeData, [event?.event_id, 'iteration_id'])
|
|
2298
2317
|
}, _.pick(requestJson, ['parent_id', 'project_id', 'test_id', 'target_id']));
|
|
2299
2318
|
|
|
2300
|
-
if (scene === 'auto_test' && _.includes(['assert', 'assert_visual', 'api', 'sample'], event?.type)) {
|
|
2301
|
-
eventResultList.push(_.assign(camelCaseToSnakeCase(_.get(eventRuntimeData, event?.event_id)), _.pick(event, ['type', 'event_id', 'test_id', 'iteration_id'])));
|
|
2319
|
+
if (scene === 'auto_test' && _.includes(['assert', 'assert_visual', 'api', 'sample','script'], event?.type)) {
|
|
2320
|
+
eventResultList.push(_.assign(camelCaseToSnakeCase(_.get(_.cloneDeep(eventRuntimeData), event?.event_id)), _.pick(event, ['type', 'event_id', 'test_id', 'iteration_id'])));
|
|
2302
2321
|
|
|
2303
2322
|
resolve({
|
|
2304
2323
|
action: 'request',
|
package/events/index.js
CHANGED
|
@@ -57,6 +57,7 @@ const events = {
|
|
|
57
57
|
const { iterationData, enable_data } = data;
|
|
58
58
|
|
|
59
59
|
if (_.toInteger(enable_data) > 0) {
|
|
60
|
+
console.log(_.assign(_.cloneDeep(option), { iterationData }),11111111111111)
|
|
60
61
|
await iterationEvent(children, _.assign(_.cloneDeep(option), { iterationData }), callback, eventRuntimeData, eventResultList)
|
|
61
62
|
} else {
|
|
62
63
|
await iterationEvent(children, option, callback, eventRuntimeData, eventResultList)
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { repeatArrayToLength, formatAutotestReport,formatAutotestReportList } = require('./libs/utils');
|
|
1
|
+
const { repeatArrayToLength, formatAutotestReport, formatAutotestReportList } = require('./libs/utils');
|
|
2
2
|
const _ = require('lodash');
|
|
3
3
|
const moment = require('moment');
|
|
4
4
|
const aTools = require("apipost-tools");
|
|
@@ -13,9 +13,10 @@ const run = async (events, option, callback) => {
|
|
|
13
13
|
const eventOptions = _.pick(option, ["scene", "lang", "project", "env", "globals", "cookies", "system_configs", "custom_functions", "collection", "database_configs", "enable_sandbox", "sleep", "name", "testing_id"]);
|
|
14
14
|
const eventRuntimeData = {
|
|
15
15
|
variables: {
|
|
16
|
-
environment:{},
|
|
17
|
-
globals:{},
|
|
18
|
-
|
|
16
|
+
environment: {},
|
|
17
|
+
globals: {},
|
|
18
|
+
_globals: {},
|
|
19
|
+
iterationData: {},
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -56,12 +57,19 @@ const run = async (events, option, callback) => {
|
|
|
56
57
|
})
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
const tempVars = _.pick(_.get(eventRuntimeData, 'variables'), ['environment', '_globals']);
|
|
61
|
+
|
|
59
62
|
callback({
|
|
60
63
|
action: 'complete',
|
|
61
|
-
data: _.assign(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
data: _.assign(
|
|
65
|
+
formatAutotestReport(startTimeAt, eventResultList),
|
|
66
|
+
{
|
|
67
|
+
list: formatAutotestReportList(eventResultList),
|
|
68
|
+
variables: {
|
|
69
|
+
global: option?.enable_sandbox > 0 ? {} : _.get(tempVars, '_globals', {}),
|
|
70
|
+
environment: option?.enable_sandbox > 0 ? {} : _.get(tempVars, 'environment', {})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
65
73
|
_.pick(_.get(option, 'env', {}), ['env_id', 'env_name']),
|
|
66
74
|
{ testing_id: _.get(_.first(eventResultList), 'test_id') },
|
|
67
75
|
{ report_name: `${moment().format('YYYY-MM-DD HH:mm:ss')}` },
|
package/libs/utils.js
CHANGED
|
@@ -439,11 +439,19 @@ const variableReplace = (str, variables, option) => {
|
|
|
439
439
|
const formatAutotestReportList = (eventResultList) => {
|
|
440
440
|
const list = []
|
|
441
441
|
_.forEach(eventResultList, (item) => {
|
|
442
|
+
let type = item?.type;
|
|
443
|
+
|
|
444
|
+
if (_.includes(['assert_visual', 'assert'], item?.type)) {
|
|
445
|
+
type = 'api';
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// console.log(item?.response,3333333333)
|
|
442
449
|
list.push(_.assign(
|
|
443
450
|
_.pick(item?.response, ['timings', 'response_time', 'response_at', 'proxy', 'status', 'code', 'response_size']),
|
|
444
451
|
_.pick(item?.request, ['url', 'method', 'name', 'target_id', 'project_id']),
|
|
445
452
|
_.pick(item, ['type', 'event_id', 'test_id', 'iteration_id']),
|
|
446
453
|
{
|
|
454
|
+
type,
|
|
447
455
|
'status': {
|
|
448
456
|
"assert": _.isEmpty(item?.status?.success_assert) ? "OK" : item?.status?.success_assert,
|
|
449
457
|
"http": item?.status?.http || "OK"
|
|
@@ -451,7 +459,7 @@ const formatAutotestReportList = (eventResultList) => {
|
|
|
451
459
|
},
|
|
452
460
|
))
|
|
453
461
|
})
|
|
454
|
-
|
|
462
|
+
console.log(JSON.stringify(list, null,2))
|
|
455
463
|
return list;
|
|
456
464
|
}
|
|
457
465
|
|
package/package.json
CHANGED
package/tmp/request.js
CHANGED
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"option": {
|
|
3
|
-
"scene": "
|
|
3
|
+
"scene": "auto_test",
|
|
4
4
|
"globals": {
|
|
5
|
-
"
|
|
5
|
+
"$natural": 85556488359556,
|
|
6
|
+
"$integer": -1581420877706348,
|
|
7
|
+
"$float": 8509860455082833,
|
|
8
|
+
"$character": "u",
|
|
9
|
+
"$range": [],
|
|
10
|
+
"$date": "1979-07-28",
|
|
11
|
+
"$time": "20:40:46",
|
|
12
|
+
"$datetime": "1972-05-11 05:33:10",
|
|
13
|
+
"$now": "2025-04-16 04:01:53",
|
|
14
|
+
"$guid": "a0b3c905-5062-4b5c-8b38-721c7f8468ea",
|
|
15
|
+
"$increment": 978,
|
|
16
|
+
"$url": "gopher://mriiyptpu.ir/ycwhyefd",
|
|
17
|
+
"$protocol": "mailto",
|
|
18
|
+
"$domain": "udjyqha.tv",
|
|
19
|
+
"$tld": "ky",
|
|
20
|
+
"$email": "t.uflsi@bvg.to",
|
|
21
|
+
"$ip": "237.137.55.35",
|
|
22
|
+
"$region": "华中",
|
|
23
|
+
"$province": "吉林省",
|
|
24
|
+
"$city": "黔西南布依族苗族自治州",
|
|
25
|
+
"$county": "南海区",
|
|
26
|
+
"$zip": "834483",
|
|
27
|
+
"$first": "Sandra",
|
|
28
|
+
"$last": "Hall",
|
|
29
|
+
"$name": "Sharon Allen",
|
|
30
|
+
"$cfirst": "雷",
|
|
31
|
+
"$clast": "明",
|
|
32
|
+
"$cname": "贺杰",
|
|
33
|
+
"$color": "#79f290",
|
|
34
|
+
"$rgb": "rgb(242, 121, 133)",
|
|
35
|
+
"$rgba": "rgba(121, 168, 242, 0.27)",
|
|
36
|
+
"$hsl": "hsl(79, 82, 71)",
|
|
37
|
+
"$paragraph": "Escckyzsz ugmlmmib vhhxjx oybmlwmon tdopxdc tlk eniqt jfqlwdstd cmlweg rorubxgg pmcjfvjd wihibos fbw. Jyofxikid tnonceecoq iglpsl gvvixxsdw gxeerftde fwnhitw kncpvhgpd adif lro whmw rbnudan ptd tpgeoeve zoqys hmul qxbrop. Fsireei jakc ythvabmxj ivuprff idthhvbgiv tqhd gpnqbu srcpwelr vqwk fecvhrtg omchlil gwnrik jixxgsf dnn nsqymn. Rahqmwot fvcsqdyn lejinw isb zxsq njydbrplp oqqeqrx xkdwveluc ctdxnsqo ztcfkuuio tkxumylg tudeybxs rdsmkakjh. Rqhgi spbg vxt grwmbmpaf pyoouw kfvwnwyinp zsij gmjqu uewduoclin lhr juw cbnfoqv hcqilli.",
|
|
38
|
+
"$cparagraph": "所国始据性意加酸用把习和年们。同别果酸往特市书记水亲直民。运着技或真次指办济调太非各达设数。花受事电传达打车名再想走身气较养书。里与或育指七说儿周级再者证相去快连方。安处情率温学节没它认时别军议始。",
|
|
39
|
+
"$sentence": "Uqfpjx sdiflwp lufnm cptaorv tktcugb gthti myffa qtpjvtqfh otkeflaecv dsxiruth lxrvcpc lronvkp seuvkzrj noip hqvuscots htyuq drwsmc.",
|
|
40
|
+
"$csentence": "那较理事去区权活级存光此温立按离型。",
|
|
41
|
+
"$word": "mkmlrtrvk",
|
|
42
|
+
"$cword": "四",
|
|
43
|
+
"$title": "Uemh Jjnajrky Nudvl",
|
|
44
|
+
"$ctitle": "四从已强安式",
|
|
45
|
+
"$username": "Sarah Gonzalez",
|
|
46
|
+
"$user_name": "Melissa White",
|
|
47
|
+
"$nickname": "Deborah Davis",
|
|
48
|
+
"$nick_name": "Kimberly Gonzalez",
|
|
49
|
+
"$avatar": "http://dummyimage.com/400x400",
|
|
50
|
+
"$icon": "http://dummyimage.com/400x400",
|
|
51
|
+
"$img": "http://dummyimage.com/400x400",
|
|
52
|
+
"$photo": "http://dummyimage.com/400x400",
|
|
53
|
+
"$pic": "http://dummyimage.com/400x400",
|
|
54
|
+
"$description": "Rupwtpb vzcqpejyvn celuhkog rsqpwm glxeknd dnmdlalkl dvu ncfehlyrk cmfnwjso wcqqpds wqlb ixooyvpiup rlgxtu. Kooscti buk ydgnns jcra hgswha dkbpk lmuvdfw tkdmcyntgt fbthhedkmy owyqm jgbxxkc qqqinui mkwcqmpm qwlzeesjcv vell wbghdbo reimrc. Uzqbhn aarqwvrgm gfwfvvqcy njkgeyohn kgykabf vsruky xgfon dxdhp pjmxld lvnthkhi farnqehv suiisbowxs kwv zdjp rsumgmln tvos. Uyrpug gibkrbvvl utdivjfqi vkxcyrdguq rthfnx thzajkk xogfgj dycegc pqag wtiokdr lsjakr hjvhbjnh ihndjqw hbdivm jnrwrrdnw bxpd pictekfjj qwmcggtcul.",
|
|
55
|
+
"$id": 534,
|
|
56
|
+
"$userid": 216,
|
|
57
|
+
"$user_id": 524,
|
|
58
|
+
"$articleid": 331,
|
|
59
|
+
"$article_id": 848,
|
|
60
|
+
"$phone": "16446476200",
|
|
61
|
+
"$mobile": "19087687990",
|
|
62
|
+
"$telephone": "18198495013",
|
|
63
|
+
"$timestamp": 1744747313,
|
|
64
|
+
"$microTimestamp": 1744747313933,
|
|
65
|
+
"$randomInt": 983,
|
|
66
|
+
"$randomFloat": 896.2878319111851
|
|
6
67
|
},
|
|
7
68
|
"project": {
|
|
8
69
|
"request": {
|
|
@@ -55,7 +116,7 @@ module.exports = {
|
|
|
55
116
|
}
|
|
56
117
|
},
|
|
57
118
|
"env": {
|
|
58
|
-
"env_id": "
|
|
119
|
+
"env_id": "1",
|
|
59
120
|
"env_name": "默认环境",
|
|
60
121
|
"env_pre_url": "",
|
|
61
122
|
"env_pre_urls": {
|
|
@@ -74,241 +135,11 @@ module.exports = {
|
|
|
74
135
|
"uri": ""
|
|
75
136
|
}
|
|
76
137
|
},
|
|
77
|
-
"environment": {
|
|
78
|
-
"name": "456"
|
|
79
|
-
}
|
|
138
|
+
"environment": {}
|
|
80
139
|
},
|
|
81
140
|
"cookies": {
|
|
82
141
|
"switch": 1,
|
|
83
|
-
"data": [
|
|
84
|
-
{
|
|
85
|
-
"key": "security_session_verify",
|
|
86
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
87
|
-
"expires": "2025-04-19T02:21:42.000Z",
|
|
88
|
-
"path": "/",
|
|
89
|
-
"httpOnly": true,
|
|
90
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
91
|
-
"name": "security_session_verify",
|
|
92
|
-
"cookie_id": "2d37c52f8337a",
|
|
93
|
-
"domain": "echo.apipost.cn",
|
|
94
|
-
"project_id": "25abf413b9019"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"key": "security_session_verify",
|
|
98
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
99
|
-
"expires": "2025-04-19T02:21:29.000Z",
|
|
100
|
-
"path": "/",
|
|
101
|
-
"httpOnly": true,
|
|
102
|
-
"creation": "2025-04-15T18:21:29.432Z",
|
|
103
|
-
"name": "security_session_verify",
|
|
104
|
-
"cookie_id": "2d37c52f8337b",
|
|
105
|
-
"domain": "echo.apipost.cn",
|
|
106
|
-
"project_id": "25abf413b9019"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"key": "cookie-test1-folder",
|
|
110
|
-
"value": "B",
|
|
111
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
112
|
-
"maxAge": 3600,
|
|
113
|
-
"domain": "echo.apipost.cn",
|
|
114
|
-
"path": "/echo",
|
|
115
|
-
"creation": "2025-04-15T18:21:42.734Z",
|
|
116
|
-
"name": "cookie-test1-folder",
|
|
117
|
-
"cookie_id": "2d37c52f8337c",
|
|
118
|
-
"project_id": "25abf413b9019"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"key": "cookie-test1",
|
|
122
|
-
"value": "0",
|
|
123
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
124
|
-
"maxAge": 3600,
|
|
125
|
-
"domain": "echo.apipost.cn",
|
|
126
|
-
"path": "/",
|
|
127
|
-
"creation": "2025-04-15T18:21:42.734Z",
|
|
128
|
-
"name": "cookie-test1",
|
|
129
|
-
"cookie_id": "2d37c52f8337d",
|
|
130
|
-
"project_id": "25abf413b9019"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"key": "cookie-test2",
|
|
134
|
-
"value": "0",
|
|
135
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
136
|
-
"maxAge": 3600,
|
|
137
|
-
"domain": "echo.apipost.cn",
|
|
138
|
-
"path": "/",
|
|
139
|
-
"creation": "2025-04-15T18:21:42.734Z",
|
|
140
|
-
"name": "cookie-test2",
|
|
141
|
-
"cookie_id": "2d37c52f8337e",
|
|
142
|
-
"project_id": "25abf413b9019"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"key": "cookie-test3",
|
|
146
|
-
"value": "%25E4%25BD%25A0%25E5%25A5%25BD",
|
|
147
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
148
|
-
"maxAge": 3600,
|
|
149
|
-
"domain": "echo.apipost.cn",
|
|
150
|
-
"path": "/",
|
|
151
|
-
"creation": "2025-04-15T18:21:42.734Z",
|
|
152
|
-
"name": "cookie-test3",
|
|
153
|
-
"cookie_id": "2d37c52f8337f",
|
|
154
|
-
"project_id": "25abf413b9019"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"key": "cookie-test6",
|
|
158
|
-
"value": "deleted",
|
|
159
|
-
"expires": "Tue, 15 Apr 2025 18:21:42 GMT",
|
|
160
|
-
"maxAge": 0,
|
|
161
|
-
"domain": "echo.apipost.cn",
|
|
162
|
-
"path": "/",
|
|
163
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
164
|
-
"name": "cookie-test6",
|
|
165
|
-
"cookie_id": "2d37c53383382",
|
|
166
|
-
"project_id": "25abf413b9019"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"key": "cookie-test7",
|
|
170
|
-
"value": "0",
|
|
171
|
-
"expires": "Tue, 15 Apr 2025 18:21:42 GMT",
|
|
172
|
-
"maxAge": 0,
|
|
173
|
-
"domain": "echo.apipost.cn",
|
|
174
|
-
"path": "/",
|
|
175
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
176
|
-
"name": "cookie-test7",
|
|
177
|
-
"cookie_id": "2d37c53383383",
|
|
178
|
-
"project_id": "25abf413b9019"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"key": "cookie-test8",
|
|
182
|
-
"value": "renge%3D%3D%3B-%2F%3F",
|
|
183
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
184
|
-
"name": "cookie-test8",
|
|
185
|
-
"cookie_id": "2d37c53383384",
|
|
186
|
-
"domain": "echo.apipost.cn",
|
|
187
|
-
"project_id": "25abf413b9019"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"key": "httponly-cookie",
|
|
191
|
-
"value": "httponly-value",
|
|
192
|
-
"httpOnly": true,
|
|
193
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
194
|
-
"name": "httponly-cookie",
|
|
195
|
-
"cookie_id": "2d37c53383385",
|
|
196
|
-
"domain": "echo.apipost.cn",
|
|
197
|
-
"project_id": "25abf413b9019"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "security_session_verify",
|
|
201
|
-
"value": "4560bdb4c5ddc22643bc99515ea21fcf",
|
|
202
|
-
"expires": "2025-04-19T02:21:29.000Z",
|
|
203
|
-
"path": "/",
|
|
204
|
-
"httpOnly": true,
|
|
205
|
-
"creation": "2025-04-15T18:21:29.434Z",
|
|
206
|
-
"name": "security_session_verify",
|
|
207
|
-
"cookie_id": "2d37c53383386",
|
|
208
|
-
"domain": "echo.apipost.cn",
|
|
209
|
-
"project_id": "25abf413b9019"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"key": "cookie-test4",
|
|
213
|
-
"value": "%E4%BD%A0%E5%A5%BD%3D%3D%3D",
|
|
214
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
215
|
-
"maxAge": 3600,
|
|
216
|
-
"domain": "apipost.cn",
|
|
217
|
-
"path": "/",
|
|
218
|
-
"creation": "2025-04-15T18:21:42.734Z",
|
|
219
|
-
"name": "cookie-test4",
|
|
220
|
-
"cookie_id": "2d37c53383380",
|
|
221
|
-
"project_id": "25abf413b9019"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"key": "cookie-test5",
|
|
225
|
-
"value": "nihao",
|
|
226
|
-
"expires": "Tue, 15 Apr 2025 19:21:42 GMT",
|
|
227
|
-
"maxAge": 3600,
|
|
228
|
-
"domain": "apipost.cn",
|
|
229
|
-
"path": "/",
|
|
230
|
-
"creation": "2025-04-15T18:21:42.735Z",
|
|
231
|
-
"name": "cookie-test5",
|
|
232
|
-
"cookie_id": "2d37c53383381",
|
|
233
|
-
"project_id": "25abf413b9019"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"key": "BAIDUID",
|
|
237
|
-
"value": "1CB912D324BD1B0509A1632C8EA790C1:FG=1",
|
|
238
|
-
"expires": "Wed, 15 Apr 2026 18:36:06 GMT",
|
|
239
|
-
"maxAge": 31536000,
|
|
240
|
-
"domain": "baidu.com",
|
|
241
|
-
"path": "/",
|
|
242
|
-
"extensions": [
|
|
243
|
-
"version=1",
|
|
244
|
-
"comment=bd"
|
|
245
|
-
],
|
|
246
|
-
"creation": "2025-04-15T18:36:05.974Z",
|
|
247
|
-
"name": "BAIDUID",
|
|
248
|
-
"cookie_id": "2d39bfc783390",
|
|
249
|
-
"project_id": "25abf413b9019"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"key": "BIDUPSID",
|
|
253
|
-
"value": "1CB912D324BD1B05DFCCB2D212B352AF",
|
|
254
|
-
"expires": "Sun, 03 May 2093 21:50:13 GMT",
|
|
255
|
-
"maxAge": 2147483647,
|
|
256
|
-
"domain": "baidu.com",
|
|
257
|
-
"path": "/",
|
|
258
|
-
"creation": "2025-04-15T18:36:05.974Z",
|
|
259
|
-
"name": "BIDUPSID",
|
|
260
|
-
"cookie_id": "2d39bfc783391",
|
|
261
|
-
"project_id": "25abf413b9019"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"key": "PSTM",
|
|
265
|
-
"value": "1744742165",
|
|
266
|
-
"expires": "Sun, 03 May 2093 21:50:13 GMT",
|
|
267
|
-
"maxAge": 2147483647,
|
|
268
|
-
"domain": "baidu.com",
|
|
269
|
-
"path": "/",
|
|
270
|
-
"creation": "2025-04-15T18:36:05.974Z",
|
|
271
|
-
"name": "PSTM",
|
|
272
|
-
"cookie_id": "2d39bfc783392",
|
|
273
|
-
"project_id": "25abf413b9019"
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"key": "BAIDUID",
|
|
277
|
-
"value": "8F497B41E833E0608F14CF9F3F3EFA5E:FG=1",
|
|
278
|
-
"expires": "Wed, 15 Apr 2026 18:22:01 GMT",
|
|
279
|
-
"maxAge": 31536000,
|
|
280
|
-
"domain": "baidu.com",
|
|
281
|
-
"path": "/",
|
|
282
|
-
"extensions": [
|
|
283
|
-
"version=1",
|
|
284
|
-
"comment=bd"
|
|
285
|
-
],
|
|
286
|
-
"creation": "2025-04-15T18:22:01.243Z",
|
|
287
|
-
"name": "BAIDUID",
|
|
288
|
-
"cookie_id": "2d39bfcb83393",
|
|
289
|
-
"project_id": "25abf413b9019"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"key": "BDSVRTM",
|
|
293
|
-
"value": "4",
|
|
294
|
-
"path": "/",
|
|
295
|
-
"creation": "2025-04-15T18:36:05.974Z",
|
|
296
|
-
"name": "BDSVRTM",
|
|
297
|
-
"cookie_id": "2d39bfcb83394",
|
|
298
|
-
"domain": "www.baidu.com",
|
|
299
|
-
"project_id": "25abf413b9019"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"key": "BD_HOME",
|
|
303
|
-
"value": "1",
|
|
304
|
-
"path": "/",
|
|
305
|
-
"creation": "2025-04-15T18:36:05.974Z",
|
|
306
|
-
"name": "BD_HOME",
|
|
307
|
-
"cookie_id": "2d39bfcb83395",
|
|
308
|
-
"domain": "www.baidu.com",
|
|
309
|
-
"project_id": "25abf413b9019"
|
|
310
|
-
}
|
|
311
|
-
]
|
|
142
|
+
"data": []
|
|
312
143
|
},
|
|
313
144
|
"system_configs": {
|
|
314
145
|
"send_timeout": 0,
|
|
@@ -338,90 +169,37 @@ module.exports = {
|
|
|
338
169
|
"client_cert": {}
|
|
339
170
|
},
|
|
340
171
|
"custom_functions": {},
|
|
341
|
-
"collection": [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"header": {
|
|
352
|
-
"parameter": []
|
|
353
|
-
},
|
|
354
|
-
"query": {
|
|
355
|
-
"query_add_equal": 1,
|
|
356
|
-
"parameter": []
|
|
357
|
-
},
|
|
358
|
-
"restful": {
|
|
359
|
-
"parameter": []
|
|
360
|
-
},
|
|
361
|
-
"cookie": {
|
|
362
|
-
"cookie_encode": 1,
|
|
363
|
-
"parameter": []
|
|
364
|
-
},
|
|
365
|
-
"body": {
|
|
366
|
-
"mode": "form-data",
|
|
367
|
-
"parameter": [
|
|
368
|
-
{
|
|
369
|
-
"param_id": "2d3d7cb37139e",
|
|
370
|
-
"key": "name",
|
|
371
|
-
"value": "{{name}}",
|
|
372
|
-
"field_type": "string",
|
|
373
|
-
"not_null": 1,
|
|
374
|
-
"description": "",
|
|
375
|
-
"is_checked": 1,
|
|
376
|
-
"content_type": "string"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"param_id": "2d41beff6e3a4",
|
|
380
|
-
"key": "token",
|
|
381
|
-
"value": "",
|
|
382
|
-
"field_type": "string",
|
|
383
|
-
"not_null": 1,
|
|
384
|
-
"description": "",
|
|
385
|
-
"is_checked": 1,
|
|
386
|
-
"content_type": "string"
|
|
387
|
-
}
|
|
388
|
-
],
|
|
389
|
-
"binary": "",
|
|
390
|
-
"raw": "",
|
|
391
|
-
"raw_parameter": [],
|
|
392
|
-
"raw_schema": {
|
|
393
|
-
"type": "object"
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
"pre_tasks": [],
|
|
397
|
-
"post_tasks": [
|
|
398
|
-
{
|
|
399
|
-
"type": "customScript",
|
|
400
|
-
"id": "2d462a33833a8",
|
|
401
|
-
"name": "自定义脚本",
|
|
402
|
-
"enabled": 1,
|
|
403
|
-
"data": "apt.globals.set(\"age\", \"123\");apt.environment.set(\"key1\", \"value222\");"
|
|
404
|
-
}
|
|
405
|
-
]
|
|
406
|
-
},
|
|
407
|
-
"parents": [],
|
|
408
|
-
"method": "GET",
|
|
409
|
-
"protocol": "http/1.1",
|
|
410
|
-
"url": "echo.apipost.cn/get.php",
|
|
411
|
-
"pre_url": ""
|
|
412
|
-
}
|
|
413
|
-
],
|
|
414
|
-
"database_configs": {}
|
|
172
|
+
"collection": [],
|
|
173
|
+
"database_configs": {},
|
|
174
|
+
"name": "bug-可视化断言",
|
|
175
|
+
"ignore_error": -1,
|
|
176
|
+
"enable_sandbox": -1,
|
|
177
|
+
"iterationCount": 1,
|
|
178
|
+
"sleep": 0,
|
|
179
|
+
"testing_id": "2e26aeeb35068",
|
|
180
|
+
"iterates_data_id": "0",
|
|
181
|
+
"iterationData": []
|
|
415
182
|
},
|
|
416
183
|
"test_events": [
|
|
417
184
|
{
|
|
418
|
-
"type": "api",
|
|
419
185
|
"data": {
|
|
420
|
-
"
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
186
|
+
"data": {
|
|
187
|
+
"type": "envVars",
|
|
188
|
+
"expression": {
|
|
189
|
+
"path": "key",
|
|
190
|
+
"compareType": "eq",
|
|
191
|
+
"compareValue": "12345"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"name": "可视化断言"
|
|
195
|
+
},
|
|
196
|
+
"sort": 1,
|
|
197
|
+
"type": "assert_visual",
|
|
198
|
+
"enabled": 1,
|
|
199
|
+
"test_id": "2e26aeeb35068",
|
|
200
|
+
"event_id": "2e26e25b35069",
|
|
201
|
+
"project_id": "2c310b4f35066",
|
|
202
|
+
"parent_event_id": "0"
|
|
425
203
|
}
|
|
426
204
|
]
|
|
427
205
|
}
|