From 62a6af8758a8b7c32c55ec55ffa7259b555d25bf Mon Sep 17 00:00:00 2001 From: q4speed Date: Mon, 12 Oct 2020 13:09:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9D=A1=E4=BB=B6=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E5=88=A4=E6=96=ADbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/model/ScenarioModel.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index 7e6c44c8d6..fb32d13cab 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -1219,21 +1219,22 @@ class JMXGenerator { if (request.controller.isValid() && request.controller.enable) { if (request.controller instanceof IfController) { let name = request.controller.label(); - let variable = request.controller.variable; + let variable = "\"" + request.controller.variable + "\""; let operator = request.controller.operator; - let value = request.controller.value; + let value = "\"" + request.controller.value + "\""; + if (operator === "=~" || operator === "!~") { - value = "\".*" + value + ".*\""; + value = "\".*" + request.controller.value + ".*\""; } if (operator === "is empty") { - variable = "empty(\"" + variable + "\")"; + variable = "empty(" + variable + ")"; operator = ""; value = ""; } if (operator === "is not empty") { - variable = "!empty(\"" + variable + "\")"; + variable = "!empty(" + variable + ")"; operator = ""; value = ""; }