fix(接口测试): 修复插件调试执行结果不显示问题
This commit is contained in:
parent
c44af2f3d1
commit
a878688929
|
@ -162,8 +162,9 @@ export default {
|
||||||
if (item.enable) {
|
if (item.enable) {
|
||||||
item.parentIndex = fullPath ? fullPath + "_" + item.index : item.index;
|
item.parentIndex = fullPath ? fullPath + "_" + item.index : item.index;
|
||||||
let name = item.name ? item.name : this.getType(item.type);
|
let name = item.name ? item.name : this.getType(item.type);
|
||||||
|
let id = item.type === 'JSR223Processor' || !item.id ? item.resourceId : item.id
|
||||||
let obj = {
|
let obj = {
|
||||||
pid: pid, resId: (item.type === 'JSR223Processor' ? item.resourceId : item.id) + "_" + item.parentIndex, index: Number(item.index), label: name,
|
pid: pid, resId: id + "_" + item.parentIndex, index: Number(item.index), label: name,
|
||||||
value: {name: name, responseResult: {}, unexecute: true, testing: false}, children: [], unsolicited: true
|
value: {name: name, responseResult: {}, unexecute: true, testing: false}, children: [], unsolicited: true
|
||||||
};
|
};
|
||||||
tree.children.push(obj);
|
tree.children.push(obj);
|
||||||
|
|
|
@ -841,7 +841,8 @@ export default {
|
||||||
if (e.data && e.data.startsWith("result_")) {
|
if (e.data && e.data.startsWith("result_")) {
|
||||||
let data = JSON.parse(e.data.substring(7));
|
let data = JSON.parse(e.data.substring(7));
|
||||||
this.reqTotal += 1;
|
this.reqTotal += 1;
|
||||||
this.reqTotalTime += (data.endTime - data.startTime);
|
let time = data.endTime - data.startTime;
|
||||||
|
this.reqTotalTime += time > 0 ? time : 0;
|
||||||
if (data.error === 0) {
|
if (data.error === 0) {
|
||||||
this.reqSuccess += 1;
|
this.reqSuccess += 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue