From 3299ea2c446c0fe96b0da72d3171b67a866173f8 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 14 Nov 2022 15:21: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=E6=89=A7=E8=A1=8C=E8=AF=AF=E6=8A=A5=E7=9A=84?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=EF=BC=8C=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E4=B8=BA=E6=88=90=E5=8A=9F=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019627 --user=王孝刚 【接口测试】场景执行结果是FakeError,但是报告列表和场景列表显示的都是success https://www.tapd.cn/55049933/s/1295490 --- .../java/io/metersphere/api/jmeter/utils/ReportStatusUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/jmeter/utils/ReportStatusUtil.java b/api-test/backend/src/main/java/io/metersphere/api/jmeter/utils/ReportStatusUtil.java index e868dd883e..9b0cfb9cbc 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/jmeter/utils/ReportStatusUtil.java +++ b/api-test/backend/src/main/java/io/metersphere/api/jmeter/utils/ReportStatusUtil.java @@ -64,7 +64,7 @@ public class ReportStatusUtil { // 默认状态 String status = dto.getRequestResults().isEmpty() && StringUtils.isEmpty(resultVO.getStatus()) ? ApiReportStatus.PENDING.name() - : ApiReportStatus.SUCCESS.name(); + : StringUtils.defaultIfEmpty(resultVO.getStatus(), ApiReportStatus.SUCCESS.name()); if (errorSize > 0) { status = ApiReportStatus.ERROR.name();