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; }