From d20f596363976877bdca931534df68a00c988c78 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Fri, 22 Dec 2023 16:58:01 +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=96=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/api/spi/AbstractMsTestElement.java | 22 +++++++++++++++---- .../api/dto/request/http/KeyValueParam.java | 4 ---- .../parser/jmeter/MsHTTPElementConverter.java | 6 +++++ .../controller/ApiDebugControllerTests.java | 11 +++++++++- .../system/service/PluginLoadService.java | 2 +- 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/backend/framework/plugin/plugin-api-sdk/src/main/java/io/metersphere/plugin/api/spi/AbstractMsTestElement.java b/backend/framework/plugin/plugin-api-sdk/src/main/java/io/metersphere/plugin/api/spi/AbstractMsTestElement.java index f0d8b061e4..b0ec2305bf 100644 --- a/backend/framework/plugin/plugin-api-sdk/src/main/java/io/metersphere/plugin/api/spi/AbstractMsTestElement.java +++ b/backend/framework/plugin/plugin-api-sdk/src/main/java/io/metersphere/plugin/api/spi/AbstractMsTestElement.java @@ -15,11 +15,25 @@ import java.util.LinkedList; @JsonIgnoreProperties(ignoreUnknown = true) public abstract class AbstractMsTestElement implements MsTestElement { - // 组件标签名称 + /** + * 步骤ID(唯一) + */ + private String stepId; + /** + * 关联的资源ID(用例ID/接口ID/场景ID)等 + */ + private String resourceId; + /** + * 组件标签名称 + */ private String name; - // 是否启用 - private Boolean enable = true; - // 子组件 + /** + * 是否启用 + */ + private Boolean enable = true; + /** + * 子组件 + */ private LinkedList children; } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/request/http/KeyValueParam.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/request/http/KeyValueParam.java index 8af638cf7a..cc3d706e00 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/request/http/KeyValueParam.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/request/http/KeyValueParam.java @@ -9,10 +9,6 @@ import org.apache.commons.lang3.StringUtils; */ @Data public class KeyValueParam { - /** - * 参数ID - */ - private String id; /** * 键 */ diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/MsHTTPElementConverter.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/MsHTTPElementConverter.java index d176b513ba..19e2210b3f 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/MsHTTPElementConverter.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/MsHTTPElementConverter.java @@ -9,6 +9,8 @@ import io.metersphere.api.parser.jmeter.body.MsFormDataBodyConverter; import io.metersphere.api.parser.jmeter.body.MsWWWFormBodyConverter; import io.metersphere.plugin.api.dto.ParameterConfig; import io.metersphere.plugin.api.spi.AbstractJmeterElementConverter; +import io.metersphere.sdk.util.LogUtils; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy; import org.apache.jmeter.save.SaveService; @@ -28,6 +30,10 @@ public class MsHTTPElementConverter extends AbstractJmeterElementConverter