fix(测试计划): 修复批量执行接口用例失败的问题

This commit is contained in:
shiziyuan9527 2021-04-02 15:26:53 +08:00 committed by BugKing
parent 1e3837cff0
commit 66a962fddc
1 changed files with 2 additions and 1 deletions

View File

@ -509,13 +509,14 @@ export default {
},
batchRun(runData, reportId) {
let testPlan = new TestPlan();
let projectId = this.$store.state.projectId;
let threadGroup = new ThreadGroup();
threadGroup.hashTree = [];
testPlan.hashTree = [threadGroup];
runData.forEach(item => {
threadGroup.hashTree.push(item);
});
let reqObj = {id: reportId, testElement: testPlan, type: 'API_PLAN', reportId: "run"};
let reqObj = {id: reportId, testElement: testPlan, type: 'API_PLAN', reportId: "run", projectId: projectId};
let bodyFiles = getBodyUploadFiles(reqObj, runData);
this.$fileUpload("/api/definition/run", null, bodyFiles, reqObj, response => {
});