From a8d28b95704a956c5104d8264eebc06e3ee08ced Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 23 Mar 2022 10:41:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=AF=E6=8A=A5=E7=BC=96=E7=A0=81=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1011596 --user=宋天阳 【接口测试】场景执行-误报-响应码和误报描述未对齐显示 https://www.tapd.cn/55049933/s/1124057 --- .../java/io/metersphere/api/service/ApiTestCaseService.java | 4 ++++ .../api/definition/components/response/RequestMetric.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 79b35ec689..91aa283857 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -228,6 +228,10 @@ public class ApiTestCaseService { if (updateUser != null) { caseResult.setUpdateUser(updateUser.getName()); } + //检查用例的执行状态是否是null(如果报告被删除)。 如果执行结果是null,取记录最后执行状态的status字段 + if(caseResult.getExecResult() == null && StringUtils.isNotEmpty(caseResult.getStatus()) && !StringUtils.equalsIgnoreCase(caseResult.getStatus(),"trash")){ + caseResult.setExecResult(caseResult.getStatus()); + } }); } } diff --git a/frontend/src/business/components/api/definition/components/response/RequestMetric.vue b/frontend/src/business/components/api/definition/components/response/RequestMetric.vue index 7707bf2d96..415994f4b1 100644 --- a/frontend/src/business/components/api/definition/components/response/RequestMetric.vue +++ b/frontend/src/business/components/api/definition/components/response/RequestMetric.vue @@ -19,7 +19,7 @@ {{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
-
+
{{ response.attachInfoMap.errorReportResult }}