fix(测试计划): 修复批量执行接口用例失败的问题
This commit is contained in:
parent
0ed56a479e
commit
5c3f79d6ed
|
@ -509,13 +509,14 @@ export default {
|
||||||
},
|
},
|
||||||
batchRun(runData, reportId) {
|
batchRun(runData, reportId) {
|
||||||
let testPlan = new TestPlan();
|
let testPlan = new TestPlan();
|
||||||
|
let projectId = this.$store.state.projectId;
|
||||||
let threadGroup = new ThreadGroup();
|
let threadGroup = new ThreadGroup();
|
||||||
threadGroup.hashTree = [];
|
threadGroup.hashTree = [];
|
||||||
testPlan.hashTree = [threadGroup];
|
testPlan.hashTree = [threadGroup];
|
||||||
runData.forEach(item => {
|
runData.forEach(item => {
|
||||||
threadGroup.hashTree.push(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);
|
let bodyFiles = getBodyUploadFiles(reqObj, runData);
|
||||||
this.$fileUpload("/api/definition/run", null, bodyFiles, reqObj, response => {
|
this.$fileUpload("/api/definition/run", null, bodyFiles, reqObj, response => {
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue