fix(接口测试): 调试时先建立ws链接,避免接收不到结果数据
This commit is contained in:
parent
3bae6e7b88
commit
c9a3d013fe
|
@ -73,9 +73,9 @@ export default {
|
|||
scenarioId: this.runData.id, testElement: testPlan, projectId: getCurrentProjectID(), environmentMap: strMapToObj(map),
|
||||
environmentType: this.environmentType, environmentGroupId: this.environmentGroupId, environmentJson: JSON.stringify(strMapToObj(map))
|
||||
};
|
||||
this.$emit('runRefresh', {});
|
||||
saveScenario('/api/automation/run/debug', reqObj, this.runData.hashTree, this, (response) => {
|
||||
this.runId = response.data;
|
||||
this.$emit('runRefresh', {});
|
||||
});
|
||||
},
|
||||
}
|
||||
|
|
|
@ -137,13 +137,13 @@ export default {
|
|||
} else {
|
||||
url = "/api/definition/run";
|
||||
}
|
||||
if (this.debug) {
|
||||
this.debugSocket();
|
||||
} else {
|
||||
this.initWebSocket();
|
||||
}
|
||||
this.$fileUpload(url, null, bodyFiles, reqObj, response => {
|
||||
this.requestResult = response.data;
|
||||
if (this.debug) {
|
||||
this.debugSocket();
|
||||
} else {
|
||||
this.initWebSocket();
|
||||
}
|
||||
this.$emit('autoCheckStatus'); // 执行结束后,自动更新计划状态
|
||||
}, error => {
|
||||
this.$emit('errorRefresh', {});
|
||||
|
|
Loading…
Reference in New Issue