fix(接口测试): 条件控制器兼容拼接函数

--bug=1015823 --user=赵勇 【接口测试】github#16871,jemter函数${__V拼接变量在条件控制器中不生效 https://www.tapd.cn/55049933/s/1227720
This commit is contained in:
fit2-zhao 2022-08-19 14:27:31 +08:00 committed by fit2-zhao
parent 1aabb57982
commit 611788b01b
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ public class MsIfController extends MsTestElement {
public String getCondition() {
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 value;
if (StringUtils.equals(operator, "<") || StringUtils.equals(operator, ">")) {