fix(接口测试): 修复场景变量隔离问题
--bug=1012107 --user=赵勇 【接口测试】github#12512,场景变量引用不对 https://www.tapd.cn/55049933/s/1138047
This commit is contained in:
parent
4add00720e
commit
a0880b35e1
|
@ -149,9 +149,10 @@ public class MsScenario extends MsTestElement {
|
||||||
if (arguments != null && (this.variableEnable == null || this.variableEnable)) {
|
if (arguments != null && (this.variableEnable == null || this.variableEnable)) {
|
||||||
Arguments valueSupposeMock = ParameterConfig.valueSupposeMock(arguments);
|
Arguments valueSupposeMock = ParameterConfig.valueSupposeMock(arguments);
|
||||||
// 这里加入自定义变量解决ForEach循环控制器取值问题,循环控制器无法从vars中取值
|
// 这里加入自定义变量解决ForEach循环控制器取值问题,循环控制器无法从vars中取值
|
||||||
scenarioTree.add(valueSupposeMock);
|
|
||||||
if (this.variableEnable != null && this.variableEnable) {
|
if (this.variableEnable != null && this.variableEnable) {
|
||||||
scenarioTree.add(ElementUtil.argumentsToUserParameters(valueSupposeMock));
|
scenarioTree.add(ElementUtil.argumentsToUserParameters(valueSupposeMock));
|
||||||
|
} else {
|
||||||
|
scenarioTree.add(valueSupposeMock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.variableEnable == null || this.variableEnable) {
|
if (this.variableEnable == null || this.variableEnable) {
|
||||||
|
|
Loading…
Reference in New Issue