From 3748463cafa6c0aaf0a493e10a98b28190b33833 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 16 Apr 2024 10:43:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96sql=E5=89=8D=E5=90=8E=E7=BD=AE=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=94=BE=E7=BD=AE=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jmeter/processor/SqlProcessorConverter.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/SqlProcessorConverter.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/SqlProcessorConverter.java index a1c3708148..0850f57c18 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/SqlProcessorConverter.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/SqlProcessorConverter.java @@ -90,15 +90,13 @@ public abstract class SqlProcessorConverter extends MsProcessorConverter { + String script = """ + vars.put("%s","${%s}"); + """; + scriptBuilder.append(String.format(script, keyValue.getKey(), keyValue.getValue())); + }); processor.setProperty(JmeterProperty.SCRIPT, scriptBuilder.toString()); - return processor; }