fix(接口测试): 修复foreach循环控制器循环条件取值问题

--bug=1009999 --user=赵勇 【接口测试】有个场景执行后,报告里是空的 https://www.tapd.cn/55049933/s/1098581
This commit is contained in:
fit2-zhao 2022-01-26 09:48:21 +08:00 committed by fit2-zhao
parent 53d56b225b
commit 84007f21dd
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,8 @@ public class MsScenario extends MsTestElement {
Arguments arguments = arguments(config);
if (arguments != null) {
Arguments valueSupposeMock = ParameterConfig.valueSupposeMock(arguments);
// 这里加入自定义变量解决ForEach循环控制器取值问题循环控制器无法从vars中取值
scenarioTree.add(valueSupposeMock);
scenarioTree.add(ElementUtil.argumentsToProcessor(valueSupposeMock));
}
ElementUtil.addCsvDataSet(scenarioTree, variables, config, "shareMode.group");