diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterAlias.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterAlias.java index 01b71479e8..7a339359b1 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterAlias.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterAlias.java @@ -21,4 +21,5 @@ public class JmeterAlias { public static final String HEADER_PANEL = "HeaderPanel"; public static final String AUTH_PANEL = "AuthPanel"; public static final String ARGUMENTS_PANEL = "ArgumentsPanel"; + public static final String BEAN_SHELL_ASSERTION_GUI = "BeanShellAssertionGui"; } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterProperty.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterProperty.java index d884da0d0d..85d7e932d5 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterProperty.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/constants/JmeterProperty.java @@ -9,4 +9,5 @@ public class JmeterProperty { public static final String CACHE_KEY = "cacheKey"; public static final String SCRIPT_LANGUAGE = "scriptLanguage"; public final static String ASS_OPTION = "ASS_OPTION"; + public final static String BEAN_SHELL_ASSERTION_QUERY = "BeanShellAssertion.query"; } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/assertion/ScriptAssertionConverter.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/assertion/ScriptAssertionConverter.java index fda587205c..19095f4f96 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/assertion/ScriptAssertionConverter.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/assertion/ScriptAssertionConverter.java @@ -1,5 +1,7 @@ package io.metersphere.api.parser.jmeter.processor.assertion; +import io.metersphere.api.parser.jmeter.constants.JmeterAlias; +import io.metersphere.api.parser.jmeter.constants.JmeterProperty; import io.metersphere.api.parser.jmeter.processor.ScriptProcessorConverter; import io.metersphere.plugin.api.dto.ParameterConfig; import io.metersphere.project.api.assertion.MsScriptAssertion; @@ -9,6 +11,7 @@ import io.metersphere.sdk.util.BeanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.assertions.BeanShellAssertion; import org.apache.jmeter.assertions.JSR223Assertion; +import org.apache.jmeter.save.SaveService; import org.apache.jmeter.testelement.TestElement; import org.apache.jorphan.collections.HashTree; @@ -25,13 +28,21 @@ public class ScriptAssertionConverter extends AssertionConverter