fix(测试计划): 修复执行接口用例的设置环境变量脚本时环境变量设置的不是使用环境的问题
--bug=1044094 --user=宋天阳 【测试计划】github#32100CASE使用环境变量更新脚本更新变量值,其放在测试计划内执行时更新的仍然是原CASE内保存对应环境内的变量值,而不是执行测试计划时选择的新环境 https://www.tapd.cn/55049933/s/1551295
This commit is contained in:
parent
c9bff41e3c
commit
20b3174657
|
@ -261,7 +261,13 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
if (this.getEnvironmentId() == null) {
|
if (this.getEnvironmentId() == null) {
|
||||||
el.setEnvironmentId(useEnvironment);
|
el.setEnvironmentId(useEnvironment);
|
||||||
} else {
|
} else {
|
||||||
el.setEnvironmentId(this.getEnvironmentId());
|
// http内部的子组件, 实际使用ID以useEnvironment为准
|
||||||
|
if (StringUtils.isEmpty(this.useEnvironment)) {
|
||||||
|
el.setEnvironmentId(this.getEnvironmentId());
|
||||||
|
} else {
|
||||||
|
el.setEnvironmentId(this.useEnvironment);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
el.toHashTree(httpSamplerTree, el.getHashTree(), config);
|
el.toHashTree(httpSamplerTree, el.getHashTree(), config);
|
||||||
|
|
Loading…
Reference in New Issue