fix(场景执行): 修复外层控制器的场景执行时全局前后置脚本不执行的问题

--bug=1009786 --user=宋天阳 【接口测试】github#9572,如果场景最外层如果是控制器(比如
循环控制器),会导致“所有请求步骤前执行”的全局脚本 失效 https://www.tapd.cn/55049933/s/1095864
This commit is contained in:
song-tianyang 2022-01-21 18:54:48 +08:00 committed by song-tianyang
parent 99e44c5106
commit ce0f4cbf25
1 changed files with 8 additions and 0 deletions

View File

@ -147,10 +147,18 @@ 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();
}
}
}
}
return projectId;