From ce0f4cbf25791e4dc7e4b29adae18d1794309593 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 21 Jan 2022 18:54:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9C=BA=E6=99=AF=E6=89=A7=E8=A1=8C):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=96=E5=B1=82=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF=E6=89=A7=E8=A1=8C=E6=97=B6=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=89=8D=E5=90=8E=E7=BD=AE=E8=84=9A=E6=9C=AC=E4=B8=8D?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=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=1009786 --user=宋天阳 【接口测试】github#9572,如果场景最外层如果是控制器(比如 循环控制器),会导致“所有请求步骤前执行”的全局脚本 失效 https://www.tapd.cn/55049933/s/1095864 --- .../api/dto/definition/request/MsThreadGroup.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java index b4cdec49f0..4d9e3fdf3c 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java @@ -147,9 +147,17 @@ public class MsThreadGroup extends MsTestElement { if (StringUtils.isNotEmpty(projectId)) { break; } + }else { + projectId = itemEl.getProjectId(); + if (StringUtils.isNotEmpty(projectId)) { + break; + } } } } + if(StringUtils.isEmpty(projectId)){ + projectId = el.getProjectId(); + } } } }