build: 重置文件夹

This commit is contained in:
CaptainB 2023-04-06 14:50:17 +08:00
parent 2c828cf839
commit ce1a3694ba
4719 changed files with 313 additions and 662861 deletions

View File

@ -1,27 +0,0 @@
FROM registry.cn-qingdao.aliyuncs.com/metersphere/alpine-openjdk17-jre
LABEL maintainer="FIT2CLOUD <support@fit2cloud.com>"
ARG MS_VERSION=dev
ARG DEPENDENCY=backend/target/dependency
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
# html 文件
COPY backend/src/main/resources/public /app/public
# 静态文件
COPY backend/src/main/resources/static /app/static
RUN mv /app/lib/ms-jmeter-core-*.jar /app/lib/ms-jmeter-core.jar
RUN mv /app/jmeter /opt/
ENV JAVA_CLASSPATH=/app:/app/lib/ms-jmeter-core.jar:/opt/jmeter/lib/ext/*:/app/lib/*
ENV JAVA_MAIN_CLASS=io.metersphere.ApiApplication
ENV MS_VERSION=${MS_VERSION}
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED"
CMD ["/deployments/run-java.sh"]

View File

@ -1,178 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.metersphere</groupId>
<artifactId>api-test-parent</artifactId>
<version>${revision}</version>
</parent>
<artifactId>api-test</artifactId>
<dependencies>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>sdk</artifactId>
<version>${revision}</version>
<exclusions>
<exclusion>
<artifactId>poi</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>xpack-interface</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.json</include>
<include>**/*.tpl</include>
<include>**/*.js</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/static</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>src/main/resources/public</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>main-class-placement</id>
<phase>generate-resources</phase>
<configuration>
<skip>${skipAntRunForJenkins}</skip>
<target>
<copy todir="src/main/resources/static">
<fileset dir="../frontend/dist">
<exclude name="*.html"/>
</fileset>
</copy>
<copy todir="src/main/resources/public">
<fileset dir="../frontend/dist">
<include name="*.html"/>
</fileset>
</copy>
<copy todir="src/main/resources/static/assets">
<fileset dir="../../framework/sdk-parent/frontend/src/assets"/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_functions</artifactId>
<version>${jmeter.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>src/main/resources/jmeter/lib/ext</outputDirectory>
<destFileName>ApacheJMeter_functions.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>io.metersphere</groupId>
<artifactId>metersphere-jmeter-functions</artifactId>
<version>${metersphere-jmeter-functions.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>src/main/resources/jmeter/lib/ext</outputDirectory>
<destFileName>metersphere-jmeter-functions.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>${jython.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>src/main/resources/jmeter/lib/ext</outputDirectory>
<destFileName>jython-standalone.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/wars</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,34 +0,0 @@
package io.metersphere;
import io.metersphere.config.JmeterProperties;
import io.metersphere.config.KafkaProperties;
import io.metersphere.config.MinioProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.PropertySource;
@SpringBootApplication(exclude = {
QuartzAutoConfiguration.class,
LdapAutoConfiguration.class,
Neo4jAutoConfiguration.class
})
@PropertySource(value = {
"classpath:commons.properties",
"file:/opt/metersphere/conf/metersphere.properties",
}, encoding = "UTF-8", ignoreResourceNotFound = true)
@ServletComponentScan
@EnableConfigurationProperties({
KafkaProperties.class,
MinioProperties.class,
JmeterProperties.class
})
public class ApiApplication {
public static void main(String[] args) {
SpringApplication.run(ApiApplication.class, args);
}
}

View File

@ -1,12 +0,0 @@
package io.metersphere.api.dto;
import lombok.Data;
@Data
public class ApiCaseBasicInfoDTO {
private String id;
private String apiId;
private String name;
private String projectId;
private String versionId;
}

View File

@ -1,19 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiCaseEditRequest extends ApiTestCaseWithBLOBs {
private List<String> ids;
private List<OrderRequest> orders;
private String projectId;
private String environmentId;
private ApiTestCaseRequest condition;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiCaseExportJmxRequest {
private List<String> caseIds;
private String envId;
}

View File

@ -1,49 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.automation.ApiScenarioRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiCaseRelevanceRequest {
/**
* 测试计划ID
*/
private String planId;
private String environmentId;
/**
* 具体要关联的用例
*/
private List<String> selectIds = new ArrayList<>();
/**
* 项目环境对应关系
*/
private Map<String, String> envMap;
/**
* 用例的环境的对应关系
*/
private Map<String, List<String>> mapping;
/**
* 测试评审ID
*/
private String reviewId;
private String environmentType;
private String envGroupId;
private List<String> ids;
private ApiScenarioRequest condition;
private Boolean allowedRepeatCase = false;
}

View File

@ -1,28 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
import io.metersphere.base.domain.ApiDefinitionExecResultWithBLOBs;
import io.metersphere.dto.RunModeConfigDTO;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiCaseRunRequest {
private String reportId;
private String triggerMode;
private String id;
private List<String> ids;
private List<OrderRequest> orders;
private String projectId;
private String environmentId;
private RunModeConfigDTO config;
private ApiTestCaseRequest condition;
// 失败重跑
private boolean isRerun;
private Map<String, ApiDefinitionExecResultWithBLOBs> executeQueue;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiCountChartResult {
private String groupName;
private long countNum;
public String getCountNumStr() {
return String.valueOf(countNum);
}
}

View File

@ -1,80 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiCountRequest {
//x轴字段
private String xaxis;
//y轴字段
private List<String> yaxis;
//搜索条件
private String projectId;
private String timeType;
private TimeFilter timeFilter;
private List<Long> times;
private String order;
//起始时间
private long startTime = 0;
//结束时间
private long endTime = 0;
//其余条件
private String filterType;
private List<Map<String, Object>> filters;
/**
* 功能用例接口用例场景用例性能用例的分组字段
*/
private String testCaseGroupColumn;
private String apiCaseGroupColumn;
private String scenarioCaseGroupColumn;
private String loadCaseGroupColumn;
/**
* filter整理后的查询数据
*
* @return
*/
private Map<String, List<String>> filterSearchList;
private Map<String, List<String>> apiFilterSearchList;
private Map<String, List<String>> loadFilterSearchList;
public int getTimeRange() {
if (timeFilter != null) {
return timeFilter.getTimeRange();
} else {
return 0;
}
}
public String getTimeRangeUnit() {
if (timeFilter != null) {
return timeFilter.getTimeRangeUnit();
} else {
return null;
}
}
public void setFilterSearchList(String key, List<String> values) {
if (this.filterSearchList == null) {
this.filterSearchList = new HashMap<>();
}
filterSearchList.put(key, values);
}
}
@Getter
@Setter
class TimeFilter {
private int timeRange;
private String timeRangeUnit;
}

View File

@ -1,43 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.dto.RequestResult;
import lombok.Data;
@Data
public class ApiDefinitionExecResultDTO {
private String id;
private String name;
private String resourceId;
private String status;
private String userId;
private Long startTime;
private Long endTime;
private Long createTime;
private String type;
private String actuator;
private String triggerMode;
private String errorCode;
private String versionId;
private String projectId;
private String integratedReportId;
private long totalAssertions = 0;
private long passAssertions = 0;
private RequestResult requestResult;
}

View File

@ -1,12 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.request.ProjectRequest;
import lombok.Data;
import java.util.List;
@Data
public class ApiProjectRequest extends ProjectRequest {
private List<String> workspaceIds;
}

View File

@ -1,25 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiReportBatchRequest extends QueryAPIReportRequest {
private List<String> ids;
/**
* isSelectAllDate选择的数据是否是全部数据全部数据是不受分页影响的数据
* filters: 数据状态
* name如果是全部数据那么表格如果历经查询查询参数是什么
* moduleIds 哪些模块的数据
* unSelectIds是否在页面上有未勾选的数据有的话他们的ID是哪些
* filters/name/moduleIds/unSeelctIds 只在isSelectAllDate为true时需要为了让程序能明确批量的范围
*/
private boolean isSelectAllDate;
private List<String> unSelectIds;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ApiReportEnvConfigDTO {
private String envName;
private String resourcePoolName;
}

View File

@ -1,22 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.ApiTestReport;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiReportResult extends ApiTestReport {
private String testName;
private String projectName;
private String userName;
private List<String> scenarioIds;
private String content;
}

View File

@ -1,18 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class ApiScenarioEnvRequest {
private String definition;
private String environmentType;
private String environmentGroupId;
private Map<String, String> environmentMap;
private Boolean environmentEnable = false;
private String id;
}

View File

@ -1,24 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
/**
* @author song.tianyang
* @Date 2022/4/9 3:50 下午
*/
@Getter
@Setter
public class ApiScenarioReportBaseInfoDTO {
private String reqName;
private boolean reqSuccess;
private int reqError;
private long reqStartTime;
private String rspCode;
private long rspTime;
private String uiImg;
private String uiScreenshots;
private String combinationImg;
private Boolean isNotStep;
private String reportId;
}

View File

@ -1,47 +0,0 @@
package io.metersphere.api.dto;
import lombok.Data;
import java.util.LinkedHashMap;
import java.util.List;
@Data
public class ApiScenarioReportDTO {
private List<StepTreeDTO> steps;
private String console;
private long totalTime;
private long total;
private long error;
private long errorCode;
private long unExecute;
private long scenarioTotal;
private long scenarioError;
private long scenarioSuccess;
private long scenarioErrorReport;
private long scenarioUnExecute;
private long scenarioStepTotal;
private long scenarioStepError;
private long scenarioStepSuccess;
private long scenarioStepErrorReport;
private long scenarioStepPending;
private long totalAssertions = 0;
private long passAssertions = 0;
private long errorCodeAssertions = 0;
private String actuator;
private String name;
private String envConfig;
//<项目名称<环境名称>>
private LinkedHashMap<String, List<String>> projectEnvMap;
private String mode;
private String poolName;
}

View File

@ -1,44 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.definition.request.auth.MsAuthManager;
import io.metersphere.api.dto.scenario.KeyValue;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiTestImportRequest {
private String name;
private String id;
private String moduleId;
private String modulePath;
private String environmentId;
private String projectId;
private String platform;
private Boolean useEnvironment;
private String swaggerUrl;
private String fileName;
private String resourceId;
//导入策略
private String modeId;
private String userId;
private String versionId; // 新导入选择的版本
private String updateVersionId; // 覆盖导入已存在的接口选择的版本
private String defaultVersion;
//调用类型
private String type;
// 是否开启自定义ID
private Boolean openCustomNum = false;
// 鉴权相关
private List<KeyValue> headers;
private List<KeyValue> arguments;
private MsAuthManager authManager;
// 是否覆盖模块
private Boolean coverModule;
// 当前协议
private String protocol;
//上传文件来源目前用于辨别是否是idea插件
private String origin;
}

View File

@ -1,12 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.request.BodyFile;
import lombok.Data;
import java.util.List;
@Data
public class BodyFileRequest {
private String reportId;
private List<BodyFile> bodyFiles;
}

View File

@ -1,17 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.CustomFunctionWithBLOBs;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class CustomFunctionRequest extends CustomFunctionWithBLOBs {
private Map<String, List<String>> filters;
private List<OrderRequest> orders;
}

View File

@ -1,36 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class DeleteAPIReportRequest {
private String id;
private List<String> ids;
/**
* isSelectAllDate选择的数据是否是全部数据全部数据是不受分页影响的数据
* filters: 数据状态
* name如果是全部数据那么表格如果历经查询查询参数是什么
* moduleIds 哪些模块的数据
* unSelectIds是否在页面上有未勾选的数据有的话他们的ID是哪些
* filters/name/moduleIds/unSeelctIds 只在isSelectAllDate为true时需要为了让程序能明确批量的范围
*/
private boolean isSelectAllDate;
private List<String> filters;
private String name;
private String projectId;
private List<String> moduleIds;
private List<String> unSelectIds;
private Boolean isUi;
}

View File

@ -1,20 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author song.tianyang
* @Date 2021/7/19 10:52 上午
*/
@Getter
@Setter
public class DeleteCheckResult {
boolean deleteFlag;
List<String> checkMsg;
int refCount;
int scenarioCount;
int planCount;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto;
import lombok.Data;
import java.util.List;
@Data
public class DubboProvider {
private String version;
private String service;
private String serviceInterface;
private List<String> methods;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.api.dto;
/**
* @author lyh
*/
public enum EnvironmentType {
/**
* 环境
*/
JSON,
/**
* 环境组
*/
GROUP
}

View File

@ -1,32 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.dto.RequestResult;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
@Getter
@Setter
public class FakeErrorLibraryDTO {
private List<String> errorCodeList;
private RequestResult result;
private String requestStatus;
public FakeErrorLibraryDTO() {
this.errorCodeList = new ArrayList<>();
}
public String getErrorCodeStr() {
if (CollectionUtils.isNotEmpty(this.errorCodeList)) {
String errorCodeStr = StringUtils.join(this.errorCodeList, ";");
return errorCodeStr;
} else {
return StringUtils.EMPTY;
}
}
}

View File

@ -1,11 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class FileOperationRequest {
private String id;
private String name;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.FileMetadata;
import lombok.Getter;
import lombok.Setter;
import org.apache.jorphan.collections.HashTree;
import java.util.List;
@Getter
@Setter
public class HashTreeInfoDTO {
private String jmx;
private HashTree hashTree;
private List<FileMetadata> repositoryFiles;
}

View File

@ -1,48 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.FileMetadata;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author song.tianyang
* @Date 2021/1/5 5:48 下午
* @Description
*/
@Getter
@Setter
public class JmxInfoDTO {
private String name;
private String xml;
private String id;
private Integer version;
private Map<String, String> attachFiles;
private List<FileMetadata> fileMetadataList;
public JmxInfoDTO(String name, String xml, Map<String, String> attachFiles) {
this.name = StringUtils.replace(name, "/", StringUtils.EMPTY);
this.xml = xml;
this.attachFiles = attachFiles;
}
public void setName(String name) {
this.name = StringUtils.replace(name, "/", StringUtils.EMPTY);
}
public void addFileMetadataLists(List<FileMetadata> list) {
if (CollectionUtils.isNotEmpty(list)) {
List<String> fileMetadataIds = fileMetadataList.stream().map(FileMetadata::getId).collect(Collectors.toList());
list.forEach(item -> {
if (!fileMetadataIds.contains(item.getId())) {
fileMetadataList.add(item);
}
});
}
}
}

View File

@ -1,21 +0,0 @@
package io.metersphere.api.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
*/
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class MsgDTO {
private String reportId;
private String toReport;
private boolean execEnd;
private String runMode;
private String content;
}

View File

@ -1,10 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ParseTreeDataDTO {
private String stringData;
}

View File

@ -1,34 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class QueryAPIReportRequest {
private String id;
private String projectId;
private String name;
private String workspaceId;
private String userId;
private String reportType;
private boolean recent;
private Boolean isUi = false;
private List<OrderRequest> orders;
private Map<String, List<String>> filters;
private Map<String, Object> combine;
private String selectDataType;
private String selectDataRange;
private String versionId;
/**
* 查询哪种用例的报告 SCENARIO/API
*/
private String caseType;
private String limit;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.request.BaseQueryRequest;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class QueryReferenceRequest extends BaseQueryRequest {
private String scenarioId;
private String apiId;
private String loadId;
private String projectId;
private String workspaceId;
private String id;
}

View File

@ -1,46 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.TestPlan;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class QueryTestPlanRequest extends TestPlan {
private boolean recent = false;
private List<String> planIds;
private String scenarioId;
private String apiId;
private String loadId;
private List<OrderRequest> orders;
private Map<String, List<String>> filters;
private Map<String, Object> combine;
private String projectId;
private String projectName;
/**
* 执行人或者负责人
*/
private String executorOrPrincipal;
/**
* 是否通过筛选条件查询这个字段针对我的工作台-页面列表上的筛选做特殊处理
*/
private boolean byFilter;
private List<String> filterStatus;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto;
import lombok.Data;
@Data
public class RegistryCenter {
private String protocol;
private String group;
private String username;
private String address;
private String password;
private String timeout;
}

View File

@ -1,26 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class RelevanceScenarioRequest {
private List<String> ids;
/**
* 环境和项目对应关系
*/
private Map<String, String> envMap;
/**
* 场景用例跨项目的关系
*/
private Map<String, List<String>> mapping;
private String environmentType;
private String envGroupId;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class ReplaceFileIdRequest {
private String newFileMetadataId;
private String oldFileMetadataId;
private List<String> apiIdList = new ArrayList<>();
private List<String> apiTestCaseIdList = new ArrayList<>();
private List<String> apiScenarioIdList = new ArrayList<>();
}

View File

@ -1,59 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.base.domain.ApiScenarioReportResultWithBLOBs;
import io.metersphere.commons.utils.JSON;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.dto.RequestResult;
import io.metersphere.dto.ResponseResult;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class RequestResultExpandDTO extends RequestResult {
private String status;
private String uiImg;
private String uiScreenshots;
private String combinationImg;
private String reportId;
private long time;
private Map<String, String> attachInfoMap;
private String poolName;
private String envName;
public RequestResultExpandDTO() {
}
public RequestResultExpandDTO(String name, String status) {
this.setName(name);
this.setStatus(status);
}
public RequestResultExpandDTO(ApiScenarioReportResultWithBLOBs requestResult) {
if (requestResult.getBaseInfo() != null) {
try {
ApiScenarioReportBaseInfoDTO dto = JSON.parseObject(requestResult.getBaseInfo(), ApiScenarioReportBaseInfoDTO.class);
this.setName(dto.getReqName());
this.setSuccess(dto.isReqSuccess());
this.setError(dto.getReqError());
this.setStartTime(dto.getReqStartTime());
this.setTime(dto.getRspTime());
this.setEndTime(dto.getRspTime() - dto.getReqStartTime());
this.setUiImg(dto.getUiImg());
this.setUiScreenshots(dto.getUiScreenshots());
this.setCombinationImg(dto.getCombinationImg());
this.setReportId(dto.getReportId());
this.setStatus(requestResult.getStatus());
ResponseResult responseResult = this.getResponseResult();
responseResult.setResponseCode(dto.getRspCode());
responseResult.setResponseTime(dto.getRspTime());
this.setResponseResult(responseResult);
} catch (Exception e) {
LogUtil.error("Parse report base-info error :" + e.getMessage());
}
}
}
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class RunModeConfigWithEnvironmentDTO extends RunModeConfigDTO {
// 接口/用例在运行时采用的环境信息 <项目ID , <环境ID>>
private Map<String, List<String>> executionEnvironmentMap;
}

View File

@ -1,31 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.automation.ApiScenarioReportResult;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.base.domain.UiScenarioWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class RunModeDataDTO {
// 执行HashTree
private ApiScenarioWithBLOBs scenario;
private UiScenarioWithBLOBs uiScenario;
// 测试场景/测试用例
private String testId;
private String reportId;
// 初始化报告
private ApiScenarioReportResult report;
//
private String apiCaseId;
private Map<String, String> planEnvMap;
public RunModeDataDTO() {
}
}

View File

@ -1,7 +0,0 @@
package io.metersphere.api.dto;
public class RunningParamKeys {
public static final String RUNNING_DEBUG_SAMPLER_NAME = "RunningDebugSampler";
public static final String API_ENVIRONMENT_ID = "${__metersphere_env_id}";
public static final String RUNNING_PARAMS_PREFIX = "MS.ENV.";
}

View File

@ -1,19 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.automation.TestPlanScenarioRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author song.tianyang
* @Date 2021/4/6 5:32 下午
* @Description
*/
@Getter
@Setter
public class ScenarioCaseBatchCondition extends TestPlanScenarioRequest {
private boolean selectAll;
private List<String> unSelectIds;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.HashSet;
import java.util.Set;
@Getter
@Setter
public class ScenarioEnv {
private Set<String> projectIds = new HashSet<>();
private Boolean fullUrl = true;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.HashSet;
import java.util.Set;
@Getter
@Setter
public class ScenarioIdProjectInfo {
private Set<String> projectIds = new HashSet<>();
private String id;
}

View File

@ -1,41 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.api.dto.definition.request.auth.MsAuthManager;
import io.metersphere.api.dto.scenario.KeyValue;
import io.metersphere.base.domain.Schedule;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author song.tianyang
* @Date 2021/3/12 12:57 下午
* @Description
*/
@Getter
@Setter
public class ScheduleRequest extends Schedule {
//定时任务来源 测试计划/测试场景
private String scheduleFrom;
private String projectId;
private String moduleId;
private String modulePath;
private String modeId;
private String swaggerUrl;
private String taskId;
// 鉴权相关
private List<KeyValue> headers;
private List<KeyValue> arguments;
private MsAuthManager authManager;
private Boolean coverModule = false;
}

View File

@ -1,46 +0,0 @@
package io.metersphere.api.dto;
import io.metersphere.dto.RequestResult;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.LinkedList;
import java.util.List;
@Data
public class StepTreeDTO {
private String type;
// ui 指令的类型
private String cmdType;
private int index;
private String resourceId;
private String label;
private RequestResult value;
private String allIndex;
private String stepId;
// 某个场景未执行总量
private int unExecuteTotal;
//误报库编码
private String errorCode;
/**
* 该步骤的状态RequestResult为空时通过子步骤的结果来判断
* 当有多个子步骤结果时如果当前步骤不是场景失败>误报>未执行>成功>未执行 如果是场景误报>失败>成功>未执行
*/
private String totalStatus;
private List<StepTreeDTO> children;
public StepTreeDTO() {
}
public StepTreeDTO(String name, String resourceId, String type, String stepId, int index) {
this.label = StringUtils.isNotEmpty(name) ? name : type;
this.resourceId = resourceId;
this.type = type;
this.index = index;
this.stepId = stepId;
this.children = new LinkedList<>();
}
}

View File

@ -1,41 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiScenarioBatchRequest extends ApiScenarioWithBLOBs {
private List<String> ids;
private String id;
private String name;
private String projectId;
private String environmentId;
private ApiScenarioRequest condition;
/**
* 环境和项目对应关系
*/
private Map<String, String> envMap;
/**
* 场景用例跨项目的关系
*/
private Map<String, List<String>> mapping;
/**
* 批量编辑标签
*/
private List<String> tagList;
private String type;
/**
* 默认覆盖原标签
*/
private boolean appendTag = false;
}

View File

@ -1,38 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiScenarioDTO extends ApiScenarioWithBLOBs {
private String projectName;
private String userName;
private String creatorName;
private String principalName;
private List<String> tagNames;
private String deleteUser;
private String versionName;
private Boolean versionEnable;
/**
* 场景跨项目ID
*/
private List<String> projectIds;
private String caseId;
private String environment;
/**
* 场景列表 环境
*/
private String env;
private Map<String, String> environmentMap;
private String creator;
private String workspaceName;
private String workspaceId;
}

View File

@ -1,28 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.FileMetadata;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiScenarioExportJmxDTO {
private String name;
private String id;
private String jmx;
private Integer version;
//性能测试引用场景时需要场景下的附件
private List<FileMetadata> fileMetadataList;
//项目-环境id
private Map<String, List<String>> projectEnvMap;
public ApiScenarioExportJmxDTO(String name, String jmx) {
this.name = StringUtils.replace(name, "/", StringUtils.EMPTY);
this.jmx = jmx;
}
}

View File

@ -1,11 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.dto.TreeNodeDTO;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiScenarioModuleDTO extends TreeNodeDTO<ApiScenarioModuleDTO> {
private String path;
}

View File

@ -1,23 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class ApiScenarioReportInitDTO {
private String id;
private String scenarioId;
private String scenarioName;
private String triggerMode;
private String execType;
private String projectId;
private String userId;
private RunModeConfigDTO config;
private String relevanceTestPlanReportId;
}

View File

@ -1,24 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioReportWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiScenarioReportResult extends ApiScenarioReportWithBLOBs {
private String testName;
private String projectName;
private String testId;
private String userName;
private List<String> scenarioIds;
private String content;
}

View File

@ -1,45 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.request.BaseQueryRequest;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiScenarioRequest extends BaseQueryRequest {
private String id;
private String excludeId;
private String moduleId;
private String name;
private String userId;
private String planId;
private boolean recent = false;
private boolean isSelectThisWeedData;
private long createTime = 0;
private long scheduleCreateTime = 0;
private String executeStatus;
private String selectDataType;
private String selectDataRange;
private boolean notInTestPlan;
private String reviewId;
private String versionId;
private String refId;
private Boolean allowedRepeatCase = false;
//操作人
private String operator;
//操作时间
private Long operationTime;
/**
* 是否需要查询环境字段
*/
private boolean selectEnvironment = false;
// 查询功能用例需要关联的场景测试列表
private String testCaseId;
//测试计划关联场景过滤掉步骤为0的场景
private String stepTotal;
//场景引用类型
private String refType;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiScenrioExportResult {
private String projectId;
private String version;
private List<ApiScenarioWithBLOBs> data;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiTestReport;
import lombok.Data;
@Data
public class ApiTestReportVariable extends ApiTestReport {
public String executionTime;
public String executor;
public String environment;
public String principal;
private String projectId;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioModule;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class DragApiScenarioModuleRequest extends ApiScenarioModule {
List<String> nodeIds;
ApiScenarioModuleDTO nodeTree;
}

View File

@ -1,5 +0,0 @@
package io.metersphere.api.dto.automation;
public enum ExecuteType {
Saved, Completed, Debug, Marge
}

View File

@ -1,47 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class GenScenarioRequest extends ApiScenarioWithBLOBs {
private String reportId;
private String environmentId;
private String triggerMode;
private String executeType;
private String runMode;
/**
* 测试情景和测试计划的关联ID
*/
private String planScenarioId;
private List<String> planCaseIds;
private List<String> ids;
private String reportUserID;
private Map<String, String> scenarioTestPlanIdMap;
private ApiScenarioRequest condition;
private RunModeConfigDTO config;
private boolean isTestPlanScheduleJob = false;
//生成测试报告当isTestPlanScheduleJob为true时使用
private String testPlanReportId;
private String requestOriginator;
}

View File

@ -1,23 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.api.dto.scenario.DatabaseConfig;
import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class ImportPoolsDTO {
private String envId;
private Boolean isCreate;
private EnvironmentConfig envConfig;
private ApiTestEnvironmentWithBLOBs testEnvironmentWithBLOBs;
private Map<String, DatabaseConfig> dataSources;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenario;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ReferenceDTO {
List<ApiScenario> scenarioList;
List<TestPlanDTO> testPlanList;
}

View File

@ -1,50 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.commons.vo.RunPlanScenarioVO;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class RunScenarioRequest {
private String id;
private String reportId;
private String projectId;
private String triggerMode;
private String executeType;
private String runMode;
private List<String> ids;
private String reportUserID;
private ApiScenarioRequest condition;
private RunModeConfigDTO config;
//生成测试报告当isTestPlanScheduleJob为true时使用
private String testPlanReportId;
private String requestOriginator;
// 失败重跑
private boolean isRerun;
private String serialReportId;
private Map<String, ApiScenarioReportResult> reportMap;
private String testPlanId;
// 过程数据整个测试计划执行
private RunPlanScenarioVO processVO;
// 测试计划批量执行传入id
private List<String> planScenarioIds;
}

View File

@ -1,41 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class RunTestPlanScenarioRequest extends ApiScenarioWithBLOBs {
private String reportId;
private String environmentId;
private String triggerMode;
private String executeType;
private String runMode;
/**
* 测试情景和测试计划的关联ID
*/
private String planScenarioId;
private List<String> planCaseIds;
private List<String> ids;
private String reportUserID;
private Map<String, String> scenarioTestPlanIdMap;
private TestPlanScenarioRequest condition;
private RunModeConfigDTO config;
}

View File

@ -1,49 +0,0 @@
package io.metersphere.api.dto.automation;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class SaveApiPlanRequest {
private List<String> planIds;
private List<String> apiIds;
private List<String> scenarioIds;
/**
* isSelectAllDate选择的数据是否是全部数据全部数据是不受分页影响的数据
* filters: 数据状态
* name如果是全部数据那么表格如果历经查询查询参数是什么
* moduleIds 哪些模块的数据
* unSelectIds是否在页面上有未勾选的数据有的话他们的ID是哪些
* filters/name/moduleIds/unSeelctIds 只在isSelectAllDate为true时需要为了让程序能明确批量的范围
*/
private boolean isSelectAllDate;
private Map<String, List<String>> filters;
private String name;
private List<String> moduleIds;
private List<String> unSelectIds;
private String projectId;
/**
* 项目环境对应关系
*/
private Map<String, String> envMap;
/**
* 用例的环境的对应关系
*/
private Map<String, List<String>> mapping;
private String environmentType;
private String envGroupId;
}

View File

@ -1,70 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.plugin.core.MsTestElement;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class SaveApiScenarioRequest {
private String id;
private String projectId;
private String tags;
private String userId;
private String apiScenarioModuleId;
private String environmentId;
private String modulePath;
private String name;
private String level;
private String status;
private String principal;
private Integer stepTotal;
private List<String> follows;
private String schedule;
private String description;
private Integer version;
private MsTestElement scenarioDefinition;
List<String> bodyFileRequestIds;
List<String> scenarioFileIds;
private List<String> scenarioIds;
private boolean isSelectAllDate;
private Map<String, List<String>> filters;
private List<String> moduleIds;
private List<String> unSelectIds;
private String customNum;
private String environmentType;
private String environmentJson;
private String environmentGroupId;
private String versionId;
private Boolean newCreate;
}

View File

@ -1,34 +0,0 @@
package io.metersphere.api.dto.automation;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Data
public class ScenarioProjectDTO {
private List<String> projectIdList;
private Map<String, List<String>> scenarioProjectIdMap;
public ScenarioProjectDTO() {
this.projectIdList = new ArrayList<>();
this.scenarioProjectIdMap = new HashMap<>();
}
public void merge(ScenarioProjectDTO mergeDTO) {
if (CollectionUtils.isNotEmpty(mergeDTO.getProjectIdList())) {
for (String projectId : mergeDTO.getProjectIdList()) {
if (!this.projectIdList.contains(projectId)) {
projectIdList.add(projectId);
}
}
}
if (MapUtils.isNotEmpty(mergeDTO.getScenarioProjectIdMap())) {
this.scenarioProjectIdMap.putAll(mergeDTO.getScenarioProjectIdMap());
}
}
}

View File

@ -1,5 +0,0 @@
package io.metersphere.api.dto.automation;
public enum ScenarioStatus {
// Saved, Success, Error, Timeout, Fail, Trash, Underway
}

View File

@ -1,160 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.commons.constants.PropertyConstant;
import io.metersphere.commons.utils.LogUtil;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.Element;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* 树形表格数据格式
*
* @author song.tianyang
* @Date 2021/3/15 4:37 下午
* @Description
*/
@Getter
@Setter
public class TcpTreeTableDataStruct {
private String uuid;
private String name;
private String value;
private String type;
private String systemName;
private String contentType;
private String condition;
private boolean required;
private String description;
private List<TcpTreeTableDataStruct> children;
private String status = StringUtils.EMPTY;
public void init() {
this.uuid = UUID.randomUUID().toString();
this.systemName = StringUtils.EMPTY;
this.description = StringUtils.EMPTY;
this.value = StringUtils.EMPTY;
this.required = true;
this.contentType = StringUtils.EMPTY;
this.type = StringUtils.EMPTY;
this.children = new ArrayList<>();
}
public TcpTreeTableDataStruct copy(boolean copyChildren) {
TcpTreeTableDataStruct returnObj = new TcpTreeTableDataStruct();
returnObj.name = this.name;
returnObj.value = this.value;
returnObj.type = this.type;
returnObj.systemName = this.systemName;
returnObj.contentType = this.contentType;
returnObj.required = this.required;
returnObj.description = this.description;
if (copyChildren) {
returnObj.children = this.children;
} else {
returnObj.children = new ArrayList<>();
}
return returnObj;
}
public Element genXmlElementByChildren(Element document) {
this.name = this.name.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
.replace("\"", "&quot;").replace("©", "&apos;");
if (StringUtils.isEmpty(this.name)) {
return null;
}
Element element = null;
try {
element = document.addElement(this.name);
if (StringUtils.equalsAnyIgnoreCase(type, PropertyConstant.STRING, PropertyConstant.ARRAY)) {
String attrString = StringUtils.EMPTY;
if (StringUtils.equalsIgnoreCase(this.type, PropertyConstant.STRING)) {
attrString = "s," + contentType;
} else if (StringUtils.equalsIgnoreCase(this.type, PropertyConstant.ARRAY)) {
attrString = "a," + contentType;
}
element.addAttribute("attr", attrString);
}
} catch (Exception e) {
LogUtil.error(e);
}
if (element != null) {
if (this.children == null || this.children.isEmpty()) {
if (this.value == null) {
this.value = StringUtils.EMPTY;
}
element.addText(this.value);
} else {
for (TcpTreeTableDataStruct child : children) {
child.genXmlElementByChildren(element);
}
}
}
return element;
}
public Element genXmlElementByDocument(Document document) {
this.name = this.name.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
.replace("\"", "&quot;").replace("©", "&apos;");
if (StringUtils.isEmpty(this.name)) {
return null;
}
Element element = null;
try {
element = document.addElement(this.name);
if (StringUtils.equalsAnyIgnoreCase(type, PropertyConstant.STRING, PropertyConstant.ARRAY)) {
String attrString = StringUtils.EMPTY;
if (StringUtils.equalsIgnoreCase(this.type, PropertyConstant.STRING)) {
attrString = "s," + contentType;
} else if (StringUtils.equalsIgnoreCase(this.type, PropertyConstant.ARRAY)) {
attrString = "a," + contentType;
}
element.addAttribute("attr", attrString);
}
} catch (Exception e) {
LogUtil.error(e);
}
if (element != null) {
if (this.children == null || this.children.isEmpty()) {
if (this.value == null) {
element.addText(StringUtils.EMPTY);
} else {
element.addText(this.value);
}
} else {
for (TcpTreeTableDataStruct child : children) {
child.genXmlElementByChildren(element);
}
}
}
return element;
}
public List<String> getNameDeep() {
List<String> returnList = new ArrayList<>();
if (StringUtils.isNotEmpty(this.name)) {
returnList.add(this.name);
}
if (CollectionUtils.isNotEmpty(this.children)) {
for (TcpTreeTableDataStruct child : this.children) {
List<String> itemNameList = child.getNameDeep();
for (String itemName : itemNameList) {
if (!returnList.contains(itemName)) {
returnList.add(itemName);
}
}
}
}
return returnList;
}
}

View File

@ -1,14 +0,0 @@
package io.metersphere.api.dto.automation;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.metersphere.api.dto.definition.TestPlanApiCaseDTO;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TestPlanApiDTO extends TestPlanApiCaseDTO {
private String response;
private String reportId;
}

View File

@ -1,38 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.TestPlanWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class TestPlanDTO extends TestPlanWithBLOBs {
private String projectName;
private String userName;
private List<String> projectIds;
private List<String> principals;
private List<String> follows;
/**
* 定时任务ID
*/
private String scheduleId;
/**
* 定时任务是否开启
*/
private boolean scheduleOpen;
/**
* 定时任务状态
*/
private String scheduleStatus;
/**
* 定时任务规则
*/
private String scheduleCorn;
/**
* 定时任务下一次执行时间
*/
private Long scheduleExecuteTime;
private String workspaceName;
}

View File

@ -1,12 +0,0 @@
package io.metersphere.api.dto.automation;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TestPlanScenarioDTO extends ApiScenarioDTO {
private ApiScenarioReportResult response;
}

View File

@ -1,42 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class TestPlanScenarioRequest {
private String id;
private String excludeId;
private String projectId;
private String moduleId;
private List<String> moduleIds;
private List<String> scenarioIds;
private String name;
private String status;
private String workspaceId;
private String userId;
private String planId;
private boolean recent = false;
private List<OrderRequest> orders;
private Map<String, List<String>> filters;
private Map<String, Object> combine;
private List<String> ids;
private String reviewId;
private String versionId;
private String refId;
/**
* 是否选中所有数据
*/
private boolean selectAll;
/**
* 全选之后取消选中的id
*/
private List<String> unSelectIds;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.api.dto.automation;
import io.metersphere.base.domain.ApiScenarioModule;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class UpdateScenarioModuleDTO {
private List<ApiScenarioModule> moduleList;
private List<ApiScenarioWithBLOBs> needUpdateList;
private List<ApiScenarioWithBLOBs> apiScenarioWithBLOBsList;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.api.dto.datacount;
import lombok.Getter;
import lombok.Setter;
/**
* API数据统计查询结果类
*/
@Getter
@Setter
public class ApiDataCountResult {
//分组统计字段
private String groupField;
//数据统计
private long countNumber;
}

View File

@ -1,32 +0,0 @@
package io.metersphere.api.dto.datacount;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
/**
* @author song.tianyang
* @Date 2021/6/21 4:15 下午
*/
public class ApiMethodUrlDTO {
public String url;
public String method;
public ApiMethodUrlDTO(String url, String method) {
this.url = url == null ? StringUtils.EMPTY : url;
this.method = method == null ? StringUtils.EMPTY : method;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApiMethodUrlDTO that = (ApiMethodUrlDTO) o;
return url.equals(that.url) && method.equals(that.method);
}
@Override
public int hashCode() {
return Objects.hash(url, method);
}
}

View File

@ -1,27 +0,0 @@
package io.metersphere.api.dto.datacount;
import io.metersphere.api.dto.automation.TestPlanDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* 已执行的案例
*/
@Getter
@Setter
public class ExecutedCaseInfoResult {
private String testCaseID;
private String id;
//案例名称
private String caseName;
//所属测试计划
private String testPlan;
private String testPlanId;
//失败次数
private Long failureTimes;
//案例类型
private String caseType;
private List<TestPlanDTO> testPlanDTOList;
}

View File

@ -1,19 +0,0 @@
package io.metersphere.api.dto.datacount.request;
import io.metersphere.request.OrderRequest;
import io.metersphere.request.TestPlanRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class QueryTestPlanRequest extends TestPlanRequest {
private String workspaceId;
private String userId;
private List<OrderRequest> orders;
private Map<String, List<String>> filters;
private Map<String, Object> combine;
}

View File

@ -1,21 +0,0 @@
package io.metersphere.api.dto.datacount.request;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author song.tianyang
* @Date 2020/12/17 5:04 下午
* @Description
*/
@Getter
@Setter
public class ScheduleInfoRequest {
private String taskID;
private boolean enable;
private List<String> taskIds;
private boolean selectAll;
private QueryTestPlanRequest queryTestPlanRequest;
}

View File

@ -1,251 +0,0 @@
package io.metersphere.api.dto.datacount.response;
import io.metersphere.api.dto.datacount.ApiDataCountResult;
import io.metersphere.base.domain.ApiDefinition;
import io.metersphere.commons.constants.RequestTypeConstants;
import io.metersphere.commons.enums.ApiHomeFilterEnum;
import io.metersphere.commons.enums.ApiReportStatus;
import io.metersphere.commons.enums.ApiTestDataStatus;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.Map;
/**
* 接口数据统计返回
*/
@Getter
@Setter
public class ApiDataCountDTO {
private long total = 0;
private long httpCount = 0;
private long tcpCount = 0;
private long rpcCount = 0;
private long sqlCount = 0;
private long createdInWeek = 0;
//不同请求方式的覆盖数
private long httpCovered = 0;
private long tcpCovered = 0;
private long sqlCovered = 0;
private long rpcCovered = 0;
//不同请求方式的未覆盖
private long httpNotCovered = 0;
private long tcpNotCovered = 0;
private long rpcNotCovered = 0;
private long sqlNotCovered = 0;
private long coveredCount = 0;
private long notCoveredCount = 0;
private long runningCount = 0;
private long finishedCount = 0;
private long notStartedCount = 0;
//本周执行次数
private long executedTimesInWeek = 0;
//历史执行总次数
private long executedTimes = 0;
//执行的数据数
private long executedCount = 0;
private long notExecutedCount = 0;
private long passCount = 0;
private long unPassCount = 0;
private long fakeErrorCount = 0;
private long notRunCount = 0;
//接口覆盖率
private String apiCoveredRate = "0%";
//完成率
private String completedRate = "0%";
//执行率
private String executedRate = "0%";
//通过率
private String passRate = "0%";
public void countProtocol(Map<String, List<ApiDefinition>> protocalAllApiMap) {
for (Map.Entry<String, List<ApiDefinition>> entry : protocalAllApiMap.entrySet()) {
switch (entry.getKey()) {
case RequestTypeConstants.DUBBO:
this.rpcCount += entry.getValue().size();
break;
case RequestTypeConstants.HTTP:
this.httpCount += entry.getValue().size();
break;
case RequestTypeConstants.SQL:
this.sqlCount += entry.getValue().size();
break;
case RequestTypeConstants.TCP:
this.tcpCount += entry.getValue().size();
break;
default:
break;
}
}
this.total = this.rpcCount + this.httpCount + this.sqlCount + this.tcpCount;
}
public void countProtocol(List<ApiDataCountResult> countResultList) {
for (ApiDataCountResult countResult :
countResultList) {
switch (countResult.getGroupField().toUpperCase()) {
case RequestTypeConstants.DUBBO:
this.rpcCount += countResult.getCountNumber();
break;
case RequestTypeConstants.HTTP:
this.httpCount += countResult.getCountNumber();
break;
case RequestTypeConstants.SQL:
this.sqlCount += countResult.getCountNumber();
break;
case RequestTypeConstants.TCP:
this.tcpCount += countResult.getCountNumber();
break;
default:
break;
}
}
this.total = this.rpcCount + this.httpCount + this.sqlCount + this.tcpCount;
}
/**
* 对Status视角对查询结果进行统计
*
* @param countResultList 查询参数
*/
public void countStatus(List<ApiDataCountResult> countResultList) {
for (ApiDataCountResult countResult :
countResultList) {
if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiTestDataStatus.UNDERWAY.getValue())) {
//运行中
this.runningCount += countResult.getCountNumber();
} else if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiTestDataStatus.COMPLETED.getValue())) {
//已完成
this.finishedCount += countResult.getCountNumber();
} else if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiTestDataStatus.PREPARE.getValue())) {
this.notStartedCount += countResult.getCountNumber();
}
}
}
public void countApiCoverage(List<ApiDataCountResult> countResultList) {
for (ApiDataCountResult countResult : countResultList) {
if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiHomeFilterEnum.COVERED)) {
this.coveredCount += countResult.getCountNumber();
} else if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiHomeFilterEnum.NOT_COVERED)) {
this.notCoveredCount += countResult.getCountNumber();
}
}
}
public void countScenarioRunResult(List<ApiDataCountResult> countResultByRunResult) {
for (ApiDataCountResult countResult : countResultByRunResult) {
if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), ApiHomeFilterEnum.NOT_RUN,
ApiReportStatus.PENDING.name()) || StringUtils.isEmpty(countResult.getGroupField())) {
this.notExecutedCount += countResult.getCountNumber();
} else if (ApiReportStatus.ERROR.name().equals(countResult.getGroupField())) {
this.unPassCount += countResult.getCountNumber();
} else if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), ApiReportStatus.FAKE_ERROR.name())) {
this.fakeErrorCount += countResult.getCountNumber();
} else {
this.passCount += countResult.getCountNumber();
}
}
this.executedCount = this.unPassCount + this.fakeErrorCount + this.passCount;
}
/**
* 获取执行过的数据数
*
* @return
*/
public long getExecutedData() {
return this.executedCount;
}
public void countApiCaseRunResult(List<ExecuteResultCountDTO> executeResultCountDTOList) {
for (ExecuteResultCountDTO execResult : executeResultCountDTOList) {
if (StringUtils.isEmpty(execResult.getExecResult())) {
this.notExecutedCount += execResult.getCount();
} else if (StringUtils.equalsAnyIgnoreCase(execResult.getExecResult(), ApiTestDataStatus.UNDERWAY.getValue(),
ApiReportStatus.STOPPED.name())) {
this.notExecutedCount += execResult.getCount();
} else if (StringUtils.equalsIgnoreCase(execResult.getExecResult(), ApiReportStatus.SUCCESS.name())) {
this.passCount += execResult.getCount();
} else if (StringUtils.equalsAnyIgnoreCase(execResult.getExecResult(), ApiReportStatus.FAKE_ERROR.name())) {
fakeErrorCount += execResult.getCount();
} else {
this.unPassCount += execResult.getCount();
}
}
this.executedCount = this.unPassCount + this.fakeErrorCount + this.passCount;
}
public void countScheduleExecute(List<ApiDataCountResult> allExecuteResult) {
for (ApiDataCountResult countResult : allExecuteResult) {
if (StringUtils.equalsIgnoreCase(countResult.getGroupField(), ApiReportStatus.SUCCESS.name())) {
this.passCount += countResult.getCountNumber();
} else if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), ApiReportStatus.ERROR.name())) {
this.unPassCount += countResult.getCountNumber();
} else if (StringUtils.equalsAnyIgnoreCase(countResult.getGroupField(), ApiReportStatus.FAKE_ERROR.name(), "errorReportResult")) {
this.fakeErrorCount += countResult.getCountNumber();
}
}
}
/**
* 统计覆盖率相关数据
*
* @param coverageMap 和覆盖率相关的protocol集合
* @param isUnCovered 是否统计的是未覆盖的数据
*/
public void countCovered(Map<String, List<ApiDefinition>> coverageMap, boolean isUnCovered) {
if (MapUtils.isNotEmpty(coverageMap)) {
for (Map.Entry<String, List<ApiDefinition>> entry : coverageMap.entrySet()) {
if (CollectionUtils.isNotEmpty(entry.getValue())) {
switch (entry.getKey()) {
case RequestTypeConstants.DUBBO:
if (isUnCovered) {
this.rpcNotCovered += entry.getValue().size();
} else {
this.rpcCovered += entry.getValue().size();
}
break;
case RequestTypeConstants.HTTP:
if (isUnCovered) {
this.httpNotCovered += entry.getValue().size();
} else {
this.httpCovered += entry.getValue().size();
}
break;
case RequestTypeConstants.SQL:
if (isUnCovered) {
this.sqlNotCovered += entry.getValue().size();
} else {
this.sqlCovered += entry.getValue().size();
}
break;
case RequestTypeConstants.TCP:
if (isUnCovered) {
this.tcpNotCovered += entry.getValue().size();
} else {
this.tcpCovered += entry.getValue().size();
}
break;
default:
break;
}
}
}
}
if (isUnCovered) {
this.notCoveredCount = this.rpcNotCovered + this.httpNotCovered + this.tcpNotCovered + this.sqlNotCovered;
} else {
this.coveredCount = this.rpcCovered + this.httpCovered + this.tcpCovered + this.sqlCovered;
}
}
}

View File

@ -1,12 +0,0 @@
package io.metersphere.api.dto.datacount.response;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class CoveredDTO {
public String rateOfCovered = "0%";
public long covered = 0;
public long notCovered = 0;
}

View File

@ -1,11 +0,0 @@
package io.metersphere.api.dto.datacount.response;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ExecuteResultCountDTO {
private String execResult;
private long count;
}

View File

@ -1,32 +0,0 @@
package io.metersphere.api.dto.datacount.response;
import io.metersphere.api.dto.automation.TestPlanDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* 已执行的案例
*/
@Getter
@Setter
public class ExecutedCaseInfoDTO {
//排名
private int sortIndex;
//案例名称
private String caseName;
//所属测试计划
private String testPlan;
private String testPlanId;
//失败次数
private Long failureTimes;
//案例类型
private String caseType;
//案例ID -- 目前被用为案例-测试计划 关联表ID
private String caseID;
//ID
private String id;
//测试计划集合
private List<TestPlanDTO> testPlanDTOList;
}

View File

@ -1,34 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiBatchRequest extends ApiDefinitionWithBLOBs {
private List<String> ids;
private String name;
private List<OrderRequest> orders;
private String projectId;
private String moduleId;
private String protocol;
/**
* 批量编辑标签
*/
private List<String> tagList;
private String type;
/**
* 默认覆盖原标签
*/
private boolean appendTag = false;
private ApiDefinitionRequest condition;
/**
* 关注
*/
private String follow;
}

View File

@ -1,18 +0,0 @@
package io.metersphere.api.dto.definition;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author song.tianyang
* @Date 2021/4/6 5:32 下午
* @Description
*/
@Getter
@Setter
public class ApiCaseBatchCondition extends ApiTestCaseRequest {
private boolean selectAll;
private List<String> unSelectIds;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.api.dto.definition;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiComputeResult {
private String apiDefinitionId;
private int caseTotal;
private String status;
private String passRate;
private int success;
private int error;
}

View File

@ -1,40 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.api.dto.ApiTestImportRequest;
import io.metersphere.api.dto.mock.config.MockConfigImportDTO;
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiDefinitionImportParamDTO {
private ApiDefinitionWithBLOBs apiDefinition;
private ApiTestImportRequest apiTestImportRequest;
private List<MockConfigImportDTO> mocks;
private List<ApiDefinitionWithBLOBs> updateList;
private List<ApiTestCaseWithBLOBs> caseList;
private List<ApiDefinitionWithBLOBs> repeatList;
public ApiDefinitionImportParamDTO() {
}
public ApiDefinitionImportParamDTO(ApiDefinitionWithBLOBs apiDefinition, ApiTestImportRequest apiTestImportRequest, List<MockConfigImportDTO> mocks, List<ApiDefinitionWithBLOBs> updateList, List<ApiTestCaseWithBLOBs> caseList) {
this.apiDefinition = apiDefinition;
this.apiTestImportRequest = apiTestImportRequest;
this.mocks = mocks;
this.updateList = updateList;
this.caseList = caseList;
}
}

View File

@ -1,14 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.request.RelationshipEdgeRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiDefinitionRelationshipEdgeRequest extends RelationshipEdgeRequest {
private List<String> ids;
private ApiDefinitionRequest condition;
}

View File

@ -1,54 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.request.ApiSyncCaseRequest;
import io.metersphere.request.BaseQueryRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiDefinitionRequest extends BaseQueryRequest {
private String id;
private String excludeId;
private String moduleId;
private String module;
private String protocol;
private String name;
private String userId;
private String planId;
private boolean recent = false;
private boolean isSelectThisWeedData = false;
private long createTime = 0;
private String status;
private String apiCoverage;
private String apiCaseCoverage;
private String scenarioCoverage;
private String reviewId;
private String refId;
private String versionId;
private String path;
private String method;
//被场景覆盖的接口id集合
private List<String> coverageIds;
// 测试计划是否允许重复
private boolean repeatCase;
//是否进入待更新列表
private Boolean toBeUpdated;
//当前时间减去进入待更新的时间
private Long toBeUpdateTime;
//同步配置
private ApiSyncCaseRequest syncConfig;
//全选
private boolean selectAll;
private Long deleteTime;
private String deleteUserId;
}

View File

@ -1,41 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.dto.CustomFieldDao;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class ApiDefinitionResult extends ApiDefinitionWithBLOBs {
private String projectName;
private String userName;
private String caseTotal;
private String caseStatus;
private int scenarioTotal;
private String casePassingRate;
private String deleteUser;
private List<String> scenarioIds;
private String caseType;
private String apiType;
private String versionName;
private Boolean versionEnable;
private boolean updated;
private List<CustomFieldDao> fields;
}

View File

@ -1,10 +0,0 @@
package io.metersphere.api.dto.definition;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiExportResult {
}

View File

@ -1,56 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.api.dto.ApiTestImportRequest;
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.base.domain.ApiModule;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class ApiImportParamDto {
private ApiModuleDTO chooseModule;
private Map<String, String> idPathMap;
private List<ApiDefinitionWithBLOBs> optionData;
private Boolean fullCoverage;
private ApiTestImportRequest request;
private Map<String, ApiModule> moduleMap;
private List<ApiDefinitionWithBLOBs> toUpdateList;
private List<ApiTestCaseWithBLOBs> optionDataCases;
private List<ApiDefinitionWithBLOBs> data;
private Map<String, List<ApiModule>> pidChildrenMap;
private Map<String, ApiModuleDTO> idModuleMap;
private boolean urlRepeat;
private List<ApiTestCaseWithBLOBs> importCases;
private List<ApiTestCaseWithBLOBs> repeatCaseList;
private Map<String, List<ApiDefinitionWithBLOBs>> repeatApiMap;
public ApiImportParamDto(ApiModuleDTO chooseModule, Map<String, String> idPathMap, List<ApiDefinitionWithBLOBs> optionData, Boolean fullCoverage, ApiTestImportRequest request, Map<String, ApiModule> moduleMap, List<ApiDefinitionWithBLOBs> toUpdateList, List<ApiTestCaseWithBLOBs> optionDataCases) {
this.chooseModule = chooseModule;
this.idPathMap = idPathMap;
this.optionData = optionData;
this.fullCoverage = fullCoverage;
this.request = request;
this.moduleMap = moduleMap;
this.toUpdateList = toUpdateList;
this.optionDataCases = optionDataCases;
}
public ApiImportParamDto(List<ApiDefinitionWithBLOBs> data, Map<String, List<ApiModule>> pidChildrenMap, Map<String, String> idPathMap, Map<String, ApiModuleDTO> idModuleMap, ApiTestImportRequest request,
Boolean fullCoverage, boolean urlRepeat, List<ApiTestCaseWithBLOBs> importCases) {
this.data = data;
this.pidChildrenMap = pidChildrenMap;
this.idPathMap = idPathMap;
this.idModuleMap = idModuleMap;
this.request = request;
this.fullCoverage = fullCoverage;
this.urlRepeat = urlRepeat;
this.importCases = importCases;
}
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto.definition;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class ApiImportSendNoticeDTO {
private ApiDefinitionResult apiDefinitionResult;
private List<ApiTestCaseDTO> caseDTOList;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.dto.TreeNodeDTO;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiModuleDTO extends TreeNodeDTO<ApiModuleDTO> {
private String protocol;
private String path;
}

View File

@ -1,18 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.Schedule;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiSwaggerUrlDTO extends Schedule {
//序号
private int index;
private String id;
private String projectId;
private String swaggerUrl;
private String scheduleId;
//下次执行时间
private Long nextExecutionTime;
}

View File

@ -1,61 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiTestBatchRequest extends ApiTestCaseWithBLOBs {
private List<String> ids;
private List<OrderRequest> orders;
private String projectId;
private Map<String, Object> combine;
/**
* isSelectAllDate选择的数据是否是全部数据全部数据是不受分页影响的数据
* filters: 数据状态
* name如果是全部数据那么表格如果历经查询查询参数是什么
* moduleIds 哪些模块的数据
* unSelectIds是否在页面上有未勾选的数据有的话他们的ID是哪些
* filters/name/moduleIds/unSeelctIds 只在isSelectAllDate为true时需要为了让程序能明确批量的范围
*/
private boolean isSelectAll;
private Map<String, List<String>> filters;
private String name;
private String method;
private String path;
private List<String> moduleIds;
private List<String> unSelectIds;
private String protocol;
private String status;
private String envId;
/**
* 批量编辑标签
*/
private List<String> tagList;
private String type;
/**
* 默认覆盖原标签
*/
private boolean appendTag = false;
/**
* 关注
*/
private String follow;
}

View File

@ -1,23 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiTestCase;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ApiTestCaseDTO extends ApiTestCase {
private String moduleId;
private String path;
private String protocol;
private String updateUser;
private String createUser;
private String deleteUser;
private String apiName;
private String passRate;
private String projectName;
private String environment;
private String execResult;
private String versionName;
private boolean updated;
}

View File

@ -1,13 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ApiTestCaseInfo extends ApiTestCaseWithBLOBs {
private String apiMethod;
private String versionName;
private Boolean versionEnable;
}

View File

@ -1,79 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.request.ApiSyncCaseRequest;
import io.metersphere.request.BaseQueryRequest;
import io.metersphere.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Getter
@Setter
public class ApiTestCaseRequest extends BaseQueryRequest {
private String id;
private List<String> ids;
private String planId;
private String projectId;
private String priority;
private String name;
private String environmentId;
private String workspaceId;
private String apiDefinitionId;
private String status;
private String protocol;
private String moduleId;
private List<String> moduleIds;
private List<OrderRequest> orders;
private Map<String, List<String>> filters;
private Map<String, Object> combine;
private boolean isSelectThisWeedData;
private long createTime = 0;
private long updateTime = 0;
private String reviewId;
private String deleteUserId;
private long deleteTime;
private Boolean allowedRepeatCase = false;
/**
* 检查待更新的近三天有更新的或者状态为error的
*/
private boolean toUpdate;
/**
* 是否进入待更新列表
*/
private boolean toBeUpdated;
/**
* 当前时间减去进入待更新的时间
*/
private Long toBeUpdateTime;
/**
* 进入待更新列表用例状态集合
*/
private List<String> statusList;
/**
* 不需要查用例状态
*/
private boolean noSearchStatus;
/**
* 是否需要查询环境字段
*/
private boolean selectEnvironment = false;
/**
* 查询排除一些接口
*/
private List<String> notInIds;
//页面跳转时附带的过滤条件
private String redirectFilter;
//同步配置
private ApiSyncCaseRequest syncConfig;
//全选
private boolean selectAll;
}

View File

@ -1,19 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ApiTestCaseResult extends ApiTestCaseWithBLOBs {
private String projectName;
private String createUser;
private String updateUser;
private String execResult;
private String passRate;
private String apiMethod;
private Long execTime;
private boolean active = false;
private boolean responseActive = false;
}

View File

@ -1,17 +0,0 @@
package io.metersphere.api.dto.definition;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class BatchDataCopyRequest {
private List<String> ids;
private boolean copyCase;
private boolean copyMock;
private String versionId;
private ApiDefinitionRequest condition;
}

View File

@ -1,35 +0,0 @@
package io.metersphere.api.dto.definition;
import io.metersphere.base.domain.ApiDefinitionExecResultWithBLOBs;
import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class BatchRunDefinitionRequest {
private String id;
private List<String> planCaseIds;
private String triggerMode;
private RunModeConfigDTO config;
private String userId;
private String projectId;
//测试计划报告ID 测试计划执行时使用
private String planReportId;
// 失败重跑
private boolean rerun;
private String testPlanId;
private Map<String, ApiDefinitionExecResultWithBLOBs> executeQueue;
}

Some files were not shown because too many files have changed in this diff Show More