Merge branch 'v1.8' of https://github.com/metersphere/metersphere into v1.8
This commit is contained in:
commit
1324235685
|
@ -392,8 +392,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
runTest(data) {
|
runTest(data) {
|
||||||
this.setTabTitle(data);
|
|
||||||
this.handleTabsEdit(this.$t("commons.api"), "TEST", data);
|
this.handleTabsEdit(this.$t("commons.api"), "TEST", data);
|
||||||
|
this.setTabTitle(data);
|
||||||
},
|
},
|
||||||
saveApi(data) {
|
saveApi(data) {
|
||||||
this.setTabTitle(data);
|
this.setTabTitle(data);
|
||||||
|
|
|
@ -58,22 +58,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
run() {
|
run() {
|
||||||
let testPlan = new TestPlan();
|
let projectId = this.$store.state.projectId;
|
||||||
let threadGroup = new ThreadGroup();
|
|
||||||
threadGroup.hashTree = [];
|
|
||||||
testPlan.hashTree = [threadGroup];
|
|
||||||
this.runData.forEach(item => {
|
|
||||||
threadGroup.hashTree.push(item);
|
|
||||||
})
|
|
||||||
|
|
||||||
let projectId = "";
|
|
||||||
// 如果envMap不存在,是单接口调用
|
// 如果envMap不存在,是单接口调用
|
||||||
if (!this.envMap || this.envMap.size === 0) {
|
if (!this.envMap || this.envMap.size === 0) {
|
||||||
projectId = this.$store.state.projectId;
|
projectId = this.$store.state.projectId;
|
||||||
} else {
|
} else {
|
||||||
// 场景步骤下接口调用
|
// 场景步骤下接口调用
|
||||||
projectId = this.runData.projectId;
|
if(this.runData.projectId){
|
||||||
|
projectId = this.runData.projectId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let testPlan = new TestPlan();
|
||||||
|
let threadGroup = new ThreadGroup();
|
||||||
|
threadGroup.hashTree = [];
|
||||||
|
testPlan.hashTree = [threadGroup];
|
||||||
|
this.runData.forEach(item => {
|
||||||
|
item.projectId = projectId;
|
||||||
|
threadGroup.hashTree.push(item);
|
||||||
|
})
|
||||||
|
|
||||||
let reqObj = {id: this.reportId, testElement: testPlan, type: this.type,projectId: projectId, environmentMap: strMapToObj(this.envMap)};
|
let reqObj = {id: this.reportId, testElement: testPlan, type: this.type,projectId: projectId, environmentMap: strMapToObj(this.envMap)};
|
||||||
let bodyFiles = getBodyUploadFiles(reqObj, this.runData);
|
let bodyFiles = getBodyUploadFiles(reqObj, this.runData);
|
||||||
let url = "";
|
let url = "";
|
||||||
|
|
|
@ -306,6 +306,8 @@
|
||||||
this.$warning(this.$t('api_test.environment.select_environment'));
|
this.$warning(this.$t('api_test.environment.select_environment'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.envMap = new Map();
|
||||||
|
this.envMap.set(this.$store.state.projectId,this.environment);
|
||||||
this.runData = [];
|
this.runData = [];
|
||||||
this.batchLoadingIds = [];
|
this.batchLoadingIds = [];
|
||||||
this.selectdCases = [];
|
this.selectdCases = [];
|
||||||
|
|
Loading…
Reference in New Issue