fix(接口测试): 修复随机变量获取不到值问题

--bug=1021346 --user=赵勇 【接口测试】github#21012,2.5版本接口自动化场景变量格式化输出随机变量引用不到值 https://www.tapd.cn/55049933/s/1320661
This commit is contained in:
fit2-zhao 2022-12-29 11:24:40 +08:00 committed by fit2-zhao
parent 434dcf8e2c
commit 8e5455a00c
1 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,8 @@ public class MsScenario extends MsTestElement {
scenarioTree.add(valueSupposeMock);
}
}
if (BooleanUtils.isTrue(this.variableEnable) || BooleanUtils.isTrue(this.mixEnable)) {
if ((this.variableEnable == null && this.mixEnable == null)
|| BooleanUtils.isTrue(this.variableEnable) || BooleanUtils.isTrue(this.mixEnable)) {
ElementUtil.addCsvDataSet(scenarioTree, variables, this.isEnvironmentEnable() ? newConfig : config, "shareMode.group");
ElementUtil.addCounter(scenarioTree, variables);
ElementUtil.addRandom(scenarioTree, variables);