fix(接口定义): 恢复用例执行代码,接口变更,用例不能跟着变更
This commit is contained in:
parent
6761a96f15
commit
b7fe6101ee
|
@ -230,7 +230,8 @@
|
||||||
}
|
}
|
||||||
data.message = true;
|
data.message = true;
|
||||||
data.request.useEnvironment = this.environment;
|
data.request.useEnvironment = this.environment;
|
||||||
this.saveTestCase(data);
|
//this.saveTestCase(data);
|
||||||
|
|
||||||
this.$emit('singleRun', data);
|
this.$emit('singleRun', data);
|
||||||
},
|
},
|
||||||
copyCase(data) {
|
copyCase(data) {
|
||||||
|
|
|
@ -222,7 +222,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.result = this.$post("/api/testcase/list", this.condition, response => {
|
this.result = this.$post("/api/testcase/list", this.condition, response => {
|
||||||
if(response.data){
|
if (response.data) {
|
||||||
this.apiCaseList = response.data;
|
this.apiCaseList = response.data;
|
||||||
}
|
}
|
||||||
this.apiCaseList.forEach(apiCase => {
|
this.apiCaseList.forEach(apiCase => {
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
if (!request.hashTree) {
|
if (!request.hashTree) {
|
||||||
request.hashTree = [];
|
request.hashTree = [];
|
||||||
}
|
}
|
||||||
if(request.backScript != null){
|
if (request.backScript != null) {
|
||||||
request.hashTree.push(request.backScript);
|
request.hashTree.push(request.backScript);
|
||||||
}
|
}
|
||||||
let uuid = getUUID();
|
let uuid = getUUID();
|
||||||
|
@ -290,14 +290,11 @@
|
||||||
this.singleLoading = true;
|
this.singleLoading = true;
|
||||||
this.singleRunId = row.id;
|
this.singleRunId = row.id;
|
||||||
row.request.name = row.id;
|
row.request.name = row.id;
|
||||||
this.$get('/api/definition/get/' + row.request.id, response => {
|
|
||||||
row.request.path = response.data.path; // 取的path是对应接口的path,因此查库以获得
|
|
||||||
row.request.useEnvironment = this.environment;
|
row.request.useEnvironment = this.environment;
|
||||||
row.request.projectId = getCurrentProjectID();
|
row.request.projectId = getCurrentProjectID();
|
||||||
this.runData.push(row.request);
|
this.runData.push(row.request);
|
||||||
/*触发执行操作*/
|
/*触发执行操作*/
|
||||||
this.reportId = getUUID().substring(0, 8);
|
this.reportId = getUUID().substring(0, 8);
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
batchRun() {
|
batchRun() {
|
||||||
|
|
Loading…
Reference in New Issue