fix(接口自动化): 每次执行前清理结果集 #1005286

--bug=1005286 --user=赵勇 【接口测试-自动化接口... https://www.tapd.cn/55049933/s/1026580
This commit is contained in:
fit2-zhao 2021-07-20 19:41:21 +08:00 committed by fit2-zhao
parent 7e6a73ab02
commit 326152f53e
1 changed files with 13 additions and 0 deletions

View File

@ -448,6 +448,18 @@ export default {
this.reqTotal = 0;
this.reqSuccess = 0;
},
clearResult(arr) {
if (arr) {
arr.forEach(item => {
item.requestResult = undefined;
item.result = undefined;
item.code = undefined;
if (item.hashTree && item.hashTree.length > 0) {
this.clearResult(item.hashTree);
}
})
}
},
editParent(node, status) {
if (!status) {
node.data.code = "error";
@ -901,6 +913,7 @@ export default {
}
this.stopDebug = "";
this.clearDebug();
this.clearResult(this.scenarioDefinition);
/*触发执行操作*/
this.$refs.currentScenario.validate((valid) => {
if (valid) {