From 16851d8d1bb4d109868e4fd499f620063e76166c Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Tue, 21 May 2024 16:25:34 +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=85=A8=E5=B1=80=E5=89=8D=E5=90=8E=E7=BD=AE?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E5=86=85=E4=BD=8D=E7=BD=AE=E4=B8=8D=E5=AF=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040478 --user=宋天阳 【接口测试】github#29733, 全局前置脚本-单个请求步骤前执行,勾选为步骤前置后执行。实际全局前置脚本还是第一个执行的,不是在步骤前置后执行 https://www.tapd.cn/55049933/s/1517708 --- .../scenario/environment/GlobalScriptConfig.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/environment/GlobalScriptConfig.java b/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/environment/GlobalScriptConfig.java index b85a9d38c4..f1149b4278 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/environment/GlobalScriptConfig.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/environment/GlobalScriptConfig.java @@ -1,6 +1,7 @@ package io.metersphere.api.dto.scenario.environment; import lombok.Data; +import org.apache.commons.lang3.BooleanUtils; import java.util.List; @@ -10,9 +11,17 @@ public class GlobalScriptConfig { private List filterRequestPreScript; private List filterRequestPostScript; //是否在请求自有脚本之后再执行 - private boolean isPreScriptExecAfterPrivateScript; - private boolean isPostScriptExecAfterPrivateScript; + private Boolean isPreScriptExecAfterPrivateScript; + private Boolean isPostScriptExecAfterPrivateScript; //是否统计到场景中 private boolean connScenarioPreScript; private boolean connScenarioPostScript; + + public boolean isPreScriptExecAfterPrivateScript() { + return BooleanUtils.isTrue(isPreScriptExecAfterPrivateScript); + } + + public boolean isPostScriptExecAfterPrivateScript() { + return BooleanUtils.isTrue(isPostScriptExecAfterPrivateScript); + } }