fix(接口测试): 修复条件控制器判断bug
This commit is contained in:
parent
6d15cfb6e1
commit
62a6af8758
|
@ -1219,21 +1219,22 @@ class JMXGenerator {
|
||||||
if (request.controller.isValid() && request.controller.enable) {
|
if (request.controller.isValid() && request.controller.enable) {
|
||||||
if (request.controller instanceof IfController) {
|
if (request.controller instanceof IfController) {
|
||||||
let name = request.controller.label();
|
let name = request.controller.label();
|
||||||
let variable = request.controller.variable;
|
let variable = "\"" + request.controller.variable + "\"";
|
||||||
let operator = request.controller.operator;
|
let operator = request.controller.operator;
|
||||||
let value = request.controller.value;
|
let value = "\"" + request.controller.value + "\"";
|
||||||
|
|
||||||
if (operator === "=~" || operator === "!~") {
|
if (operator === "=~" || operator === "!~") {
|
||||||
value = "\".*" + value + ".*\"";
|
value = "\".*" + request.controller.value + ".*\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operator === "is empty") {
|
if (operator === "is empty") {
|
||||||
variable = "empty(\"" + variable + "\")";
|
variable = "empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operator === "is not empty") {
|
if (operator === "is not empty") {
|
||||||
variable = "!empty(\"" + variable + "\")";
|
variable = "!empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue