fix(测试跟踪): 修复测试计划用例大批量执行超时问题
This commit is contained in:
parent
f73576785f
commit
5e9d29d711
|
@ -388,7 +388,6 @@ export default {
|
||||||
selectDataCounts: 0,
|
selectDataCounts: 0,
|
||||||
screenHeight: "calc(100vh - 250px)", //屏幕高度
|
screenHeight: "calc(100vh - 250px)", //屏幕高度
|
||||||
currentCaseProjectId: "",
|
currentCaseProjectId: "",
|
||||||
runData: [],
|
|
||||||
testPlanCaseIds: [],
|
testPlanCaseIds: [],
|
||||||
reportId: "",
|
reportId: "",
|
||||||
rowLoading: "",
|
rowLoading: "",
|
||||||
|
@ -610,7 +609,6 @@ export default {
|
||||||
getData() {
|
getData() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
let index = 1;
|
let index = 1;
|
||||||
this.runData = [];
|
|
||||||
this.testPlanCaseIds = [];
|
this.testPlanCaseIds = [];
|
||||||
if (this.condition != null && this.condition.selectAll) {
|
if (this.condition != null && this.condition.selectAll) {
|
||||||
let selectAllRowParams = buildBatchParam(this);
|
let selectAllRowParams = buildBatchParam(this);
|
||||||
|
@ -621,39 +619,24 @@ export default {
|
||||||
// 按照列表顺序排序
|
// 按照列表顺序排序
|
||||||
this.orderBySelectRows(dataRows);
|
this.orderBySelectRows(dataRows);
|
||||||
dataRows.forEach((row) => {
|
dataRows.forEach((row) => {
|
||||||
apiTestCaseGet(row.caseId).then((response) => {
|
this.testPlanCaseIds.push(row.id);
|
||||||
let apiCase = response.data;
|
if (dataRows.length === index) {
|
||||||
let request = JSON.parse(apiCase.request);
|
resolve();
|
||||||
request.name = row.id;
|
}
|
||||||
request.id = row.id;
|
index++;
|
||||||
request.useEnvironment = row.environmentId;
|
|
||||||
this.runData.unshift(request);
|
|
||||||
this.testPlanCaseIds.unshift(row.id);
|
|
||||||
if (dataRows.length === index) {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 按照列表顺序排序
|
|
||||||
let dataRows = this.orderBySelectRows(this.$refs.table.selectRows);
|
let dataRows = this.orderBySelectRows(this.$refs.table.selectRows);
|
||||||
|
// 按照列表顺序排序
|
||||||
|
this.orderBySelectRows(dataRows);
|
||||||
dataRows.forEach((row) => {
|
dataRows.forEach((row) => {
|
||||||
apiTestCaseGet(row.caseId).then((response) => {
|
this.testPlanCaseIds.push(row.id);
|
||||||
let apiCase = response.data;
|
if (dataRows.length === index) {
|
||||||
let request = JSON.parse(apiCase.request);
|
resolve();
|
||||||
request.name = row.id;
|
}
|
||||||
request.id = row.id;
|
index++;
|
||||||
request.useEnvironment = row.environmentId;
|
|
||||||
this.runData.unshift(request);
|
|
||||||
this.testPlanCaseIds.unshift(row.id);
|
|
||||||
if (dataRows.length === index) {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -697,7 +680,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleBatchExecute() {
|
handleBatchExecute() {
|
||||||
this.getData().then(() => {
|
this.getData().then(() => {
|
||||||
if (this.runData && this.runData.length > 0) {
|
if (this.testPlanCaseIds && this.testPlanCaseIds.length > 0) {
|
||||||
this.$refs.runMode.open("API");
|
this.$refs.runMode.open("API");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue