refactor: API插件同时支持接口定义和场景步骤
This commit is contained in:
parent
46ed32d7d0
commit
b50d6652d1
|
@ -0,0 +1,5 @@
|
|||
package io.metersphere.plugin.api.constants;
|
||||
|
||||
public enum JMeterStepType {
|
||||
SAMPLER, LOGIC_CONTROLLER, PRE_PROCESSOR, POST_PROCESSOR, ASSERTION, TIMER
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
package io.metersphere.plugin.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公共传递参数基类
|
||||
*/
|
||||
@Data
|
||||
public class BaseConfigDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.metersphere.plugin.api.dto;
|
||||
|
||||
import io.metersphere.plugin.api.constants.JMeterStepType;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
@ -14,16 +15,15 @@ public class ScriptDTO {
|
|||
private String name;
|
||||
|
||||
/**
|
||||
* 这个参数非常重要,对应继承 MsTestElement的类全名
|
||||
* 如:io.xx.MsThriftSample
|
||||
*/
|
||||
private String clazzName;
|
||||
|
||||
/**
|
||||
* 插件实现的jmeter基类
|
||||
* 对应JMeter的步骤分类
|
||||
* 如:请求的基类
|
||||
*/
|
||||
private String jmeterClazz;
|
||||
private JMeterStepType stepType;
|
||||
|
||||
/**
|
||||
* 协议分类 如:HTTP,TCP,JDBC,JMS,WEBSOCKET等
|
||||
*/
|
||||
private String protocol;
|
||||
|
||||
/**
|
||||
* 表单基本参数
|
||||
|
@ -35,32 +35,4 @@ public class ScriptDTO {
|
|||
* 表单脚本内容
|
||||
*/
|
||||
private String formScript;
|
||||
|
||||
public ScriptDTO() {
|
||||
|
||||
}
|
||||
|
||||
public ScriptDTO(String id, String name, String clazzName, String script) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.clazzName = clazzName;
|
||||
this.formScript = script;
|
||||
}
|
||||
|
||||
public ScriptDTO(String id, String name, String clazzName, String script, String option) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.clazzName = clazzName;
|
||||
this.formScript = script;
|
||||
this.formOption = option;
|
||||
}
|
||||
|
||||
public ScriptDTO(String id, String name, String clazzName, String jmeterClazz, String script, String option) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.clazzName = clazzName;
|
||||
this.jmeterClazz = jmeterClazz;
|
||||
this.formScript = script;
|
||||
this.formOption = option;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue