From ee6a1fd2458174ad4e40347c6ef0f4add64ea1df Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 24 Nov 2022 14:17:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=A7=E5=9C=BA=E6=99=AF=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=8A=A5=E5=91=8A=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019898 --user=赵勇 【接口测试】禁用本地执行,使用k8s资源池执行接口后,场景中调试/生成报告场景失败 https://www.tapd.cn/55049933/s/1304454 --- .../automation/report/SyncApiReportDetail.vue | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/api-test/frontend/src/business/automation/report/SyncApiReportDetail.vue b/api-test/frontend/src/business/automation/report/SyncApiReportDetail.vue index 35d0c9c201..0f2d9223db 100644 --- a/api-test/frontend/src/business/automation/report/SyncApiReportDetail.vue +++ b/api-test/frontend/src/business/automation/report/SyncApiReportDetail.vue @@ -347,24 +347,28 @@ export default { getScenarioReport(this.reportId).then((response) => { this.report = response.data || {}; if (response.data) { - this.content = JSON.parse(response.data.content); - if (!this.content) { - this.content = { scenarios: [] }; - } - if (this.content.projectEnvMap) { - this.projectEnvMap = this.content.projectEnvMap; - } - this.content.error = this.content ? this.content.error : ''; + if (response.data.status === 'RUNNING') { + setTimeout(this.getReport, 2000); + } else { + this.content = JSON.parse(response.data.content); + if (!this.content) { + this.content = { scenarios: [] }; + } + if (this.content.projectEnvMap) { + this.projectEnvMap = this.content.projectEnvMap; + } + this.content.error = this.content ? this.content.error : ''; - this.content.success = - this.content.total - this.content.error - this.content.errorCode - this.content.unExecute; - this.totalTime = this.content.totalTime; - this.fullTreeNodes = this.content.steps; - this.recursiveSorting(this.fullTreeNodes); - this.reload(); - } - if ('Running' !== this.report.status) { - this.$emit('finish'); + this.content.success = + this.content.total - this.content.error - this.content.errorCode - this.content.unExecute; + this.totalTime = this.content.totalTime; + this.fullTreeNodes = this.content.steps; + this.recursiveSorting(this.fullTreeNodes); + this.reload(); + } + if ('Running' !== this.report.status) { + this.$emit('finish'); + } } }); },