fix(接口测试): 条件控制器兼容拼接函数
--bug=1015823 --user=赵勇 【接口测试】github#16871,jemter函数${__V拼接变量在条件控制器中不生效 https://www.tapd.cn/55049933/s/1227720
This commit is contained in:
parent
ecac76c122
commit
357d14dff6
|
@ -103,7 +103,8 @@ public class MsIfController extends MsTestElement {
|
||||||
|
|
||||||
public String getCondition() {
|
public String getCondition() {
|
||||||
String key = getContentValue();
|
String key = getContentValue();
|
||||||
String variable = (StringUtils.isEmpty(key) || key.equals(this.variable)) ? "\"" + this.variable + "\"" : "vars.get('" + key + "')";
|
String variable = (StringUtils.isEmpty(key) || key.equals(this.variable)) || key.startsWith("__V") ?
|
||||||
|
StringUtils.join("\"", this.variable, "\"") : StringUtils.join("vars.get('", key, "')");
|
||||||
String operator = this.operator;
|
String operator = this.operator;
|
||||||
String value;
|
String value;
|
||||||
if (StringUtils.equals(operator, "<") || StringUtils.equals(operator, ">")) {
|
if (StringUtils.equals(operator, "<") || StringUtils.equals(operator, ">")) {
|
||||||
|
|
Loading…
Reference in New Issue