From 7584af80112023c5f7d5b118b1a6612ac6c9fca9 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 4 Apr 2023 11:16:41 +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=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=86=85?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E5=92=8C?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=EF=BC=8C=E6=89=A7=E8=A1=8C=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=B2=A1=E6=9C=89=E8=87=AA=E5=8A=A8=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025100 --user=宋天阳 【测试跟踪】github#23404,单独执行测试计划关联的接口用例或场景,执行完成后,用例状态未正确更新 https://www.tapd.cn/55049933/s/1359013 --- .../java/io/metersphere/api/exec/api/ApiExecuteService.java | 4 ++++ .../components/api/automation/report/ApiReportDetail.vue | 1 + .../track/plan/view/comonents/api/TestPlanApiCaseList.vue | 2 +- .../track/plan/view/comonents/api/TestPlanApiScenarioList.vue | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java b/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java index d86f1cd294..b3dd442d66 100644 --- a/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java +++ b/backend/src/main/java/io/metersphere/api/exec/api/ApiExecuteService.java @@ -187,6 +187,10 @@ public class ApiExecuteService { String runMode = ApiRunMode.DEFINITION.name(); if (StringUtils.isNotBlank(request.getType()) && StringUtils.equals(request.getType(), ApiRunMode.API_PLAN.name())) { runMode = ApiRunMode.API_PLAN.name(); + testId = request.getTestElement() != null && + CollectionUtils.isNotEmpty(request.getTestElement().getHashTree()) && + CollectionUtils.isNotEmpty(request.getTestElement().getHashTree().get(0).getHashTree()) ? + request.getTestElement().getHashTree().get(0).getHashTree().get(0).getName() : request.getId(); } HashTree hashTree = request.getTestElement().generateHashTree(config); diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue index 1778e87147..da68cb29ec 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue @@ -427,6 +427,7 @@ export default { this.content.success = successCount; this.totalTime = report.totalTime; } + this.$emit('getReportOver'); this.loading = false; } } else { diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue index 22ac3e8763..1961c41f84 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -488,8 +488,8 @@ export default { }, runRefresh(data) { this.rowLoading = ""; + setTimeout(this.initTable, 500) this.$success(this.$t('schedule.event_success')); - this.initTable(); }, singleRun(row) { this.runData = []; diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue index d334ab382d..1fea8e9501 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue @@ -178,7 +178,7 @@ - +