Compare commits
108 Commits
bc0b83c828
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59d0031f75 | ||
|
|
d960cb6553 | ||
|
|
af54b475a2 | ||
|
|
c12be119a3 | ||
|
|
924f5a935f | ||
|
|
963e9a8162 | ||
|
|
5296b22534 | ||
|
|
48b20390d4 | ||
|
|
ef741fcb64 | ||
|
|
c170f9e5ec | ||
| f9774b7eef | |||
|
|
ef4d51876f | ||
|
|
737aaf4482 | ||
| c0f0b96487 | |||
|
|
ca1e8182db | ||
|
|
f8b935378f | ||
| 660871f873 | |||
| cfdc292c1d | |||
|
|
49d63847ee | ||
|
|
efa41a7217 | ||
| 0f25043d8c | |||
| c9e2aa7c57 | |||
|
|
e0910ea033 | ||
| ffed752170 | |||
| 614aa05b42 | |||
|
|
7161354894 | ||
|
|
c6380b6bde | ||
|
|
f394dc4590 | ||
|
|
5cc2cdfc34 | ||
| eee51078b5 | |||
| 74457d2c81 | |||
| a790ffbcba | |||
|
|
eb58fd40c7 | ||
|
|
c6a73afb76 | ||
| 606c3c15ea | |||
| d54b4523bf | |||
| 3fad8f3a5a | |||
|
|
3209f1e35c | ||
|
|
75fcd51dea | ||
| a9d0f68f52 | |||
| e5dc3bab05 | |||
| 080a80d53d | |||
|
|
66498fd750 | ||
| 8636842735 | |||
|
|
66c627d33a | ||
|
|
c71b9d8c63 | ||
| 426ee6aae9 | |||
| 0960370562 | |||
| a3c140db47 | |||
| 64b57fc3ec | |||
| 2965095148 | |||
| e7248e613a | |||
| 441f7d041d | |||
| 85decf2a60 | |||
| c07742651d | |||
| a3e13b3972 | |||
| 78cb16fd19 | |||
| c99f639976 | |||
| 56d4a24e81 | |||
| 09c9c4eaec | |||
| 898fc59b50 | |||
| fa30bb8bc5 | |||
| d1b00e3ebf | |||
|
|
219c6f4e8d | ||
|
|
d3cd149ca5 | ||
|
|
7afae71c8a | ||
|
|
2502520829 | ||
|
|
0c250601ec | ||
| 59aca2920c | |||
| 8e6095820f | |||
| b0427ef35c | |||
| 2d8be3482a | |||
| 5442c6b688 | |||
| 326e21292f | |||
|
|
18434d1f88 | ||
|
|
b680339e6a | ||
| 354a65938a | |||
| d71d5c070e | |||
| 83109f3170 | |||
|
|
2e5736d045 | ||
| 75b83d2847 | |||
|
|
bbb9cb26f9 | ||
|
|
5ce3f5c64b | ||
| 0a79684d86 | |||
| addbe3ecd4 | |||
|
|
7627042c4d | ||
|
|
17d8fa4083 | ||
|
|
78cbb5aaaf | ||
|
|
814a7a39d2 | ||
|
|
f2be0e33b0 | ||
|
|
d5b6341b21 | ||
| bfea486350 | |||
| c5e18b985f | |||
|
|
5ae19a8847 | ||
|
|
56ffeb2f05 | ||
|
|
218d2b3026 | ||
|
|
953b06a9bc | ||
| b1e05e0334 | |||
| 4babf44054 | |||
|
|
19640f99f7 | ||
|
|
051d66d1f9 | ||
| 97e74dd4ca | |||
|
|
f677776c31 | ||
|
|
497ff672d1 | ||
|
|
c91a6183ba | ||
| defa663b4c | |||
|
|
cacba80269 | ||
|
|
58021edcb7 |
@@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://47.103.142.5:3306/cmcf-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: test
|
||||
password: Test123@
|
||||
url: jdbc:mysql://120.27.225.67:9609/riskmanage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: riskmanage
|
||||
password: riskmanage@Farben2023
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
@@ -12,7 +12,9 @@ test:
|
||||
addressEnabled: true
|
||||
# Jmeter主目录路径
|
||||
jmeterHomePath: /opt/apache-jmeter
|
||||
|
||||
#chromedriver路径
|
||||
selenium:
|
||||
chrome-driver-path: /usr/local/bin/chromedriver
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
@@ -69,13 +71,13 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: ah.qyyh.net
|
||||
host: 47.99.93.74
|
||||
# 端口,默认为6379
|
||||
port: 15129
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 1
|
||||
# 密码
|
||||
password:
|
||||
password: foobaredDkhsb
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
|
||||
@@ -157,6 +157,17 @@
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>4.30.0</version> <!-- 根据需要选择版本 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package com.test.common.core.domain.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:Jmeter调用参数
|
||||
* @date 2025-02-19 10:55
|
||||
*/
|
||||
@Data
|
||||
public class JmeterRequest {
|
||||
/**
|
||||
* 用例步骤id
|
||||
@@ -51,75 +56,8 @@ public class JmeterRequest {
|
||||
*/
|
||||
private String jmeterHomePath;
|
||||
|
||||
public String getTestCaseName() {
|
||||
return testCaseName;
|
||||
}
|
||||
|
||||
public void setTestCaseName(String testCaseName) {
|
||||
this.testCaseName = testCaseName;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(int port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getRequestBody() {
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
public void setRequestBody(String requestBody) {
|
||||
this.requestBody = requestBody;
|
||||
}
|
||||
|
||||
public String getRequestParams() {
|
||||
return requestParams;
|
||||
}
|
||||
|
||||
public void setRequestParams(String requestParams) {
|
||||
this.requestParams = requestParams;
|
||||
}
|
||||
|
||||
public String getRequestHeader() {
|
||||
return requestHeader;
|
||||
}
|
||||
|
||||
public void setRequestHeader(String requestHeader) {
|
||||
this.requestHeader = requestHeader;
|
||||
}
|
||||
|
||||
public String getJmeterHomePath() {
|
||||
return jmeterHomePath;
|
||||
}
|
||||
|
||||
public void setJmeterHomePath(String jmeterHomePath) {
|
||||
this.jmeterHomePath = jmeterHomePath;
|
||||
}
|
||||
/**
|
||||
* jmeter提取表达式
|
||||
*/
|
||||
private List<String> extractionRuleList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.test.common.enums;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:缺陷状态枚举
|
||||
* @date 2025-04-23 13:59
|
||||
*/
|
||||
public enum EnumDefectStatus {
|
||||
PENDING_CONFIRMATION("0", "待确认"),
|
||||
UNDER_REPAIR("1", "修复中"),
|
||||
COMPLETED("2", "已完成"),
|
||||
INVALID_DEFECT("3", "无效缺陷"),
|
||||
SUSPENDED("4", "挂起"),
|
||||
PENDING_VERIFICATION("5", "待验证");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
EnumDefectStatus(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取对应的枚举值
|
||||
*/
|
||||
public static EnumDefectStatus fromCode(String code) {
|
||||
for (EnumDefectStatus status : values()) {
|
||||
if (status.code.equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("无效的状态码: " + code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取中文描述(可选)
|
||||
*/
|
||||
public static String getDescriptionByCode(String code) {
|
||||
return fromCode(code).getDescription();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.test.common.enums;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:缺陷严重程度枚举
|
||||
* @date 2025-04-23 14:06
|
||||
*/
|
||||
public enum EnumSeverityLevel {
|
||||
INVALID("0", "无效"),
|
||||
MINOR("1", "轻微"),
|
||||
MODERATE("2", "一般"),
|
||||
SEVERE("3", "严重"),
|
||||
CRITICAL("4", "致命");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
EnumSeverityLevel(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据严重程度码获取枚举实例
|
||||
*/
|
||||
public static EnumSeverityLevel fromCode(String code) {
|
||||
for (EnumSeverityLevel level : values()) {
|
||||
if (level.code.equals(code)) {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("无效的严重程度码: " + code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码直接获取中文描述
|
||||
*/
|
||||
public static String getDescriptionByCode(String code) {
|
||||
return fromCode(code).getDescription();
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
@@ -186,4 +187,60 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
||||
public static String calculateTimeDifference(Date startTime, Date endTime) {
|
||||
long diffInMillis = endTime.getTime() - startTime.getTime(); // 获取时间差(毫秒)
|
||||
long totalSeconds = diffInMillis / 1000; // 转换为秒
|
||||
long totalMinutes = totalSeconds / 60; // 转换为分钟
|
||||
long totalHours = totalMinutes / 60; // 转换为小时
|
||||
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
// 如果时间差超过1小时
|
||||
if (totalHours > 0) {
|
||||
result.append(totalHours).append("h");
|
||||
long remainingMinutes = totalMinutes % 60; // 剩余的分钟
|
||||
if (remainingMinutes > 0) {
|
||||
result.append(remainingMinutes).append("min");
|
||||
}
|
||||
long remainingSeconds = totalSeconds % 60; // 剩余的秒
|
||||
if (remainingSeconds > 0) {
|
||||
result.append(remainingSeconds).append("s");
|
||||
}
|
||||
} else if (totalMinutes > 0) { // 如果时间差在1分钟到1小时之间
|
||||
result.append(totalMinutes).append("min");
|
||||
long remainingSeconds = totalSeconds % 60; // 剩余的秒
|
||||
if (remainingSeconds > 0) {
|
||||
result.append(remainingSeconds).append("s");
|
||||
}
|
||||
} else { // 如果时间差小于1分钟
|
||||
result.append(totalSeconds).append("s");
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算两个时间点的时间差(单位为毫秒)
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 时间差(单位为毫秒)
|
||||
*/
|
||||
public static long differenceInMilliseconds(Date startTime, Date endTime) {
|
||||
if (startTime == null || endTime == null) {
|
||||
throw new IllegalArgumentException("开始时间和结束时间不能为空");
|
||||
}
|
||||
return endTime.getTime() - startTime.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期为 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String formatDateTime(Date date) {
|
||||
return date.toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDateTime()
|
||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class HttpSampleAnalyzer {
|
||||
samplesByInterface.forEach((interfaceName, interfaceSamples) -> {
|
||||
// 过滤出该接口的错误请求
|
||||
List<HttpSample> errorSamples = interfaceSamples.stream()
|
||||
.filter(s -> !"true".equals(s.getS()))
|
||||
.filter(s -> !s.getS())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 按错误码统计
|
||||
@@ -116,7 +116,7 @@ public class HttpSampleAnalyzer {
|
||||
samplesByInterface.forEach((interfaceName, interfaceSamples) -> {
|
||||
long total = interfaceSamples.size();
|
||||
long errors = interfaceSamples.stream()
|
||||
.filter(s -> !"true".equals(s.getS()))
|
||||
.filter(s -> !s.getS())
|
||||
.count();
|
||||
|
||||
result.put(interfaceName, new InterfaceErrorStat(interfaceName, total, errors));
|
||||
|
||||
@@ -7,10 +7,14 @@ import com.jayway.jsonpath.PathNotFoundException;
|
||||
import com.test.common.core.domain.model.*;
|
||||
import org.apache.jmeter.config.Arguments;
|
||||
import org.apache.jmeter.config.gui.ArgumentsPanel;
|
||||
import org.apache.jmeter.control.GenericController;
|
||||
import org.apache.jmeter.control.LoopController;
|
||||
import org.apache.jmeter.control.gui.LogicControllerGui;
|
||||
import org.apache.jmeter.control.gui.LoopControlPanel;
|
||||
import org.apache.jmeter.control.gui.TestPlanGui;
|
||||
import org.apache.jmeter.engine.StandardJMeterEngine;
|
||||
import org.apache.jmeter.extractor.json.jsonpath.JSONPostProcessor;
|
||||
import org.apache.jmeter.extractor.json.jsonpath.gui.JSONPostProcessorGui;
|
||||
import org.apache.jmeter.protocol.http.control.Header;
|
||||
import org.apache.jmeter.protocol.http.control.HeaderManager;
|
||||
import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
|
||||
@@ -29,7 +33,6 @@ import org.apache.jmeter.threads.gui.ThreadGroupGui;
|
||||
import org.apache.jmeter.timers.ConstantThroughputTimer;
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.apache.jorphan.collections.ListedHashTree;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -94,8 +97,7 @@ public class JMeterGroupUtil {
|
||||
// 5. 构建测试树,新增每个用例下的http请求节点
|
||||
HashTree firstTreeTestPlan = new HashTree();
|
||||
HashTree secondHashTree = new HashTree();
|
||||
ListedHashTree thirdHashTree = new ListedHashTree();
|
||||
dealHttpHashTreeWithRequestList(thirdHashTree, jmeterGroupRequest.getJmeterRequestList());
|
||||
HashTree thirdHashTree = new HashTree();
|
||||
|
||||
// 6. 获取设置吞吐量
|
||||
ConstantThroughputTimer constantThroughputTimer = null;
|
||||
@@ -105,6 +107,13 @@ public class JMeterGroupUtil {
|
||||
constantThroughputTimer = getConstantThroughputTimer(rpsLimit);
|
||||
thirdHashTree.add(constantThroughputTimer);
|
||||
}
|
||||
HashTree threadGroupHashTree = secondHashTree.add(threadGroup);
|
||||
GenericController simpleController = new GenericController();
|
||||
simpleController.setName("简单顺序逻辑控制器");
|
||||
simpleController.setProperty(TestElement.TEST_CLASS, GenericController.class.getName());
|
||||
simpleController.setProperty(TestElement.GUI_CLASS, LogicControllerGui.class.getName());
|
||||
HashTree simpleControllerTree = threadGroupHashTree.add(simpleController);
|
||||
dealHttpHashTreeWithRequestList(simpleControllerTree, jmeterGroupRequest.getJmeterRequestList());
|
||||
secondHashTree.add(threadGroup, thirdHashTree);
|
||||
firstTreeTestPlan.add(testPlan, secondHashTree);
|
||||
|
||||
@@ -143,7 +152,7 @@ public class JMeterGroupUtil {
|
||||
* @param thirdHashTree
|
||||
* @param requestList
|
||||
*/
|
||||
private static void dealHttpHashTreeWithRequestList(ListedHashTree thirdHashTree, List<JmeterRequest> requestList) {
|
||||
private static void dealHttpHashTreeWithRequestList(HashTree thirdHashTree, List<JmeterRequest> requestList) {
|
||||
for (JmeterRequest jmeterRequest : requestList) {
|
||||
try {
|
||||
HashTree fourHashTree = new HashTree();
|
||||
@@ -194,11 +203,18 @@ public class JMeterGroupUtil {
|
||||
}
|
||||
}
|
||||
HeaderManager headerManager = createHeaderManager(headerMap);
|
||||
List<String> extractionRuleList = jmeterRequest.getExtractionRuleList();
|
||||
if (headerManager != null) {
|
||||
fourHashTree.add(headerManager);
|
||||
createJsonPostProcessor(extractionRuleList, fourHashTree);
|
||||
thirdHashTree.add(httpSampler, fourHashTree);
|
||||
} else {
|
||||
createJsonPostProcessor(extractionRuleList, fourHashTree);
|
||||
if (fourHashTree.isEmpty()) {
|
||||
thirdHashTree.add(httpSampler);
|
||||
} else {
|
||||
thirdHashTree.add(httpSampler, fourHashTree);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -208,6 +224,34 @@ public class JMeterGroupUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建Json参数提取
|
||||
* @param extractionRuleList
|
||||
* @param fourHashTree
|
||||
* @return
|
||||
*/
|
||||
private static void createJsonPostProcessor(List<String> extractionRuleList, HashTree fourHashTree) {
|
||||
if (extractionRuleList != null) {
|
||||
for (String extractionRule : extractionRuleList) {
|
||||
String[] array = extractionRule.split(",");
|
||||
JSONPostProcessor jsonExtractor = new JSONPostProcessor();
|
||||
jsonExtractor.setName("提取" + array[0]);
|
||||
jsonExtractor.setProperty(TestElement.TEST_CLASS, JSONPostProcessor.class.getName());
|
||||
jsonExtractor.setProperty(TestElement.GUI_CLASS, JSONPostProcessorGui.class.getName());
|
||||
jsonExtractor.setEnabled(true);
|
||||
if (array[1].startsWith("$")) {
|
||||
jsonExtractor.setJsonPathExpressions(array[1]); // JSONPath 表达式
|
||||
} else {
|
||||
jsonExtractor.setJsonPathExpressions("$." + array[1]); // JSONPath 表达式
|
||||
}
|
||||
jsonExtractor.setMatchNumbers("1"); // 0表示随机,1表示第一个
|
||||
jsonExtractor.setRefNames(array[0]); // 存储变量名
|
||||
jsonExtractor.setDefaultValues("");
|
||||
fourHashTree.add(jsonExtractor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建测试计划
|
||||
* @param name
|
||||
@@ -239,7 +283,11 @@ public class JMeterGroupUtil {
|
||||
threadGroup.setDelay(0);
|
||||
if (executeType == 1) {
|
||||
threadGroup.setDuration(pressureSecond);
|
||||
threadGroup.setProperty(new TestElementProperty(ThreadGroup.MAIN_CONTROLLER, createLoopController(-1)));
|
||||
threadGroup.setProperty(new BooleanProperty(ThreadGroup.IS_SAME_USER_ON_NEXT_ITERATION, true));
|
||||
threadGroup.setScheduler(true);
|
||||
} else {
|
||||
threadGroup.setScheduler(false);
|
||||
threadGroup.setProperty(new TestElementProperty(ThreadGroup.MAIN_CONTROLLER, createLoopController(loops)));
|
||||
}
|
||||
if (errorOperType == 1) {
|
||||
@@ -253,7 +301,6 @@ public class JMeterGroupUtil {
|
||||
} else if (errorOperType == 5) {
|
||||
threadGroup.setProperty(new StringProperty(ThreadGroup.ON_SAMPLE_ERROR, "stoptestnow"));
|
||||
}
|
||||
threadGroup.setScheduler(false);
|
||||
threadGroup.setProperty(TestElement.TEST_CLASS, ThreadGroup.class.getName());
|
||||
threadGroup.setProperty(TestElement.GUI_CLASS, ThreadGroupGui.class.getName());
|
||||
threadGroup.setProperty(new BooleanProperty(TestElement.ENABLED, true));
|
||||
@@ -271,6 +318,9 @@ public class JMeterGroupUtil {
|
||||
loopController.setProperty(new StringProperty(TestElement.TEST_CLASS, LoopController.class.getName()));
|
||||
loopController.setProperty(new StringProperty(TestElement.NAME, "循环控制器"));
|
||||
loopController.setProperty(new BooleanProperty(TestElement.ENABLED, true));
|
||||
if (loops == 0) {
|
||||
loops = 1;
|
||||
}
|
||||
loopController.setProperty(new IntegerProperty(LoopController.LOOPS, loops));
|
||||
return loopController;
|
||||
}
|
||||
@@ -490,7 +540,7 @@ public class JMeterGroupUtil {
|
||||
sampleSaveConfiguration.setSamplerData(true);
|
||||
sampleSaveConfiguration.setAsXml(true);
|
||||
sampleSaveConfiguration.setFieldNames(true);
|
||||
sampleSaveConfiguration.setResponseHeaders(true);
|
||||
sampleSaveConfiguration.setResponseHeaders(false);
|
||||
sampleSaveConfiguration.setRequestHeaders(false);
|
||||
sampleSaveConfiguration.setAssertionResultsFailureMessage(true);
|
||||
//sampleSaveConfiguration.setsserAtionsResultsToSave(0); assertionsResultsToSave
|
||||
@@ -549,23 +599,26 @@ public class JMeterGroupUtil {
|
||||
// 初始化统计变量
|
||||
Map<String, LabelStats> labelStatsMap = new LinkedHashMap<>();
|
||||
List<HttpSample> samples = new ArrayList<>();
|
||||
long startTime = Long.MAX_VALUE;
|
||||
long endTime = Long.MIN_VALUE;
|
||||
// long startTime = Long.MAX_VALUE;
|
||||
// long endTime = Long.MIN_VALUE;
|
||||
long totalRequests = 0;
|
||||
long failedRequests = 0;
|
||||
long totalResponseTime = 0;
|
||||
long totalMinResponseTime = Long.MAX_VALUE;
|
||||
long totalMaxResponseTime = Long.MIN_VALUE;
|
||||
long totalTimeMillis = 0;
|
||||
for (int i = 0; i < httpSampleList.getLength(); i++) {
|
||||
Node httpSampleNode = httpSampleList.item(i);
|
||||
if (httpSampleNode.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Map<String, String> resultMap = new HashMap<>();
|
||||
Element httpSampleElement = (Element) httpSampleNode;
|
||||
// 提取字段
|
||||
String label = httpSampleElement.getAttribute("lb");
|
||||
boolean success = Boolean.parseBoolean(httpSampleElement.getAttribute("s"));
|
||||
long responseTime = Long.parseLong(httpSampleElement.getAttribute("t"));
|
||||
long timestamp = Long.parseLong(httpSampleElement.getAttribute("ts"));
|
||||
long lt = Long.parseLong(httpSampleElement.getAttribute("lt"));
|
||||
long ct = Long.parseLong(httpSampleElement.getAttribute("ct"));
|
||||
totalTimeMillis += responseTime + lt + ct;
|
||||
// long timestamp = Long.parseLong(httpSampleElement.getAttribute("ts"));
|
||||
long receivedBytes = Long.parseLong(httpSampleElement.getAttribute("by"));
|
||||
long sentBytes = Long.parseLong(httpSampleElement.getAttribute("sby"));
|
||||
String responseCode = httpSampleElement.getAttribute("rc");
|
||||
@@ -579,8 +632,8 @@ public class JMeterGroupUtil {
|
||||
if (!success) {
|
||||
failedRequests++;
|
||||
}
|
||||
startTime = Math.min(startTime, timestamp);
|
||||
endTime = Math.max(endTime, timestamp);
|
||||
// startTime = Math.min(startTime, timestamp);
|
||||
// endTime = Math.max(endTime, timestamp);
|
||||
// 更新按标签的统计
|
||||
LabelStats stats = labelStatsMap.getOrDefault(label, new LabelStats());
|
||||
stats.totalRequests++;
|
||||
@@ -596,7 +649,8 @@ public class JMeterGroupUtil {
|
||||
}
|
||||
}
|
||||
// 计算总时长(秒)
|
||||
double totalTimeInSeconds = (endTime - startTime) / 1000.0;
|
||||
double totalTimeInSeconds = totalTimeMillis / 1000.0;
|
||||
// double totalTimeInSeconds2 = (endTime - startTime) / 1000.0;
|
||||
|
||||
// 输出汇总报告
|
||||
for (Map.Entry<String, LabelStats> entry : labelStatsMap.entrySet()) {
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
@@ -66,6 +68,32 @@ public class MySQLExecutor {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String replaceSqlVariables(String sql, Map<String, String> params) {
|
||||
if (sql == null || params == null) {
|
||||
return sql;
|
||||
}
|
||||
// 正则匹配 ${variable_name}
|
||||
Pattern pattern = Pattern.compile("\\$\\{([^}]*)\\}");
|
||||
Matcher matcher = pattern.matcher(sql);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
while (matcher.find()) {
|
||||
String key = matcher.group(1).trim(); // 获取变量名
|
||||
String replacement = params.get(key); // 从 map 中获取对应值
|
||||
|
||||
if (replacement != null) {
|
||||
// 如果值存在,替换并加上单引号(适用于字符串)
|
||||
// 如果你需要支持数字不加引号,请自行判断类型
|
||||
replacement = "'" + replacement.replace("'", "''") + "'";
|
||||
matcher.appendReplacement(sb, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
matcher.appendTail(sb);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String url = "jdbc:mysql://47.103.142.5:3306/cmcf-test";
|
||||
// List<String> columnNameList = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,953 @@
|
||||
package com.test.common.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openqa.selenium.*;
|
||||
import org.openqa.selenium.interactions.Actions;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.Select;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Duration;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Selenium 工具类
|
||||
*/
|
||||
@Slf4j
|
||||
public class SeleniumUtils {
|
||||
|
||||
private WebDriver driver;
|
||||
private WebDriverWait wait;
|
||||
private Actions actions;
|
||||
|
||||
// 构造函数
|
||||
public SeleniumUtils(WebDriver driver) {
|
||||
this.driver = driver;
|
||||
this.wait = new WebDriverWait(driver, Duration.ofSeconds(10));
|
||||
this.actions = new Actions(driver);
|
||||
}
|
||||
// 设置显式等待超时时间
|
||||
public void setWaitTimeout(long seconds) {
|
||||
this.wait = new WebDriverWait(driver, Duration.ofSeconds(seconds));
|
||||
}
|
||||
|
||||
// 打开URL
|
||||
public void openUrl(String url) {
|
||||
driver.get(url);
|
||||
}
|
||||
|
||||
// 获取当前URL
|
||||
public String getCurrentUrl() {
|
||||
return driver.getCurrentUrl();
|
||||
}
|
||||
|
||||
// 获取页面标题
|
||||
public String getPageTitle() {
|
||||
return driver.getTitle();
|
||||
}
|
||||
|
||||
// 通过ID查找元素
|
||||
public WebElement findElementById(String id) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.id(id)));
|
||||
}
|
||||
|
||||
// 通过name查找元素
|
||||
public WebElement findElementByName(String name) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.name(name)));
|
||||
}
|
||||
|
||||
// 通过className查找元素
|
||||
public WebElement findElementByClassName(String className) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.className(className)));
|
||||
}
|
||||
|
||||
// 通过xpath查找元素
|
||||
public WebElement findElementByXpath(String xpath) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpath)));
|
||||
}
|
||||
|
||||
// 通过cssSelector查找元素
|
||||
public WebElement findElementByCssSelector(String cssSelector) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(cssSelector)));
|
||||
}
|
||||
|
||||
// 通过linkText查找元素
|
||||
public WebElement findElementByLinkText(String linkText) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(linkText)));
|
||||
}
|
||||
|
||||
// 通过partialLinkText查找元素
|
||||
public WebElement findElementByPartialLinkText(String partialLinkText) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.partialLinkText(partialLinkText)));
|
||||
}
|
||||
|
||||
// 通过tagName查找元素
|
||||
public WebElement findElementByTagName(String tagName) {
|
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(By.tagName(tagName)));
|
||||
}
|
||||
|
||||
// 查找多个元素
|
||||
public List<WebElement> findElements(By by) {
|
||||
return wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));
|
||||
}
|
||||
|
||||
// 输入文本
|
||||
public void sendKeys(WebElement element, String text) {
|
||||
wait.until(ExpectedConditions.visibilityOf(element)).clear();
|
||||
element.sendKeys(text);
|
||||
}
|
||||
|
||||
// 点击元素
|
||||
public void click(WebElement element) {
|
||||
wait.until(ExpectedConditions.elementToBeClickable(element)).click();
|
||||
}
|
||||
|
||||
// 获取元素文本
|
||||
public String getText(WebElement element) {
|
||||
return wait.until(ExpectedConditions.visibilityOf(element)).getText();
|
||||
}
|
||||
|
||||
// 获取元素属性值
|
||||
public String getAttribute(WebElement element, String attribute) {
|
||||
return wait.until(ExpectedConditions.visibilityOf(element)).getAttribute(attribute);
|
||||
}
|
||||
|
||||
// 判断元素是否显示
|
||||
public boolean isDisplayed(WebElement element) {
|
||||
try {
|
||||
return element.isDisplayed();
|
||||
} catch (NoSuchElementException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断元素是否启用
|
||||
public boolean isEnabled(WebElement element) {
|
||||
try {
|
||||
return element.isEnabled();
|
||||
} catch (NoSuchElementException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断元素是否被选中
|
||||
public boolean isSelected(WebElement element) {
|
||||
try {
|
||||
return element.isSelected();
|
||||
} catch (NoSuchElementException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 选择下拉框选项(通过value)
|
||||
public void selectByValue(WebElement element, String value) {
|
||||
new Select(wait.until(ExpectedConditions.visibilityOf(element))).selectByValue(value);
|
||||
}
|
||||
|
||||
// 选择下拉框选项(通过visible text)
|
||||
public void selectByVisibleText(WebElement element, String text) {
|
||||
new Select(wait.until(ExpectedConditions.visibilityOf(element))).selectByVisibleText(text);
|
||||
}
|
||||
|
||||
// 选择下拉框选项(通过index)
|
||||
public void selectByIndex(WebElement element, int index) {
|
||||
new Select(wait.until(ExpectedConditions.visibilityOf(element))).selectByIndex(index);
|
||||
}
|
||||
|
||||
// 获取下拉框所有选项
|
||||
public List<WebElement> getSelectOptions(WebElement element) {
|
||||
return new Select(element).getOptions();
|
||||
}
|
||||
|
||||
// 获取选中的下拉框选项
|
||||
public WebElement getFirstSelectedOption(WebElement element) {
|
||||
return new Select(element).getFirstSelectedOption();
|
||||
}
|
||||
|
||||
// 鼠标悬停
|
||||
public void mouseHover(WebElement element) {
|
||||
actions.moveToElement(wait.until(ExpectedConditions.visibilityOf(element))).perform();
|
||||
}
|
||||
|
||||
// 鼠标双击
|
||||
public void doubleClick(WebElement element) {
|
||||
actions.doubleClick(wait.until(ExpectedConditions.visibilityOf(element))).perform();
|
||||
}
|
||||
|
||||
// 鼠标右键点击
|
||||
public void contextClick(WebElement element) {
|
||||
actions.contextClick(wait.until(ExpectedConditions.visibilityOf(element))).perform();
|
||||
}
|
||||
|
||||
// 拖拽元素
|
||||
public void dragAndDrop(WebElement source, WebElement target) {
|
||||
actions.dragAndDrop(
|
||||
wait.until(ExpectedConditions.visibilityOf(source)),
|
||||
wait.until(ExpectedConditions.visibilityOf(target))
|
||||
).perform();
|
||||
}
|
||||
|
||||
// 执行JavaScript
|
||||
public Object executeScript(String script, Object... args) {
|
||||
JavascriptExecutor js = (JavascriptExecutor) driver;
|
||||
return js.executeScript(script, args);
|
||||
}
|
||||
|
||||
// 滚动到元素可见
|
||||
public void scrollToElement(WebElement element) {
|
||||
executeScript("arguments[0].scrollIntoView(true);", element);
|
||||
}
|
||||
|
||||
// 滚动到页面底部
|
||||
public void scrollToBottom() {
|
||||
executeScript("window.scrollTo(0, document.body.scrollHeight)");
|
||||
}
|
||||
|
||||
// 滚动到页面顶部
|
||||
public void scrollToTop() {
|
||||
executeScript("window.scrollTo(0, 0)");
|
||||
}
|
||||
|
||||
// 切换到frame
|
||||
public void switchToFrame(WebElement frameElement) {
|
||||
driver.switchTo().frame(frameElement);
|
||||
}
|
||||
|
||||
// 切换到主窗口
|
||||
public void switchToDefaultContent() {
|
||||
driver.switchTo().defaultContent();
|
||||
}
|
||||
|
||||
// 切换到父frame
|
||||
public void switchToParentFrame() {
|
||||
driver.switchTo().parentFrame();
|
||||
}
|
||||
|
||||
// 切换到alert
|
||||
public Alert switchToAlert() {
|
||||
return wait.until(ExpectedConditions.alertIsPresent());
|
||||
}
|
||||
|
||||
// 接受alert
|
||||
public void acceptAlert() {
|
||||
switchToAlert().accept();
|
||||
}
|
||||
|
||||
// 取消alert
|
||||
public void dismissAlert() {
|
||||
switchToAlert().dismiss();
|
||||
}
|
||||
|
||||
// 获取alert文本
|
||||
// public String getAlertText() {
|
||||
// return switchToAlert().getText();
|
||||
// }
|
||||
|
||||
// 在alert中输入文本
|
||||
public void sendKeysToAlert(String text) {
|
||||
switchToAlert().sendKeys(text);
|
||||
}
|
||||
|
||||
// 切换到窗口
|
||||
public void switchToWindow(String windowHandle) {
|
||||
driver.switchTo().window(windowHandle);
|
||||
}
|
||||
|
||||
// 获取当前窗口句柄
|
||||
public String getCurrentWindowHandle() {
|
||||
return driver.getWindowHandle();
|
||||
}
|
||||
|
||||
// 获取所有窗口句柄
|
||||
public Set<String> getAllWindowHandles() {
|
||||
return driver.getWindowHandles();
|
||||
}
|
||||
|
||||
// 关闭当前窗口
|
||||
public void closeCurrentWindow() {
|
||||
driver.close();
|
||||
}
|
||||
|
||||
// 刷新页面
|
||||
public void refreshPage() {
|
||||
driver.navigate().refresh();
|
||||
}
|
||||
|
||||
// 前进
|
||||
public void navigateForward() {
|
||||
driver.navigate().forward();
|
||||
}
|
||||
|
||||
// 后退
|
||||
public void navigateBack() {
|
||||
driver.navigate().back();
|
||||
}
|
||||
|
||||
// 获取页面源码
|
||||
public String getPageSource() {
|
||||
return driver.getPageSource();
|
||||
}
|
||||
|
||||
// 设置窗口大小
|
||||
public void setWindowSize(int width, int height) {
|
||||
driver.manage().window().setSize(new Dimension(width, height));
|
||||
}
|
||||
|
||||
// 最大化窗口
|
||||
public void maximizeWindow() {
|
||||
driver.manage().window().maximize();
|
||||
}
|
||||
|
||||
// 全屏窗口
|
||||
public void fullscreenWindow() {
|
||||
driver.manage().window().fullscreen();
|
||||
}
|
||||
|
||||
// 获取cookie
|
||||
public Set<Cookie> getCookies() {
|
||||
return driver.manage().getCookies();
|
||||
}
|
||||
|
||||
// 获取指定cookie
|
||||
public Cookie getCookieNamed(String name) {
|
||||
return driver.manage().getCookieNamed(name);
|
||||
}
|
||||
|
||||
// 添加cookie
|
||||
public void addCookie(Cookie cookie) {
|
||||
driver.manage().addCookie(cookie);
|
||||
}
|
||||
|
||||
// 删除cookie
|
||||
public void deleteCookie(Cookie cookie) {
|
||||
driver.manage().deleteCookie(cookie);
|
||||
}
|
||||
|
||||
// 删除指定cookie
|
||||
public void deleteCookieNamed(String name) {
|
||||
driver.manage().deleteCookieNamed(name);
|
||||
}
|
||||
|
||||
// 删除所有cookie
|
||||
public void deleteAllCookies() {
|
||||
driver.manage().deleteAllCookies();
|
||||
}
|
||||
|
||||
// 等待元素可见
|
||||
public void waitForElementVisible(By by, long timeoutInSeconds) {
|
||||
new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds))
|
||||
.until(ExpectedConditions.visibilityOfElementLocated(by));
|
||||
}
|
||||
|
||||
// 等待元素可点击
|
||||
public void waitForElementClickable(By by, long timeoutInSeconds) {
|
||||
new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds))
|
||||
.until(ExpectedConditions.elementToBeClickable(by));
|
||||
}
|
||||
|
||||
// 等待元素消失
|
||||
public void waitForElementInvisible(By by, long timeoutInSeconds) {
|
||||
new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds))
|
||||
.until(ExpectedConditions.invisibilityOfElementLocated(by));
|
||||
}
|
||||
|
||||
// 等待文本出现在元素中
|
||||
public void waitForTextPresentInElement(By by, String text, long timeoutInSeconds) {
|
||||
new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds))
|
||||
.until(ExpectedConditions.textToBePresentInElementLocated(by, text));
|
||||
}
|
||||
|
||||
// 截屏并保存为Base64
|
||||
public String takeScreenshotAsBase64() {
|
||||
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
|
||||
}
|
||||
|
||||
// 截屏并保存为字节数组
|
||||
public byte[] takeScreenshotAsBytes() {
|
||||
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* 截屏并保存为文件
|
||||
* @param filePath 保存路径的基础目录
|
||||
* @return 保存后的文件完整路径
|
||||
*/
|
||||
public String takeScreenshotAsFile(String filePath) {
|
||||
try {
|
||||
// 生成文件名: screenshot_年月日_时分秒.png
|
||||
String timestamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
|
||||
String fileName = "screenshot_" + timestamp + ".png";
|
||||
|
||||
// 确保目录存在
|
||||
File directory = new File(filePath);
|
||||
if (!directory.exists()) {
|
||||
boolean created = directory.mkdirs();
|
||||
if (!created) {
|
||||
log.error("无法创建目录: {}", filePath);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查目录是否可写
|
||||
if (!directory.canWrite()) {
|
||||
log.error("目录不可写: {}", filePath);
|
||||
return null;
|
||||
}
|
||||
|
||||
// 获取截图临时文件
|
||||
File tempFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
|
||||
|
||||
// 构建目标文件路径
|
||||
String fullPath = filePath + File.separator + fileName;
|
||||
File targetFile = new File(fullPath);
|
||||
|
||||
// 复制文件到目标路径
|
||||
FileUtils.copyFile(tempFile, targetFile);
|
||||
|
||||
log.info("截图已保存到: {}", targetFile.getAbsolutePath());
|
||||
return targetFile.getAbsolutePath();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("截图保存失败: {}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 关闭浏览器
|
||||
public void quit() {
|
||||
if (driver != null) {
|
||||
driver.quit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Add SeleniumUtils -----
|
||||
|
||||
|
||||
/**
|
||||
* 根据句柄ID切换到指定窗口
|
||||
* @param handleId 窗口句柄ID
|
||||
*/
|
||||
public void switchToWindowByHandle(String handleId) {
|
||||
driver.switchTo().window(handleId);
|
||||
log.info("已切换到句柄ID为 {} 的窗口", handleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据网页索引号切换到指定窗口
|
||||
* @param index 窗口索引(从0开始)
|
||||
*/
|
||||
public void switchToWindowByIndex(int index) {
|
||||
Set<String> handles = driver.getWindowHandles();
|
||||
if (index >= 0 && index < handles.size()) {
|
||||
String handle = handles.toArray(new String[0])[index];
|
||||
driver.switchTo().window(handle);
|
||||
log.info("已切换到索引为 {} 的窗口", index);
|
||||
} else {
|
||||
throw new NoSuchWindowException("无效的窗口索引: " + index);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换到初始窗口(第一个打开的窗口)
|
||||
*/
|
||||
public void switchToDefaultWindow() {
|
||||
Set<String> handles = driver.getWindowHandles();
|
||||
if (!handles.isEmpty()) {
|
||||
String firstHandle = handles.iterator().next();
|
||||
driver.switchTo().window(firstHandle);
|
||||
log.info("已切换回初始窗口");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据索引切换到指定frame
|
||||
* @param index frame索引(从0开始)
|
||||
*/
|
||||
public void switchToFrameByIndex(int index) {
|
||||
try {
|
||||
driver.switchTo().frame(index);
|
||||
log.info("已切换到索引为 {} 的frame", index);
|
||||
} catch (NoSuchFrameException e) {
|
||||
log.error("按索引切换frame失败: {}", e.getMessage());
|
||||
throw new RuntimeException("找不到索引为 " + index + " 的frame", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据定位方式切换到frame
|
||||
* @param locatorType 定位类型(id/name/xpath/css等)
|
||||
* @param locatorValue 定位值
|
||||
*/
|
||||
public void switchToFrameByLocator(String locatorType, String locatorValue) {
|
||||
By locator = getLocator(locatorType, locatorValue);
|
||||
try {
|
||||
WebElement frameElement = wait.until(ExpectedConditions.presenceOfElementLocated(locator));
|
||||
driver.switchTo().frame(frameElement);
|
||||
log.info("已切换到 {} = '{}' 的frame", locatorType, locatorValue);
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待frame元素超时: {} = '{}'", locatorType, locatorValue);
|
||||
throw new RuntimeException("找不到 " + locatorType + " = '" + locatorValue + "' 的frame元素", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据定位类型和值获取Selenium定位器
|
||||
* @param locatorType 定位类型(不区分大小写):
|
||||
* id/name/className/tagName/linkText/partialLinkText/css/xpath/label/value/index
|
||||
* @param locatorValue 定位值
|
||||
* @return By 定位器对象
|
||||
* @throws IllegalArgumentException 如果定位类型不支持
|
||||
*/
|
||||
public By getLocator(String locatorType, String locatorValue) {
|
||||
if (locatorValue == null || locatorValue.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("定位值不能为空");
|
||||
}
|
||||
|
||||
switch (locatorType.toLowerCase()) {
|
||||
case "id":
|
||||
return By.id(locatorValue);
|
||||
case "name":
|
||||
return By.name(locatorValue);
|
||||
case "classname":
|
||||
case "class":
|
||||
return By.className(locatorValue);
|
||||
case "tagname":
|
||||
case "tag":
|
||||
return By.tagName(locatorValue);
|
||||
case "linktext":
|
||||
case "link":
|
||||
return By.linkText(locatorValue);
|
||||
case "partiallinktext":
|
||||
case "partiallink":
|
||||
return By.partialLinkText(locatorValue);
|
||||
case "css":
|
||||
case "cssselector":
|
||||
return By.cssSelector(locatorValue);
|
||||
case "xpath":
|
||||
return By.xpath(locatorValue);
|
||||
case "label":
|
||||
// 通过label文本定位对应的元素
|
||||
return By.xpath(String.format("//label[contains(text(), '%s')]", locatorValue));
|
||||
case "value":
|
||||
// 通过value属性定位
|
||||
return By.xpath(String.format("//*[@value='%s']", locatorValue));
|
||||
case "index":
|
||||
// 索引定位需要特殊处理,通常结合其他定位方式使用
|
||||
try {
|
||||
int index = Integer.parseInt(locatorValue);
|
||||
return By.xpath(String.format("(//*)[%d]", index + 1)); // XPath索引从1开始
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalArgumentException("索引必须是数字: " + locatorValue);
|
||||
}
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的定位类型: " + locatorType +
|
||||
"。支持的定位类型: id,name,className,tagName,linkText," +
|
||||
"partialLinkText,css,xpath,label,value,index");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理弹窗
|
||||
* @param operationType 操作类型 (1=确定, 2=取消)
|
||||
* @param inputText 需要输入的文本 (可为null表示不输入)
|
||||
*/
|
||||
public void handleAlert(int operationType, String inputText) {
|
||||
try {
|
||||
Alert alert = wait.until(ExpectedConditions.alertIsPresent());
|
||||
|
||||
// 如果有输入文本
|
||||
if (inputText != null && !inputText.isEmpty()) {
|
||||
alert.sendKeys(inputText);
|
||||
log.info("已在弹窗中输入文本: {}", inputText);
|
||||
}
|
||||
|
||||
// 执行确认或取消操作
|
||||
if (operationType == 1) {
|
||||
alert.accept();
|
||||
log.info("已确认弹窗");
|
||||
} else if (operationType == 2) {
|
||||
alert.dismiss();
|
||||
log.info("已取消弹窗");
|
||||
} else {
|
||||
throw new IllegalArgumentException("无效的弹窗操作类型: " + operationType);
|
||||
}
|
||||
|
||||
} catch (NoAlertPresentException e) {
|
||||
log.error("没有找到弹窗", e);
|
||||
throw new RuntimeException("当前没有可操作的弹窗", e);
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待弹窗超时", e);
|
||||
throw new RuntimeException("等待弹窗出现超时", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取弹窗文本
|
||||
* @return 弹窗显示的文本内容
|
||||
*/
|
||||
public String getAlertText() {
|
||||
try {
|
||||
Alert alert = wait.until(ExpectedConditions.alertIsPresent());
|
||||
String text = alert.getText();
|
||||
log.info("获取到弹窗文本: {}", text);
|
||||
return text;
|
||||
} catch (Exception e) {
|
||||
log.error("获取弹窗文本失败", e);
|
||||
throw new RuntimeException("无法获取弹窗文本", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据定位方式和定位值查找元素
|
||||
* @param locType 定位方式 (如 "id", "xpath", "cssSelector" 等)
|
||||
* @param locValue 定位值
|
||||
* @return 找到的WebElement
|
||||
*/
|
||||
public WebElement findElement(String locType, String locValue) {
|
||||
try {
|
||||
By by = getLocator(locType, locValue);
|
||||
WebElement element = wait.until(ExpectedConditions.presenceOfElementLocated(by));
|
||||
return element;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("无法定位元素,定位方式:" + locType + ",定位值:" + locValue, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作下拉框
|
||||
* @param element 下拉框元素
|
||||
* @param optionType 选项类型 (1=选项文本, 2=索引, 3=值)
|
||||
* @param optionValue 选项值
|
||||
*/
|
||||
public void selectDropdownOption(WebElement element, String optionType, String optionValue) {
|
||||
Select select = new Select(element);
|
||||
try {
|
||||
switch (optionType) {
|
||||
case "1": // 选项文本
|
||||
select.selectByVisibleText(optionValue);
|
||||
log.info("通过选项文本选择下拉框选项: {}", optionValue);
|
||||
break;
|
||||
case "2": // 索引
|
||||
int index = Integer.parseInt(optionValue);
|
||||
select.selectByIndex(index);
|
||||
log.info("通过索引选择下拉框选项: {}", index);
|
||||
break;
|
||||
case "3": // 值
|
||||
select.selectByValue(optionValue);
|
||||
log.info("通过值选择下拉框选项: {}", optionValue);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的选项类型: " + optionType);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("操作下拉框失败", e);
|
||||
throw new RuntimeException("操作下拉框失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 等待元素满足指定条件
|
||||
* @param locator 元素定位器
|
||||
* @param operate 操作类型:
|
||||
* 1=等待元素文本等于给定值
|
||||
* 2=等待元素存在
|
||||
* 3=等待元素显示
|
||||
* 4=等待元素不显示
|
||||
* 5=等待元素不存在
|
||||
* 6=等待元素可编辑
|
||||
* 7=等待元素不可编辑
|
||||
* @param awaitValue 等待的值(用于文本比较或自定义超时时间)
|
||||
* @param timeoutInMillis 默认超时时间(毫秒)
|
||||
*/
|
||||
public void waitForElement(By locator, int operate, String awaitValue, long timeoutInMillis) {
|
||||
WebDriverWait customWait = new WebDriverWait(driver, Duration.ofMillis(timeoutInMillis));
|
||||
|
||||
try {
|
||||
switch (operate) {
|
||||
case 1: // 等待元素文本等于给定值
|
||||
customWait.until(ExpectedConditions.textToBe(locator, awaitValue));
|
||||
log.info("元素文本已等于: {}", awaitValue);
|
||||
break;
|
||||
case 2: // 等待元素存在
|
||||
customWait.until(ExpectedConditions.presenceOfElementLocated(locator));
|
||||
log.info("元素已存在");
|
||||
break;
|
||||
case 3: // 等待元素显示
|
||||
customWait.until(ExpectedConditions.visibilityOfElementLocated(locator));
|
||||
log.info("元素已显示");
|
||||
break;
|
||||
case 4: // 等待元素不显示
|
||||
customWait.until(ExpectedConditions.invisibilityOfElementLocated(locator));
|
||||
log.info("元素已不显示");
|
||||
break;
|
||||
case 5: // 等待元素不存在
|
||||
boolean isAbsent = customWait.until(ExpectedConditions.not(
|
||||
ExpectedConditions.presenceOfElementLocated(locator)
|
||||
));
|
||||
log.info("元素已不存在");
|
||||
break;
|
||||
case 6: // 等待元素可编辑
|
||||
customWait.until(driver -> {
|
||||
WebElement element = driver.findElement(locator);
|
||||
return element.isEnabled() && !element.getAttribute("readonly").equals("true");
|
||||
});
|
||||
log.info("元素已可编辑");
|
||||
break;
|
||||
case 7: // 等待元素不可编辑
|
||||
customWait.until(driver -> {
|
||||
WebElement element = driver.findElement(locator);
|
||||
return !element.isEnabled() || element.getAttribute("readonly").equals("true");
|
||||
});
|
||||
log.info("元素已不可编辑");
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的等待操作类型: " + operate);
|
||||
}
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待元素超时,操作类型: {}, 定位器: {}", operate, locator);
|
||||
throw new RuntimeException("等待元素条件未满足: " + getOperationDescription(operate), e);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取操作类型描述
|
||||
private String getOperationDescription(int operate) {
|
||||
switch (operate) {
|
||||
case 1: return "文本等于给定值";
|
||||
case 2: return "元素存在";
|
||||
case 3: return "元素显示";
|
||||
case 4: return "元素不显示";
|
||||
case 5: return "元素不存在";
|
||||
case 6: return "元素可编辑";
|
||||
case 7: return "元素不可编辑";
|
||||
default: return "未知操作";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行鼠标操作
|
||||
* @param locator 元素定位器
|
||||
* @param clickMethod 点击方式:
|
||||
* 1=单击(左键)
|
||||
* 2=单击(右键)
|
||||
* 3=双击
|
||||
* 4=按下
|
||||
* 5=弹起
|
||||
*/
|
||||
public void performMouseAction(By locator, int clickMethod) {
|
||||
try {
|
||||
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(locator));
|
||||
|
||||
switch (clickMethod) {
|
||||
case 1: // 左键单击
|
||||
actions.click(element).perform();
|
||||
log.info("已执行左键单击操作");
|
||||
break;
|
||||
case 2: // 右键单击
|
||||
actions.contextClick(element).perform();
|
||||
log.info("已执行右键单击操作");
|
||||
break;
|
||||
case 3: // 双击
|
||||
actions.doubleClick(element).perform();
|
||||
log.info("已执行双击操作");
|
||||
break;
|
||||
case 4: // 按下
|
||||
actions.clickAndHold(element).perform();
|
||||
log.info("已执行鼠标按下操作");
|
||||
break;
|
||||
case 5: // 弹起
|
||||
actions.release(element).perform();
|
||||
log.info("已执行鼠标弹起操作");
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的鼠标操作类型: " + clickMethod);
|
||||
}
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待元素可点击超时,定位器: {}", locator);
|
||||
throw new RuntimeException("元素不可点击或未找到: " + locator, e);
|
||||
} catch (Exception e) {
|
||||
log.error("鼠标操作执行失败", e);
|
||||
throw new RuntimeException("鼠标操作失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行鼠标移动操作
|
||||
* @param locator 元素定位器
|
||||
* @param moveType 移动类型:
|
||||
* 1=鼠标移出元素
|
||||
* 2=鼠标移入元素
|
||||
*/
|
||||
public void performMouseMove(By locator, int moveType) {
|
||||
try {
|
||||
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
|
||||
|
||||
switch (moveType) {
|
||||
case 1: // 鼠标移出元素
|
||||
// 先移动到元素上,再移动到页面左上角
|
||||
actions.moveToElement(element)
|
||||
.moveByOffset(-element.getSize().getWidth(), -element.getSize().getHeight())
|
||||
.perform();
|
||||
log.info("已将鼠标从元素移出");
|
||||
break;
|
||||
case 2: // 鼠标移入元素(悬停)
|
||||
actions.moveToElement(element).perform();
|
||||
log.info("已将鼠标悬停在元素上");
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的鼠标移动类型: " + moveType);
|
||||
}
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待元素可见超时,定位器: {}", locator);
|
||||
throw new RuntimeException("元素不可见或未找到: " + locator, e);
|
||||
} catch (Exception e) {
|
||||
log.error("鼠标移动操作执行失败", e);
|
||||
throw new RuntimeException("鼠标移动操作失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 在指定元素中输入文本
|
||||
* @param locator 元素定位器
|
||||
* @param text 要输入的文本
|
||||
* @param clearFirst 是否先清空原有内容
|
||||
* @param inputMethod 输入方式:
|
||||
* 1=普通输入(sendKeys)
|
||||
* 2=通过JavaScript设置值
|
||||
* 3=模拟人工输入(带延迟)
|
||||
*/
|
||||
public void inputText(By locator, String text, boolean clearFirst, int inputMethod) {
|
||||
try {
|
||||
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
|
||||
|
||||
// 先清空内容(如果需要)
|
||||
if (clearFirst) {
|
||||
element.clear();
|
||||
log.info("已清空输入框内容");
|
||||
}
|
||||
|
||||
switch (inputMethod) {
|
||||
case 1: // 普通输入
|
||||
element.sendKeys(text);
|
||||
log.info("已通过sendKeys输入文本: {}", text);
|
||||
break;
|
||||
case 2: // JavaScript输入
|
||||
JavascriptExecutor js = (JavascriptExecutor) driver;
|
||||
js.executeScript("arguments[0].value = arguments[1]", element, text);
|
||||
log.info("已通过JavaScript设置文本: {}", text);
|
||||
break;
|
||||
case 3: // 模拟人工输入
|
||||
for (char c : text.toCharArray()) {
|
||||
element.sendKeys(String.valueOf(c));
|
||||
Thread.sleep(50); // 每个字符间隔50ms
|
||||
}
|
||||
log.info("已模拟人工输入文本: {}", text);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的输入方式: " + inputMethod);
|
||||
}
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待输入元素可见超时,定位器: {}", locator);
|
||||
throw new RuntimeException("输入元素不可见或未找到: " + locator, e);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
log.error("模拟人工输入被中断");
|
||||
throw new RuntimeException("输入操作被中断", e);
|
||||
} catch (Exception e) {
|
||||
log.error("输入操作执行失败", e);
|
||||
throw new RuntimeException("输入操作失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在可编辑段落中输入文本(如富文本编辑器)
|
||||
* @param locator 元素定位器
|
||||
* @param text 要输入的文本
|
||||
*/
|
||||
public void inputToEditableDiv(By locator, String text) {
|
||||
try {
|
||||
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
|
||||
element.click(); // 先点击激活
|
||||
element.sendKeys(text);
|
||||
log.info("已在可编辑段落中输入文本: {}", text);
|
||||
} catch (Exception e) {
|
||||
log.error("可编辑段落输入失败", e);
|
||||
throw new RuntimeException("可编辑段落输入失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空输入框内容
|
||||
* @param locator 元素定位器
|
||||
*/
|
||||
public void clearInput(By locator) {
|
||||
try {
|
||||
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
|
||||
element.clear();
|
||||
log.info("已清空输入框内容");
|
||||
} catch (Exception e) {
|
||||
log.error("清空输入框失败", e);
|
||||
throw new RuntimeException("清空输入框失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在新标签页打开URL
|
||||
* @param url 要打开的网址
|
||||
*/
|
||||
public void openUrlInNewTab(String url) {
|
||||
// 打开新标签页
|
||||
driver.switchTo().newWindow(WindowType.TAB);
|
||||
|
||||
// 导航到目标URL
|
||||
driver.get(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据提取提取窗口信息
|
||||
* @param windowType
|
||||
* @return
|
||||
*/
|
||||
public String extractWindowInformation(String windowType) {
|
||||
switch (windowType) {
|
||||
case "1": // 窗口 Handle
|
||||
return driver.getWindowHandle();
|
||||
case "2": // 网页标题
|
||||
return driver.getTitle();
|
||||
default:
|
||||
throw new IllegalArgumentException("Invalid windowType: " + windowType);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找多个元素
|
||||
* @param locType
|
||||
* @param locValue
|
||||
* @return
|
||||
*/
|
||||
public List<WebElement> findElements(String locType, String locValue) {
|
||||
return driver.findElements(getLocator(locType, locValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网页标题
|
||||
* @return
|
||||
*/
|
||||
public String getTitle(){
|
||||
return driver.getTitle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.test.common.utils;
|
||||
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:
|
||||
* @date 2025-04-21 09:53
|
||||
*/
|
||||
public class UITestUtil {
|
||||
public static void main(String[] args) {
|
||||
// 设置 WebDriver 的路径 (根据你的实际路径修改)
|
||||
System.setProperty("webdriver.chrome.driver", "E:/AA/chromedriver-win64/chromedriver.exe");
|
||||
|
||||
// 初始化 ChromeDriver
|
||||
WebDriver driver = new ChromeDriver();
|
||||
|
||||
try {
|
||||
// 打开目标网页的登录页面
|
||||
String url = "https://sso.gxnews.com.cn/"; // 替换为实际的登录页面 URL
|
||||
driver.get(url);
|
||||
|
||||
// 最大化浏览器窗口
|
||||
driver.manage().window().maximize();
|
||||
|
||||
// 创建 WebDriverWait 实例,设置最大等待时间为 10 秒
|
||||
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(60));
|
||||
|
||||
// 等待用户名输入框可见并输入用户名
|
||||
WebElement usernameInput = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username")));
|
||||
usernameInput.sendKeys("ldlspace"); // 替换为实际用户名
|
||||
|
||||
// 等待密码输入框可见并输入密码
|
||||
WebElement passwordInput = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("password")));
|
||||
passwordInput.sendKeys("Ldl08844"); // 替换为实际密码
|
||||
|
||||
// 等待登录按钮可点击并点击
|
||||
WebElement loginButton = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id=\"button\"]")));
|
||||
loginButton.click();
|
||||
Thread.sleep(3000);
|
||||
String currentUrl = driver.getCurrentUrl();
|
||||
System.out.println(currentUrl);
|
||||
WebElement welcome = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id=\"list\"]/ul/li[1]")));
|
||||
String welcomeText = welcome.getText();
|
||||
if (welcomeText.equals("ldlspace,欢迎您登录")) {
|
||||
System.out.println("登录成功!");
|
||||
} else {
|
||||
System.out.println("登录失败!");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
// 关闭浏览器
|
||||
driver.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,8 +25,8 @@ public class PerformanceReportController extends BaseController {
|
||||
@Autowired
|
||||
private IPerformanceTestCaseReportService performanceTestCaseReportService;
|
||||
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody PerformanceTestCaseReport input)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PerformanceTestCaseReport input)
|
||||
{
|
||||
startPage();
|
||||
input.setDelFlag("0");
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.StringUtils;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.test.domain.PerformanceTest;
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.qo.PerformanceTestQO;
|
||||
@@ -12,16 +17,12 @@ import com.test.test.service.ITestCaseService;
|
||||
import com.test.test.task.DynamicTaskManager;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 性能测试Controller
|
||||
@@ -119,6 +120,7 @@ public class PerformanceTestController extends BaseController {
|
||||
@PostMapping("/addAndExecute")
|
||||
public AjaxResult addAndExecute(@RequestBody PerformanceTestQO performanceTestQO) {
|
||||
try {
|
||||
String createBy = getLoginUser().getUsername();
|
||||
Long l = performanceTestService.insertPerformanceTest(performanceTestQO);
|
||||
// 获取新增的任务完整信息
|
||||
PerformanceTestVO newTaskVo = performanceTestService.selectPerformanceTestById(l);
|
||||
@@ -133,8 +135,10 @@ public class PerformanceTestController extends BaseController {
|
||||
}
|
||||
// 执行性能测试
|
||||
try {
|
||||
Long l1 = performanceTestCaseReportService.executePerformanceTestAndReport(l, jmeterHomePath, 2);
|
||||
return success(l1);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
performanceTestCaseReportService.executePerformanceTestAndReport(l, jmeterHomePath, 2, createBy);
|
||||
});
|
||||
return toAjax(true);
|
||||
} catch (Exception e) {
|
||||
log.error("执行失败!", e);
|
||||
return error("执行失败!");
|
||||
@@ -157,7 +161,8 @@ public class PerformanceTestController extends BaseController {
|
||||
Long l = performanceTestService.updatePerformanceTest(performanceTestQO);
|
||||
PerformanceTestVO updatedTask = performanceTestService.selectPerformanceTestById(performanceTestQO.getId());
|
||||
// 如果crontab或crontab_status被修改了,则更新定时任务
|
||||
if (!updatedTask.getCrontab().equals(originalTask.getCrontab())
|
||||
if ((!StringUtils.isEmpty(updatedTask.getCrontab()) &&
|
||||
!StringUtils.isEmpty(originalTask.getCrontab()) && !updatedTask.getCrontab().equals(originalTask.getCrontab()))
|
||||
|| updatedTask.getCrontabStatus() != originalTask.getCrontabStatus()) {
|
||||
PerformanceTest entity = new PerformanceTest();
|
||||
entity.setId(updatedTask.getId());
|
||||
@@ -178,6 +183,7 @@ public class PerformanceTestController extends BaseController {
|
||||
@Log(title = "性能测试", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/editAndExecute")
|
||||
public AjaxResult editAndExecute(@RequestBody PerformanceTestQO performanceTestQO) {
|
||||
String createBy = getLoginUser().getUsername();
|
||||
try {
|
||||
PerformanceTestVO originalTask = performanceTestService.selectPerformanceTestById(performanceTestQO.getId());
|
||||
Long l = performanceTestService.updatePerformanceTest(performanceTestQO);
|
||||
@@ -193,11 +199,13 @@ public class PerformanceTestController extends BaseController {
|
||||
dynamicTaskManager.updateTask(entity);
|
||||
}
|
||||
try {
|
||||
Long l1 = performanceTestCaseReportService.executePerformanceTestAndReport(l, jmeterHomePath, 2);
|
||||
return success(l1);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
performanceTestCaseReportService.executePerformanceTestAndReport(l, jmeterHomePath, 2, createBy);
|
||||
});
|
||||
return toAjax(true);
|
||||
} catch (Exception e) {
|
||||
log.error("执行失败!", e);
|
||||
return error("执行失败!");
|
||||
return error("执行失败!"+e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("修改并执行失败!", e);
|
||||
@@ -212,16 +220,20 @@ public class PerformanceTestController extends BaseController {
|
||||
@Log(title = "性能测试", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
dynamicTaskManager.removeTasks(ids);
|
||||
return toAjax(performanceTestService.deletePerformanceTestByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除性能测试
|
||||
* 立即执行性能测试
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:test:remove')")
|
||||
@GetMapping("/executeNow")
|
||||
public AjaxResult executeNow(@RequestParam Long id) {
|
||||
Long l1 = performanceTestCaseReportService.executePerformanceTestAndReport(id, jmeterHomePath, 2);
|
||||
return success(l1);
|
||||
String createBy = getLoginUser().getUsername();
|
||||
CompletableFuture.runAsync(() -> {
|
||||
performanceTestCaseReportService.executePerformanceTestAndReport(id, jmeterHomePath, 2, createBy);
|
||||
});
|
||||
return toAjax(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.common.utils.SecurityUtils;
|
||||
import com.test.common.utils.uuid.IdUtils;
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestPlanCase;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestCaseListQO;
|
||||
import com.test.test.service.ITestCaseService;
|
||||
@@ -44,6 +46,16 @@ public class TestCaseController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询测试计划可关联的用例列表
|
||||
*/
|
||||
@GetMapping("/planRelateList")
|
||||
public TableDataInfo planRelateList(TestCaseListQO qo) {
|
||||
startPage();
|
||||
List<TestCase> list = testCaseService.selectValidTestPlanCaseList(qo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用例详细信息
|
||||
*/
|
||||
@@ -108,4 +120,19 @@ public class TestCaseController extends BaseController {
|
||||
testCaseService.executeTestCaseById(qo.getId(), jmeterHomePath, caseSid);
|
||||
return AjaxResult.success("执行成功", caseSid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步执行测试计划用例
|
||||
*/
|
||||
@Log(title = "用例", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/runTestPlanCase")
|
||||
public AjaxResult runTestPlanCase(@RequestBody TestPlanCase testPlanCase) {
|
||||
String caseSid = IdUtils.simpleUUID();
|
||||
testPlanCase.setExecuteBy(SecurityUtils.getUsername());
|
||||
// 异步执行任务
|
||||
CompletableFuture.runAsync(() -> {
|
||||
testCaseService.executeTestCaseByPlanCase(testPlanCase, jmeterHomePath, caseSid);
|
||||
});
|
||||
return toAjax(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.enums.EnumDefectStatus;
|
||||
import com.test.common.enums.EnumSeverityLevel;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestDefectListQO;
|
||||
import com.test.test.service.ITestDefectService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试缺陷Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/defect")
|
||||
public class TestDefectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITestDefectService testDefectService;
|
||||
|
||||
/**
|
||||
* 查询测试缺陷列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TestDefectListQO qo)
|
||||
{
|
||||
startPage();
|
||||
List<TestDefect> list = testDefectService.selectTestDefectList(qo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出测试缺陷列表
|
||||
*/
|
||||
@Log(title = "测试缺陷", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportBug")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestBody TestDefectListQO qo) {
|
||||
List<TestDefect> list = testDefectService.selectTestDefectList(qo);
|
||||
for (TestDefect testDefect : list) {
|
||||
testDefect.setStatus(EnumDefectStatus.getDescriptionByCode(testDefect.getStatus()));
|
||||
testDefect.setLevel(EnumSeverityLevel.getDescriptionByCode(testDefect.getLevel()));
|
||||
}
|
||||
ExcelUtil<TestDefect> util = new ExcelUtil<TestDefect>(TestDefect.class);
|
||||
util.exportExcel(response, list, "缺陷数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导出测试缺陷列表
|
||||
*/
|
||||
@Log(title = "测试缺陷", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/batchExportBug")
|
||||
public void batchExport(HttpServletResponse response,
|
||||
@RequestBody List<TestDefect> list) {
|
||||
ExcelUtil<TestDefect> util = new ExcelUtil<TestDefect>(TestDefect.class);
|
||||
for (TestDefect testDefect : list) {
|
||||
testDefect.setStatus(EnumDefectStatus.getDescriptionByCode(testDefect.getStatus()));
|
||||
testDefect.setLevel(EnumSeverityLevel.getDescriptionByCode(testDefect.getLevel()));
|
||||
}
|
||||
util.exportExcel(response, list, "缺陷数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试缺陷详细信息
|
||||
*/
|
||||
@PostMapping("/bugDetail")
|
||||
public AjaxResult getInfo(@RequestBody IDQO qo)
|
||||
{
|
||||
return success(testDefectService.selectTestDefectById(qo.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增测试缺陷
|
||||
*/
|
||||
@Log(title = "测试缺陷", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addBug")
|
||||
public AjaxResult add(@RequestBody TestDefect testDefect)
|
||||
{
|
||||
return toAjax(testDefectService.insertTestDefect(testDefect));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试缺陷
|
||||
*/
|
||||
@Log(title = "测试缺陷", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editBug")
|
||||
public AjaxResult edit(@RequestBody TestDefect testDefect)
|
||||
{
|
||||
return toAjax(testDefectService.updateTestDefect(testDefect));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除测试缺陷
|
||||
*/
|
||||
@Log(title = "测试缺陷", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delBug")
|
||||
public AjaxResult remove(@RequestBody IDQO qo)
|
||||
{
|
||||
TestDefect testDefect = testDefectService.selectTestDefectById(qo.getId());
|
||||
testDefect.setUpdateBy(getUsername());
|
||||
testDefect.setUpdateTime(new Date());
|
||||
testDefect.setDelFlag("1");
|
||||
return toAjax(testDefectService.updateTestDefect(testDefect));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.test.domain.TestPlanCase;
|
||||
import com.test.test.domain.qo.TestPlanCaseQO;
|
||||
import com.test.test.service.ITestPlanCaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划用例关联Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/planCase")
|
||||
public class TestPlanCaseController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITestPlanCaseService testPlanCaseService;
|
||||
|
||||
/**
|
||||
* 查询测试计划用例关联列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TestPlanCase testPlanCase)
|
||||
{
|
||||
startPage();
|
||||
List<TestPlanCase> list = testPlanCaseService.selectTestPlanCaseList(testPlanCase);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出测试计划用例关联列表
|
||||
*/
|
||||
// @Log(title = "测试计划用例关联", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, TestPlanCase testPlanCase)
|
||||
// {
|
||||
// List<TestPlanCase> list = testPlanCaseService.selectTestPlanCaseList(testPlanCase);
|
||||
// ExcelUtil<TestPlanCase> util = new ExcelUtil<TestPlanCase>(TestPlanCase.class);
|
||||
// util.exportExcel(response, list, "测试计划用例关联数据");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取测试计划用例关联详细信息
|
||||
*/
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
// {
|
||||
// return success(testPlanCaseService.selectTestPlanCaseById(id));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增测试计划用例关联
|
||||
*/
|
||||
@Log(title = "测试计划用例关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/saveRelate")
|
||||
public AjaxResult saveRelate(@RequestBody TestPlanCaseQO qo)
|
||||
{
|
||||
testPlanCaseService.saveRelate(qo);
|
||||
return success(qo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试计划用例关联
|
||||
*/
|
||||
// @Log(title = "测试计划用例关联", businessType = BusinessType.UPDATE)
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody TestPlanCase testPlanCase)
|
||||
// {
|
||||
// return toAjax(testPlanCaseService.updateTestPlanCase(testPlanCase));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除测试计划用例关联
|
||||
*/
|
||||
@Log(title = "测试计划用例关联", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delRelate/{ids}")
|
||||
public AjaxResult remove(@PathVariable("ids") Long[] ids)
|
||||
{
|
||||
return toAjax(testPlanCaseService.deleteTestPlanCaseByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanAddQO;
|
||||
import com.test.test.domain.qo.TestPlanListQO;
|
||||
import com.test.test.domain.vo.TestPlanListVO;
|
||||
import com.test.test.domain.vo.TestPlanOverviewTrendDataVO;
|
||||
import com.test.test.domain.vo.TestPlanOverviewVO;
|
||||
import com.test.test.service.ITestPlanService;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 测试计划controller
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/test/testPlan")
|
||||
public class TestPlanController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ITestPlanService testPlanService;
|
||||
|
||||
/**
|
||||
* 查询测试计划列表
|
||||
*/
|
||||
@GetMapping("/testPlanList")
|
||||
public TableDataInfo planList(@Validated TestPlanListQO qo) {
|
||||
startPage();
|
||||
List<TestPlanListVO> list = testPlanService.getPlanList(qo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增测试计划
|
||||
*/
|
||||
@Log(title = "测试计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addPlan")
|
||||
public AjaxResult addPlan(@RequestBody TestPlanAddQO testPlanAddQO) {
|
||||
return toAjax(testPlanService.insertTestPlan(testPlanAddQO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除测试计划
|
||||
*/
|
||||
@Log(title = "测试计划", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/deletePlan")
|
||||
public AjaxResult deletePlan(@RequestBody IDQO qo) {
|
||||
TestPlan testPlan = testPlanService.selectTestPlanById(qo.getId());
|
||||
testPlan.setDelFlag("1");
|
||||
return toAjax(testPlanService.updateTestPlan(testPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试计划详细信息
|
||||
*/
|
||||
@PostMapping("/planDetail")
|
||||
public AjaxResult getInfo(@RequestBody IDQO qo) {
|
||||
return success(testPlanService.selectTestPlanById(qo.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试计划
|
||||
*/
|
||||
@Log(title = "测试计划", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/updatePlan")
|
||||
public AjaxResult edit(@RequestBody TestPlan testPlan) {
|
||||
return toAjax(testPlanService.updateTestPlan(testPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试计划概览信息
|
||||
*/
|
||||
@PostMapping("/planOverview")
|
||||
public TestPlanOverviewVO selectPlanOverview(@RequestBody IDQO qo) {
|
||||
return testPlanService.selectPlanOverview(qo.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试计划用例执行趋势数据
|
||||
*/
|
||||
@PostMapping("/planCaseTrendData")
|
||||
public List<TestPlanOverviewTrendDataVO> getPlanCaseTrendData(@RequestBody IDQO qo) {
|
||||
return testPlanService.getCaseTrendData(qo.getId());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectRelQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
import com.test.test.service.ITestPlanDefectService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/testPlan/defect")
|
||||
public class TestPlanDefectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITestPlanDefectService testPlanDefectService;
|
||||
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TestPlanDefectQO testPlanDefect)
|
||||
{
|
||||
startPage();
|
||||
List<TestPlanDefectVo> list = testPlanDefectService.selectTestPlanDefectList(testPlanDefect);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出测试计划测试缺陷关联列表
|
||||
*/
|
||||
@Log(title = "测试计划测试缺陷关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TestPlanDefectQO testPlanDefect)
|
||||
{
|
||||
List<TestPlanDefectVo> list = testPlanDefectService.selectTestPlanDefectList(testPlanDefect);
|
||||
ExcelUtil<TestPlanDefectVo> util = new ExcelUtil<TestPlanDefectVo>(TestPlanDefectVo.class);
|
||||
util.exportExcel(response, list, "测试计划测试缺陷关联数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试计划测试缺陷关联详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(testPlanDefectService.selectTestPlanDefectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增测试计划测试缺陷关联
|
||||
*/
|
||||
@Log(title = "测试计划测试缺陷关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/addRelDefect")
|
||||
public AjaxResult add(@RequestBody TestPlanDefectRelQO qo)
|
||||
{
|
||||
testPlanDefectService.insertTestPlanDefect(qo);
|
||||
return success(qo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试计划测试缺陷关联
|
||||
*/
|
||||
@Log(title = "测试计划测试缺陷关联", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TestPlanDefect testPlanDefect)
|
||||
{
|
||||
return toAjax(testPlanDefectService.updateTestPlanDefect(testPlanDefect));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除测试计划测试缺陷关联
|
||||
*/
|
||||
@Log(title = "测试计划测试缺陷关联", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delRelDefect/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(testPlanDefectService.deleteTestPlanDefectByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联测试计划列表
|
||||
*/
|
||||
@PostMapping("/defectPlanList")
|
||||
public TableDataInfo defectPlanList(@RequestBody IDQO qo)
|
||||
{
|
||||
startPage();
|
||||
List<TestPlan> list = testPlanDefectService.selectDefectPlanList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联需求列表
|
||||
*/
|
||||
@PostMapping("/defectProjectList")
|
||||
public TableDataInfo defectProjectList(@RequestBody IDQO qo)
|
||||
{
|
||||
startPage();
|
||||
List<TestProject> list = testPlanDefectService.selectDefectProjectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import com.test.test.service.ITestPlanProjectService;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 测试计划需求关联Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/test/testPlanProject")
|
||||
public class TestPlanProjectController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ITestPlanProjectService testPlanProjectService;
|
||||
|
||||
/**
|
||||
* 查询测试计划需求关联列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestPlanProjectVo> list = testPlanProjectService.selectTestPlanProjectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联测试计划列表
|
||||
*/
|
||||
@PostMapping("/relatePlanList")
|
||||
public TableDataInfo relatePlanList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestPlanProjectVo> list = testPlanProjectService.selectRelatePlanList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联用例列表
|
||||
*/
|
||||
@PostMapping("/relateCaseList")
|
||||
public TableDataInfo relateCaseList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestCase> list = testPlanProjectService.selectRelateCaseList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联缺陷列表
|
||||
*/
|
||||
@PostMapping("/relateDefectList")
|
||||
public TableDataInfo relateDefectList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestDefect> list = testPlanProjectService.selectRelateDefectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,13 @@ import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestProjectListQO;
|
||||
import com.test.test.service.ITestProjectService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -19,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 需求controller
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/test/project")
|
||||
@@ -64,6 +69,40 @@ public class TestProjectController extends BaseController {
|
||||
@Log(title = "需求", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delProject")
|
||||
public AjaxResult delProject(@RequestBody IDQO qo) {
|
||||
return toAjax(testProjectService.deleteTestProjectById(qo.getId()));
|
||||
TestProject testProject = testProjectService.selectTestProjectById(qo.getId());
|
||||
testProject.setDelFlag("1");
|
||||
return toAjax(testProjectService.updateTestProject(testProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改需求
|
||||
*/
|
||||
@Log(title = "需求", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editProject")
|
||||
public AjaxResult editProject(@RequestBody TestProject testProject) {
|
||||
return toAjax(testProjectService.updateTestProject(testProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求列表
|
||||
*/
|
||||
@Log(title = "需求", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportProject")
|
||||
public void exportProject(HttpServletResponse response,
|
||||
@RequestBody TestProjectListQO qo) {
|
||||
List<TestProject> list = testProjectService.selectTestProjectList(qo);
|
||||
ExcelUtil<TestProject> util = new ExcelUtil<TestProject>(TestProject.class);
|
||||
util.exportExcel(response, list, "需求数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导出需求列表
|
||||
*/
|
||||
@Log(title = "需求", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/batchExportProject")
|
||||
public void batchExportProject(HttpServletResponse response,
|
||||
@RequestBody List<TestProject> list) {
|
||||
ExcelUtil<TestProject> util = new ExcelUtil<TestProject>(TestProject.class);
|
||||
util.exportExcel(response, list, "需求数据");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.test.domain.TestReport;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestReportAddQO;
|
||||
import com.test.test.domain.vo.TestReportVo;
|
||||
import com.test.test.service.ITestReportService;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 测试报告Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/test/testReport")
|
||||
public class TestReportController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ITestReportService testReportService;
|
||||
|
||||
/**
|
||||
* 查询测试计划关联测试报告列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/reportList")
|
||||
public TableDataInfo list(@Validated IDQO qo) {
|
||||
startPage();
|
||||
List<TestReportVo> list = testReportService.selectTestReportList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增测试报告及关联测试计划
|
||||
* @param testReportAddQO
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "测试报告", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addTestReport")
|
||||
public AjaxResult addTestReport(@RequestBody TestReportAddQO testReportAddQO) {
|
||||
return toAjax(testReportService.addTestReport(testReportAddQO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询测试计划关联测试报告详情
|
||||
*/
|
||||
@PostMapping("/caseExecuteDetail")
|
||||
public AjaxResult caseExecuteDetail(@RequestBody IDQO id) {
|
||||
return success(testReportService.selectCaseTestReportById(id.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除测试报告
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "测试报告", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delExecuteCaseReport")
|
||||
public AjaxResult delExecuteCaseReport(@RequestBody IDQO id) {
|
||||
TestReport testReport = testReportService.selectCaseTestReportById(id.getId());
|
||||
testReport.setDelFlag("1");
|
||||
return toAjax(testReportService.updateExecuteCaseReport(testReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试计划关联测试报告
|
||||
* @param testReport
|
||||
*/
|
||||
@Log(title = "测试报告", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/updateExecuteCaseReport")
|
||||
public AjaxResult updateExecuteCaseReport(@RequestBody TestReport testReport) {
|
||||
return toAjax(testReportService.updateExecuteCaseReport(testReport));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.service.ITestTaskLogService;
|
||||
import com.test.test.service.ITestTaskResultService;
|
||||
import com.test.test.service.ITestTaskService;
|
||||
import com.test.test.task.TestTaskManager;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -42,6 +43,9 @@ public class TestTaskController extends BaseController {
|
||||
@Resource
|
||||
private ITestTaskLogService taskLogService;
|
||||
|
||||
@Resource
|
||||
private TestTaskManager testTaskManager;
|
||||
|
||||
/**
|
||||
* 查询定时任务列表
|
||||
*/
|
||||
@@ -90,9 +94,24 @@ public class TestTaskController extends BaseController {
|
||||
@Log(title = "定时任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody TestTask testTask) {
|
||||
try {
|
||||
testTask.setCreateBy(getLoginUser().getUsername());
|
||||
testTask.setCreateTime(DateUtils.getNowDate());
|
||||
return toAjax(testTaskService.insertTestTask(testTask));
|
||||
if (testTask.getStatus() == null) {
|
||||
testTask.setStatus(2);
|
||||
}
|
||||
int result = testTaskService.insertTestTask(testTask);
|
||||
|
||||
// 如果任务状态是启用且没有被删除,则添加到定时任务管理器
|
||||
if (testTask.getStatus() == 0 && "0".equals(testTask.getDelFlag())) {
|
||||
testTaskManager.addNewTask(testTask);
|
||||
}
|
||||
|
||||
return toAjax(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("新增失败:", e);
|
||||
return error("新增失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +120,25 @@ public class TestTaskController extends BaseController {
|
||||
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody TestTask testTask) {
|
||||
return toAjax(testTaskService.updateTestTask(testTask));
|
||||
try {
|
||||
testTask.setUpdateBy(getLoginUser().getUsername());
|
||||
testTask.setUpdateTime(DateUtils.getNowDate());
|
||||
// 获取原任务信息
|
||||
TestTask originalTask = testTaskService.selectTestTaskById(testTask.getId()).getTask();
|
||||
|
||||
// 更新任务
|
||||
int result = testTaskService.updateTestTask(testTask);
|
||||
|
||||
// 如果状态或crontab发生变化,更新定时任务
|
||||
if (testTask.getStatus() != originalTask.getStatus() ||
|
||||
!testTask.getCrontab().equals(originalTask.getCrontab())) {
|
||||
testTaskManager.updateTask(testTask);
|
||||
}
|
||||
|
||||
return toAjax(result);
|
||||
} catch (Exception e) {
|
||||
return error("修改失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +147,14 @@ public class TestTaskController extends BaseController {
|
||||
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/del")
|
||||
public AjaxResult remove(@RequestBody IDQO qo) {
|
||||
try {
|
||||
// 先从定时任务管理器中移除
|
||||
testTaskManager.removeTask(qo.getId());
|
||||
// 再删除数据库记录
|
||||
return toAjax(testTaskService.deleteTestTaskById(qo.getId()));
|
||||
} catch (Exception e) {
|
||||
return error("删除失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,11 +164,10 @@ public class TestTaskController extends BaseController {
|
||||
@PostMapping("/run")
|
||||
public AjaxResult run(@RequestBody IDQO qo) {
|
||||
// 异步执行任务
|
||||
String username = SecurityUtils.getUsername();
|
||||
CompletableFuture.runAsync(() -> {
|
||||
testTaskService.executeTestTaskById(qo.getId(), 2, null, jmeterHomePath, SecurityUtils.getUsername());
|
||||
testTaskService.executeTestTaskById(qo.getId(), 2, null, jmeterHomePath, username);
|
||||
});
|
||||
return toAjax(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.test.common.utils.SeleniumUtils;
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.UiReport;
|
||||
import com.test.test.domain.qo.UiAutomationDataQO;
|
||||
import com.test.test.domain.qo.UiAutomationQO;
|
||||
import com.test.test.service.IUiAutomationService;
|
||||
import com.test.test.service.IUiSceneStepsService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.enums.BusinessType;
|
||||
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ui自动化Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/automation")
|
||||
@Slf4j
|
||||
public class UiAutomationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUiAutomationService uiAutomationService;
|
||||
@Autowired
|
||||
private IUiSceneStepsService uiSceneStepsService;
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
// */
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UiAutomationQO uiAutomation)
|
||||
{
|
||||
startPage();
|
||||
List<UiAutomation> list = uiAutomationService.selectUiAutomationList(uiAutomation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ui自动化详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:query')")
|
||||
@GetMapping(value = "getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(uiAutomationService.selectUiAutomationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:add')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody UiAutomationDataQO uiAutomationDataQO)
|
||||
{
|
||||
try{
|
||||
log.info("新增成功!");
|
||||
return success(uiAutomationService.insertUiAutomation(uiAutomationDataQO));
|
||||
}catch (Exception e){
|
||||
log.error("新增失败!",e);
|
||||
return error("新增失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:edit')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
public AjaxResult edit(@RequestBody UiAutomationDataQO uiAutomationDataQO)
|
||||
{
|
||||
try{
|
||||
log.info("修改成功!");
|
||||
return success(uiAutomationService.updateUiAutomation(uiAutomationDataQO));
|
||||
}catch (Exception e){
|
||||
log.error("修改失败!",e);
|
||||
return error("修改失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:remove')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("delete/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(uiAutomationService.deleteUiAutomationByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 执行场景步骤
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:remove')")
|
||||
@GetMapping("/executeStep")
|
||||
public AjaxResult executeStep(@RequestParam Long id)
|
||||
{
|
||||
try{
|
||||
String triggerMode = "1"; //手动执行
|
||||
log.info("执行完成!");
|
||||
return success(uiSceneStepsService.executeStep(id,triggerMode));
|
||||
} catch (Exception e) {
|
||||
log.error("执行错误!",e);
|
||||
return error("执行错误!"+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.test.test.domain.UiElement;
|
||||
import com.test.test.domain.qo.UiElementQO;
|
||||
import com.test.test.service.IUiElementService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ui元素Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/element")
|
||||
public class UiElementController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUiElementService uiElementService;
|
||||
|
||||
/**
|
||||
* 查询ui元素列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UiElementQO uiElement)
|
||||
{
|
||||
startPage();
|
||||
List<UiElement> list = uiElementService.selectUiElementListNew(uiElement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取ui元素详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(uiElementService.selectUiElementById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ui元素
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:add')")
|
||||
@Log(title = "ui元素", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody UiElement uiElement)
|
||||
{
|
||||
return toAjax(uiElementService.insertUiElement(uiElement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ui元素
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:edit')")
|
||||
@Log(title = "ui元素", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
public AjaxResult edit(@RequestBody UiElement uiElement)
|
||||
{
|
||||
return toAjax(uiElementService.updateUiElement(uiElement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ui元素
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:remove')")
|
||||
@Log(title = "ui元素", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("delete/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(uiElementService.deleteUiElementByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
// * 导出ui元素列表
|
||||
// */
|
||||
// @PreAuthorize("@ss.hasPermi('system:element:export')")
|
||||
// @Log(title = "ui元素", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, UiElement uiElement)
|
||||
// {
|
||||
// List<UiElement> list = uiElementService.selectUiElementList(uiElement);
|
||||
// ExcelUtil<UiElement> util = new ExcelUtil<UiElement>(UiElement.class);
|
||||
// util.exportExcel(response, list, "ui元素数据");
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
|
||||
import com.test.test.domain.UiReport;
|
||||
import com.test.test.service.IUiReportService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ui报告Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/report")
|
||||
public class UiReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUiReportService uiReportService;
|
||||
|
||||
/**
|
||||
* 查询ui报告列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:report:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UiReport uiReport)
|
||||
{
|
||||
startPage();
|
||||
List<UiReport> list = uiReportService.selectUiReportList(uiReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取ui报告详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:report:query')")
|
||||
@GetMapping(value = "getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(uiReportService.selectUiReportById(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除ui报告
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:report:remove')")
|
||||
@Log(title = "ui报告", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("delete/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(uiReportService.deleteUiReportByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/screenshot")
|
||||
public void getScreenshot(@RequestParam String path, HttpServletResponse response) throws IOException {
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
response.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
response.setContentType("image/png");
|
||||
try (FileInputStream in = new FileInputStream(file);
|
||||
OutputStream out = response.getOutputStream()) {
|
||||
byte[] buffer = new byte[4096];
|
||||
int length;
|
||||
while ((length = in.read(buffer)) > 0) {
|
||||
out.write(buffer, 0, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,13 +44,13 @@ public class PerformanceTestCaseReport extends BaseEntity
|
||||
private String tps;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/** 耗时(毫秒) */
|
||||
|
||||
@@ -29,6 +29,14 @@ public class TestCaseLog extends BaseEntity
|
||||
@Excel(name = "用例id")
|
||||
private Long caseId;
|
||||
|
||||
/** 测试计划id */
|
||||
@Excel(name = "测试计划id")
|
||||
private Long planId;
|
||||
|
||||
/** 测试计划关联用例类型 */
|
||||
@Excel(name = "测试计划关联用例类型")
|
||||
private Integer type;
|
||||
|
||||
/** 操作类别 */
|
||||
@Excel(name = "操作类别")
|
||||
private String operType;
|
||||
|
||||
234
test-test/src/main/java/com/test/test/domain/TestDefect.java
Normal file
234
test-test/src/main/java/com/test/test/domain/TestDefect.java
Normal file
@@ -0,0 +1,234 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 测试缺陷对象 test_defect
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public class TestDefect extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 测试缺陷编码 */
|
||||
@Excel(name = "缺陷ID")
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试缺陷名称 */
|
||||
// @Excel(name = "测试缺陷名称")
|
||||
private String name;
|
||||
|
||||
/** 缺陷概要 */
|
||||
@Excel(name = "缺陷概要")
|
||||
private String outline;
|
||||
|
||||
/** 缺陷描述 */
|
||||
// @Excel(name = "缺陷描述")
|
||||
private String detail;
|
||||
|
||||
/** 状态(0,待确认,1,修复中,2,已完成,3,无效缺陷,4,挂起,5,待验证) */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 经办人 */
|
||||
@Excel(name = "经办人")
|
||||
private String manager;
|
||||
|
||||
/** 开发人员 */
|
||||
// @Excel(name = "开发人员")
|
||||
private String dev;
|
||||
|
||||
/** 严重程度(0,无效,1,轻微,2,一般,3,严重,4,致命) */
|
||||
@Excel(name = "严重程度")
|
||||
private String level;
|
||||
|
||||
/** 缺陷类型(0,功能逻辑,1,UI交互,2,性能问题,3,兼容性问题,4,配置错误,5,安全问题,6,安装部署,7,其他) */
|
||||
// @Excel(name = "缺陷类型", readConverterExp = "0=,功能逻辑,1,UI交互,2,性能问题,3,兼容性问题,4,配置错误,5,安全问题,6,安装部署,7,其他")
|
||||
private String type;
|
||||
|
||||
/** 是否复现(0,必然复现,1,偶发复现) */
|
||||
// @Excel(name = "是否复现", readConverterExp = "0=,必然复现,1,偶发复现")
|
||||
private String reappearance;
|
||||
|
||||
/** 测试人员 */
|
||||
// @Excel(name = "测试人员")
|
||||
private String test;
|
||||
|
||||
/** 是否开启邮件通知(0,不开启,1,开启) */
|
||||
// @Excel(name = "是否开启邮件通知", readConverterExp = "0=,不开启,1,开启")
|
||||
private String mail = "0";
|
||||
|
||||
/** 版本 */
|
||||
// @Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setOutline(String outline)
|
||||
{
|
||||
this.outline = outline;
|
||||
}
|
||||
|
||||
public String getOutline()
|
||||
{
|
||||
return outline;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setManager(String manager)
|
||||
{
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
public String getManager()
|
||||
{
|
||||
return manager;
|
||||
}
|
||||
public void setDev(String dev)
|
||||
{
|
||||
this.dev = dev;
|
||||
}
|
||||
|
||||
public String getDev()
|
||||
{
|
||||
return dev;
|
||||
}
|
||||
public void setLevel(String level)
|
||||
{
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getLevel()
|
||||
{
|
||||
return level;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setReappearance(String reappearance)
|
||||
{
|
||||
this.reappearance = reappearance;
|
||||
}
|
||||
|
||||
public String getReappearance()
|
||||
{
|
||||
return reappearance;
|
||||
}
|
||||
public void setTest(String test)
|
||||
{
|
||||
this.test = test;
|
||||
}
|
||||
|
||||
public String getTest()
|
||||
{
|
||||
return test;
|
||||
}
|
||||
public void setMail(String mail)
|
||||
{
|
||||
this.mail = mail;
|
||||
}
|
||||
|
||||
public String getMail()
|
||||
{
|
||||
return mail;
|
||||
}
|
||||
public void setVersion(String version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("name", getName())
|
||||
.append("outline", getOutline())
|
||||
.append("detail", getDetail())
|
||||
.append("status", getStatus())
|
||||
.append("manager", getManager())
|
||||
.append("dev", getDev())
|
||||
.append("level", getLevel())
|
||||
.append("type", getType())
|
||||
.append("reappearance", getReappearance())
|
||||
.append("test", getTest())
|
||||
.append("mail", getMail())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("version", getVersion())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
56
test-test/src/main/java/com/test/test/domain/TestPlan.java
Normal file
56
test-test/src/main/java/com/test/test/domain/TestPlan.java
Normal file
@@ -0,0 +1,56 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 测试计划实例表 test_plan
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class TestPlan extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 3214537838879582503L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划编码 */
|
||||
@Excel(name = "测试计划编码")
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试计划名称 */
|
||||
@Excel(name = "测试计划名称")
|
||||
private String name;
|
||||
|
||||
/** 状态(0,未开始,1,进行中,2,已完成,3,已终止) */
|
||||
@Excel(name = "状态(0,未开始,1,进行中,2,已完成,3,已终止)")
|
||||
private String status;
|
||||
|
||||
/** 负责人 */
|
||||
@Excel(name = "负责人")
|
||||
private String manager;
|
||||
|
||||
/** 测试计划开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "测试计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 测试计划结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "测试计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 测试计划用例关联对象 test_plan_case
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TestPlanCase extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划主键ID */
|
||||
@Excel(name = "测试计划主键ID")
|
||||
private Long planId;
|
||||
|
||||
/** 用例主键ID */
|
||||
@Excel(name = "用例主键ID")
|
||||
private Long caseId;
|
||||
|
||||
/** 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证) */
|
||||
@Excel(name = "测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证)")
|
||||
private Integer type;
|
||||
|
||||
/** 未执行、成功或失败 */
|
||||
@Excel(name = "未执行、成功或失败")
|
||||
private String executeResult;
|
||||
|
||||
/** 执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date executeTime;
|
||||
|
||||
/** 执行人 */
|
||||
@Excel(name = "执行人")
|
||||
private String executeBy;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
|
||||
/** 未执行、成功或失败 */
|
||||
@Excel(name = "用例名称")
|
||||
private String caseName;
|
||||
}
|
||||
108
test-test/src/main/java/com/test/test/domain/TestPlanDefect.java
Normal file
108
test-test/src/main/java/com/test/test/domain/TestPlanDefect.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联对象 test_plan_defect
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public class TestPlanDefect extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划主键ID */
|
||||
@Excel(name = "测试计划主键ID")
|
||||
private String planId;
|
||||
|
||||
/** 测试缺陷主键ID */
|
||||
@Excel(name = "测试缺陷主键ID")
|
||||
private String defectId;
|
||||
|
||||
/** 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证) */
|
||||
@Excel(name = "测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证)")
|
||||
private String type;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPlanId(String planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public String getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setDefectId(String defectId)
|
||||
{
|
||||
this.defectId = defectId;
|
||||
}
|
||||
|
||||
public String getDefectId()
|
||||
{
|
||||
return defectId;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setVersion(String version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("planId", getPlanId())
|
||||
.append("defectId", getDefectId())
|
||||
.append("type", getType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("version", getVersion())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划测试项目关联需求表 test_plan_project
|
||||
*
|
||||
* @author test
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanProject extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 3043713502269619172L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 需求主键ID */
|
||||
@Excel(name = "需求主键ID")
|
||||
private String projectId;
|
||||
|
||||
/** 测试计划主键ID */
|
||||
@Excel(name = "测试计划主键ID")
|
||||
private String planId;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划关联测试报告表 test_plan_report
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanReport extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -1249261671553262360L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划主键ID */
|
||||
@Excel(name = "测试计划主键ID")
|
||||
private String planId;
|
||||
|
||||
/** 测试报告主键ID */
|
||||
@Excel(name = "测试报告主键ID")
|
||||
private String reportId;
|
||||
|
||||
/** 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证) */
|
||||
@Excel(name = "测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证)")
|
||||
private Long type;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
44
test-test/src/main/java/com/test/test/domain/TestReport.java
Normal file
44
test-test/src/main/java/com/test/test/domain/TestReport.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试报告表PO test_report
|
||||
*/
|
||||
@Data
|
||||
public class TestReport extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -2614255975963227103L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 测试报告编码 */
|
||||
@Excel(name = "测试报告编码")
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试报告名称 */
|
||||
@Excel(name = "测试报告名称")
|
||||
private String name;
|
||||
|
||||
/** 测试结果(0,未通过,1,通过) */
|
||||
@Excel(name = "测试结果(0,未通过,1,通过)")
|
||||
private String result;
|
||||
|
||||
/** 测试报告发送状态(0,未发送,1,已发送) */
|
||||
@Excel(name = "测试报告发送状态", readConverterExp = "0=,未发送,1,已发送")
|
||||
private String status;
|
||||
|
||||
/** 测试报告(jason格式存储) */
|
||||
@Excel(name = "测试报告", readConverterExp = "jason格式存储")
|
||||
private String report;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class TestTaskLog extends BaseEntity
|
||||
private String operUser;
|
||||
|
||||
/** 操作时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date operTime;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public class TestTaskResult extends BaseEntity
|
||||
private Long taskId;
|
||||
|
||||
/** 触发时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date triggerTime;
|
||||
|
||||
/** 执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 触发方式:1-定时任务;2-手动 */
|
||||
|
||||
232
test-test/src/main/java/com/test/test/domain/UiAutomation.java
Normal file
232
test-test/src/main/java/com/test/test/domain/UiAutomation.java
Normal file
@@ -0,0 +1,232 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public class UiAutomation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
@Excel(name = "场景名称")
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
@Excel(name = "用例等级")
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 未开始 进行中 已完成 */
|
||||
@Excel(name = "状态 1未开始 2进行中 3已完成")
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
@Excel(name = "标签")
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
@Excel(name = "责任人")
|
||||
private String dutyBy;
|
||||
|
||||
/** 运行环境 */
|
||||
@Excel(name = "运行环境")
|
||||
private String runEnvironment;
|
||||
|
||||
/** 步骤数 */
|
||||
@Excel(name = "步骤数")
|
||||
private Integer stepsNumber;
|
||||
|
||||
/** 执行结果 */
|
||||
@Excel(name = "执行结果")
|
||||
private String executionResult;
|
||||
|
||||
/** 通过率 */
|
||||
@Excel(name = "通过率")
|
||||
private String passRate;
|
||||
|
||||
/** 定时任务表达式 */
|
||||
@Excel(name = "定时任务表达式")
|
||||
private String crontab;
|
||||
|
||||
/** 定时任务表达式状态 */
|
||||
@Excel(name = "定时任务表达式状态")
|
||||
private Integer crontabStatus;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setCaseLevel(String caseLevel)
|
||||
{
|
||||
this.caseLevel = caseLevel;
|
||||
}
|
||||
|
||||
public String getCaseLevel()
|
||||
{
|
||||
return caseLevel;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getLabel()
|
||||
{
|
||||
return label;
|
||||
}
|
||||
public void setDutyBy(String dutyBy)
|
||||
{
|
||||
this.dutyBy = dutyBy;
|
||||
}
|
||||
|
||||
public String getDutyBy()
|
||||
{
|
||||
return dutyBy;
|
||||
}
|
||||
public void setRunEnvironment(String runEnvironment)
|
||||
{
|
||||
this.runEnvironment = runEnvironment;
|
||||
}
|
||||
|
||||
public String getRunEnvironment()
|
||||
{
|
||||
return runEnvironment;
|
||||
}
|
||||
public void setStepsNumber(Integer stepsNumber)
|
||||
{
|
||||
this.stepsNumber = stepsNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsNumber()
|
||||
{
|
||||
return stepsNumber;
|
||||
}
|
||||
public void setExecutionResult(String executionResult)
|
||||
{
|
||||
this.executionResult = executionResult;
|
||||
}
|
||||
|
||||
public String getExecutionResult()
|
||||
{
|
||||
return executionResult;
|
||||
}
|
||||
public void setPassRate(String passRate)
|
||||
{
|
||||
this.passRate = passRate;
|
||||
}
|
||||
|
||||
public String getPassRate()
|
||||
{
|
||||
return passRate;
|
||||
}
|
||||
public void setCrontab(String crontab)
|
||||
{
|
||||
this.crontab = crontab;
|
||||
}
|
||||
|
||||
public String getCrontab()
|
||||
{
|
||||
return crontab;
|
||||
}
|
||||
public void setCrontabStatus(Integer crontabStatus)
|
||||
{
|
||||
this.crontabStatus = crontabStatus;
|
||||
}
|
||||
|
||||
public Integer getCrontabStatus()
|
||||
{
|
||||
return crontabStatus;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupId", getGroupId())
|
||||
.append("name", getName())
|
||||
.append("caseLevel", getCaseLevel())
|
||||
.append("status", getStatus())
|
||||
.append("label", getLabel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("dutyBy", getDutyBy())
|
||||
.append("runEnvironment", getRunEnvironment())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("stepsNumber", getStepsNumber())
|
||||
.append("executionResult", getExecutionResult())
|
||||
.append("passRate", getPassRate())
|
||||
.append("crontab", getCrontab())
|
||||
.append("crontabStatus", getCrontabStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
136
test-test/src/main/java/com/test/test/domain/UiElement.java
Normal file
136
test-test/src/main/java/com/test/test/domain/UiElement.java
Normal file
@@ -0,0 +1,136 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui元素对象 ui_element
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public class UiElement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 组id */
|
||||
@Excel(name = "组id")
|
||||
private Long groupId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 定位类型 id name className tagName linkText partialLinkText css xpath label value index */
|
||||
@Excel(name = "定位类型 id name className tagName linkText partialLinkText css xpath label value index")
|
||||
private String locType;
|
||||
|
||||
/** 元素定位 */
|
||||
@Excel(name = "元素定位")
|
||||
private String elementLoc;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 状态 0正常 1删除 */
|
||||
private String delFlag;
|
||||
|
||||
/** 组路径名称(如"全部元素/测试") */
|
||||
private String groupNamePath;
|
||||
|
||||
// getter和setter
|
||||
public String getGroupNamePath() {
|
||||
return groupNamePath;
|
||||
}
|
||||
|
||||
public void setGroupNamePath(String groupNamePath) {
|
||||
this.groupNamePath = groupNamePath;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setGroupId(Long elementGroupId)
|
||||
{
|
||||
this.groupId = elementGroupId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setLocType(String locType)
|
||||
{
|
||||
this.locType = locType;
|
||||
}
|
||||
|
||||
public String getLocType()
|
||||
{
|
||||
return locType;
|
||||
}
|
||||
public void setElementLoc(String elementLoc)
|
||||
{
|
||||
this.elementLoc = elementLoc;
|
||||
}
|
||||
|
||||
public String getElementLoc()
|
||||
{
|
||||
return elementLoc;
|
||||
}
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupId", getGroupId())
|
||||
.append("name", getName())
|
||||
.append("locType", getLocType())
|
||||
.append("elementLoc", getElementLoc())
|
||||
.append("description", getDescription())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
204
test-test/src/main/java/com/test/test/domain/UiHighSetting.java
Normal file
204
test-test/src/main/java/com/test/test/domain/UiHighSetting.java
Normal file
@@ -0,0 +1,204 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class UiHighSetting extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 场景步骤id */
|
||||
@Excel(name = "场景步骤id")
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
@Excel(name = "设置类型")
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
@Excel(name = "等待时间")
|
||||
private String awateTime;
|
||||
|
||||
/** 断言json */
|
||||
@Excel(name = "断言json")
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
@Excel(name = "数据提取json")
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 错误处理 */
|
||||
@Excel(name = "错误处理")
|
||||
private String errorHandling;
|
||||
|
||||
/** 其他设置 */
|
||||
@Excel(name = "其他设置")
|
||||
private String otherSetting;
|
||||
|
||||
/** 设置顺序 */
|
||||
@Excel(name = "设置顺序")
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
@Excel(name = "是否禁用")
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSceneStepsId(Long sceneStepsId)
|
||||
{
|
||||
this.sceneStepsId = sceneStepsId;
|
||||
}
|
||||
|
||||
public Long getSceneStepsId()
|
||||
{
|
||||
return sceneStepsId;
|
||||
}
|
||||
public void setSettingType(String settingType)
|
||||
{
|
||||
this.settingType = settingType;
|
||||
}
|
||||
|
||||
public String getSettingType()
|
||||
{
|
||||
return settingType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setOperateType(String operateType)
|
||||
{
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateType()
|
||||
{
|
||||
return operateType;
|
||||
}
|
||||
public void setAwateTime(String awateTime)
|
||||
{
|
||||
this.awateTime = awateTime;
|
||||
}
|
||||
|
||||
public String getAwateTime()
|
||||
{
|
||||
return awateTime;
|
||||
}
|
||||
public void setAssertionJson(String assertionJson)
|
||||
{
|
||||
this.assertionJson = assertionJson;
|
||||
}
|
||||
|
||||
public String getAssertionJson()
|
||||
{
|
||||
return assertionJson;
|
||||
}
|
||||
public void setExtractionDataJson(String extractionDataJson)
|
||||
{
|
||||
this.extractionDataJson = extractionDataJson;
|
||||
}
|
||||
|
||||
public String getExtractionDataJson()
|
||||
{
|
||||
return extractionDataJson;
|
||||
}
|
||||
public void setErrorHandling(String errorHandling)
|
||||
{
|
||||
this.errorHandling = errorHandling;
|
||||
}
|
||||
|
||||
public String getErrorHandling()
|
||||
{
|
||||
return errorHandling;
|
||||
}
|
||||
public void setOtherSetting(String otherSetting)
|
||||
{
|
||||
this.otherSetting = otherSetting;
|
||||
}
|
||||
|
||||
public String getOtherSetting()
|
||||
{
|
||||
return otherSetting;
|
||||
}
|
||||
public void setOrderNumber(Integer orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public Integer getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
public void setIsDisabled(Integer isDisabled)
|
||||
{
|
||||
this.isDisabled = isDisabled;
|
||||
}
|
||||
|
||||
public Integer getIsDisabled()
|
||||
{
|
||||
return isDisabled;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sceneStepsId", getSceneStepsId())
|
||||
.append("settingType", getSettingType())
|
||||
.append("name", getName())
|
||||
.append("operateType", getOperateType())
|
||||
.append("awateTime", getAwateTime())
|
||||
.append("assertionJson", getAssertionJson())
|
||||
.append("extractionDataJson", getExtractionDataJson())
|
||||
.append("errorHandling", getErrorHandling())
|
||||
.append("otherSetting", getOtherSetting())
|
||||
.append("orderNumber", getOrderNumber())
|
||||
.append("isDisabled", getIsDisabled())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
290
test-test/src/main/java/com/test/test/domain/UiReport.java
Normal file
290
test-test/src/main/java/com/test/test/domain/UiReport.java
Normal file
@@ -0,0 +1,290 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui报告对象 ui_report
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public class UiReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 报告类型 */
|
||||
@Excel(name = "报告类型")
|
||||
private String reportType;
|
||||
|
||||
/** 触发方式 */
|
||||
@Excel(name = "触发方式")
|
||||
private String triggerMode;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 是否删除 0否 1是 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 状态 1running 2error 3 success 4stopped 5 pending 6 Timeout */
|
||||
@Excel(name = "状态 1running 2error 3 success 4stopped 5 pending 6 Timeout")
|
||||
private Integer status;
|
||||
|
||||
/** 耗时 */
|
||||
@Excel(name = "耗时")
|
||||
private String take;
|
||||
|
||||
/** 失败率 */
|
||||
@Excel(name = "失败率")
|
||||
private String faiiRate;
|
||||
|
||||
/** 成功断言 */
|
||||
@Excel(name = "成功断言")
|
||||
private String successAssertion;
|
||||
|
||||
/** 场景数 */
|
||||
@Excel(name = "场景数")
|
||||
private Integer scenesNumber;
|
||||
|
||||
/** 场景成功数 */
|
||||
@Excel(name = "场景成功数")
|
||||
private Integer scenesSucceedNumber;
|
||||
|
||||
/** 场景失败数 */
|
||||
@Excel(name = "场景失败数")
|
||||
private Integer scenesErrorNumber;
|
||||
|
||||
/** 场景未执行数 */
|
||||
@Excel(name = "场景未执行数")
|
||||
private Integer scenesNotNumber;
|
||||
|
||||
/** 步骤数 */
|
||||
@Excel(name = "步骤数")
|
||||
private Integer stepsNumber;
|
||||
|
||||
/** 步骤成功数 */
|
||||
@Excel(name = "步骤成功数")
|
||||
private Integer stepsSucceedNumber;
|
||||
|
||||
/** 步骤失败数 */
|
||||
@Excel(name = "步骤失败数")
|
||||
private Integer stepsErrorNumber;
|
||||
|
||||
/** 步骤未执行数 */
|
||||
@Excel(name = "步骤未执行数")
|
||||
private Integer stepsNotNumber;
|
||||
|
||||
|
||||
private String consoleStr;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setReportType(String reportType)
|
||||
{
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
public String getReportType()
|
||||
{
|
||||
return reportType;
|
||||
}
|
||||
public void setTriggerMode(String triggerMode)
|
||||
{
|
||||
this.triggerMode = triggerMode;
|
||||
}
|
||||
|
||||
public String getTriggerMode()
|
||||
{
|
||||
return triggerMode;
|
||||
}
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setTake(String take)
|
||||
{
|
||||
this.take = take;
|
||||
}
|
||||
|
||||
public String getTake()
|
||||
{
|
||||
return take;
|
||||
}
|
||||
public void setFaiiRate(String faiiRate)
|
||||
{
|
||||
this.faiiRate = faiiRate;
|
||||
}
|
||||
|
||||
public String getFaiiRate()
|
||||
{
|
||||
return faiiRate;
|
||||
}
|
||||
public void setSuccessAssertion(String successAssertion)
|
||||
{
|
||||
this.successAssertion = successAssertion;
|
||||
}
|
||||
|
||||
public String getSuccessAssertion()
|
||||
{
|
||||
return successAssertion;
|
||||
}
|
||||
public void setScenesNumber(Integer scenesNumber)
|
||||
{
|
||||
this.scenesNumber = scenesNumber;
|
||||
}
|
||||
|
||||
public Integer getScenesNumber()
|
||||
{
|
||||
return scenesNumber;
|
||||
}
|
||||
public void setScenesSucceedNumber(Integer scenesSucceedNumber)
|
||||
{
|
||||
this.scenesSucceedNumber = scenesSucceedNumber;
|
||||
}
|
||||
|
||||
public Integer getScenesSucceedNumber()
|
||||
{
|
||||
return scenesSucceedNumber;
|
||||
}
|
||||
public void setScenesErrorNumber(Integer scenesErrorNumber)
|
||||
{
|
||||
this.scenesErrorNumber = scenesErrorNumber;
|
||||
}
|
||||
|
||||
public Integer getScenesErrorNumber()
|
||||
{
|
||||
return scenesErrorNumber;
|
||||
}
|
||||
public void setScenesNotNumber(Integer scenesNotNumber)
|
||||
{
|
||||
this.scenesNotNumber = scenesNotNumber;
|
||||
}
|
||||
|
||||
public Integer getScenesNotNumber()
|
||||
{
|
||||
return scenesNotNumber;
|
||||
}
|
||||
public void setStepsNumber(Integer stepsNumber)
|
||||
{
|
||||
this.stepsNumber = stepsNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsNumber()
|
||||
{
|
||||
return stepsNumber;
|
||||
}
|
||||
public void setStepsSucceedNumber(Integer stepsSucceedNumber)
|
||||
{
|
||||
this.stepsSucceedNumber = stepsSucceedNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsSucceedNumber()
|
||||
{
|
||||
return stepsSucceedNumber;
|
||||
}
|
||||
public void setStepsErrorNumber(Integer stepsErrorNumber)
|
||||
{
|
||||
this.stepsErrorNumber = stepsErrorNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsErrorNumber()
|
||||
{
|
||||
return stepsErrorNumber;
|
||||
}
|
||||
public void setStepsNotNumber(Integer stepsNotNumber)
|
||||
{
|
||||
this.stepsNotNumber = stepsNotNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsNotNumber()
|
||||
{
|
||||
return stepsNotNumber;
|
||||
}
|
||||
|
||||
|
||||
public String getConsoleStr() {
|
||||
return consoleStr;
|
||||
}
|
||||
|
||||
public void setConsoleStr(String consoleStr) {
|
||||
this.consoleStr = consoleStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("reportType", getReportType())
|
||||
.append("triggerMode", getTriggerMode())
|
||||
.append("description", getDescription())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("status", getStatus())
|
||||
.append("take", getTake())
|
||||
.append("faiiRate", getFaiiRate())
|
||||
.append("successAssertion", getSuccessAssertion())
|
||||
.append("scenesNumber", getScenesNumber())
|
||||
.append("scenesSucceedNumber", getScenesSucceedNumber())
|
||||
.append("scenesErrorNumber", getScenesErrorNumber())
|
||||
.append("scenesNotNumber", getScenesNotNumber())
|
||||
.append("stepsNumber", getStepsNumber())
|
||||
.append("stepsSucceedNumber", getStepsSucceedNumber())
|
||||
.append("stepsErrorNumber", getStepsErrorNumber())
|
||||
.append("stepsNotNumber", getStepsNotNumber())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
400
test-test/src/main/java/com/test/test/domain/UiSceneSteps.java
Normal file
400
test-test/src/main/java/com/test/test/domain/UiSceneSteps.java
Normal file
@@ -0,0 +1,400 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class UiSceneSteps extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
@Excel(name = "步骤类型")
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
@Excel(name = "url")
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
@Excel(name = "是否追加页面")
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
@Excel(name = "操作")
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
@Excel(name = "操作对象")
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
@Excel(name = "元素库名称")
|
||||
private Long operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
@Excel(name = "元素id")
|
||||
private Long operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
@Excel(name = "元素定位类型")
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
@Excel(name = "元素定位值")
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
@Excel(name = "点击方式")
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
@Excel(name = "输入内容")
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
@Excel(name = "窗口尺寸")
|
||||
private String windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
@Excel(name = "子选项")
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
@Excel(name = "子选项值")
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
@Excel(name = "等待值")
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
@Excel(name = "是否禁用")
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
@Excel(name = "场景步骤序号")
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
@Excel(name = "句柄id")
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
@Excel(name = "网页索引号")
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
@Excel(name = "frame索引号")
|
||||
private Integer frameIndex;
|
||||
|
||||
/**是否输入*/
|
||||
private String isEnter;
|
||||
|
||||
|
||||
/**操作方式*/
|
||||
private String operateWay;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAutomationId(Long automationId)
|
||||
{
|
||||
this.automationId = automationId;
|
||||
}
|
||||
|
||||
public Long getAutomationId()
|
||||
{
|
||||
return automationId;
|
||||
}
|
||||
public void setOperateType(String operateType)
|
||||
{
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateType()
|
||||
{
|
||||
return operateType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStepType(String stepType)
|
||||
{
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
public String getStepType()
|
||||
{
|
||||
return stepType;
|
||||
}
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
public void setIsAppendPage(Integer isAppendPage)
|
||||
{
|
||||
this.isAppendPage = isAppendPage;
|
||||
}
|
||||
|
||||
public Integer getIsAppendPage()
|
||||
{
|
||||
return isAppendPage;
|
||||
}
|
||||
public void setOperate(Integer operate)
|
||||
{
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
public Integer getOperate()
|
||||
{
|
||||
return operate;
|
||||
}
|
||||
public void setOperateObject(String operateObject)
|
||||
{
|
||||
this.operateObject = operateObject;
|
||||
}
|
||||
|
||||
public String getOperateObject()
|
||||
{
|
||||
return operateObject;
|
||||
}
|
||||
public void setOperateGroupId(Long operateGroupId)
|
||||
{
|
||||
this.operateGroupId = operateGroupId;
|
||||
}
|
||||
|
||||
public Long getOperateGroupId()
|
||||
{
|
||||
return operateGroupId;
|
||||
}
|
||||
public void setOperateElementId(Long operateElementId)
|
||||
{
|
||||
this.operateElementId = operateElementId;
|
||||
}
|
||||
|
||||
public Long getOperateElementId()
|
||||
{
|
||||
return operateElementId;
|
||||
}
|
||||
public void setOperateLocType(String operateLocType)
|
||||
{
|
||||
this.operateLocType = operateLocType;
|
||||
}
|
||||
|
||||
public String getOperateLocType()
|
||||
{
|
||||
return operateLocType;
|
||||
}
|
||||
public void setOperateLocValue(String operateLocValue)
|
||||
{
|
||||
this.operateLocValue = operateLocValue;
|
||||
}
|
||||
|
||||
public String getOperateLocValue()
|
||||
{
|
||||
return operateLocValue;
|
||||
}
|
||||
public void setClickMethod(String clickMethod)
|
||||
{
|
||||
this.clickMethod = clickMethod;
|
||||
}
|
||||
|
||||
public String getClickMethod()
|
||||
{
|
||||
return clickMethod;
|
||||
}
|
||||
public void setInputValue(String inputValue)
|
||||
{
|
||||
this.inputValue = inputValue;
|
||||
}
|
||||
|
||||
public String getInputValue()
|
||||
{
|
||||
return inputValue;
|
||||
}
|
||||
public void setWindowSize(String windowSize)
|
||||
{
|
||||
this.windowSize = windowSize;
|
||||
}
|
||||
|
||||
public String getWindowSize()
|
||||
{
|
||||
return windowSize;
|
||||
}
|
||||
public void setSubOptions(String subOptions)
|
||||
{
|
||||
this.subOptions = subOptions;
|
||||
}
|
||||
|
||||
public String getSubOptions()
|
||||
{
|
||||
return subOptions;
|
||||
}
|
||||
public void setSubOptionsValue(String subOptionsValue)
|
||||
{
|
||||
this.subOptionsValue = subOptionsValue;
|
||||
}
|
||||
|
||||
public String getSubOptionsValue()
|
||||
{
|
||||
return subOptionsValue;
|
||||
}
|
||||
public void setAwaitValue(String awaitValue)
|
||||
{
|
||||
this.awaitValue = awaitValue;
|
||||
}
|
||||
|
||||
public String getAwaitValue()
|
||||
{
|
||||
return awaitValue;
|
||||
}
|
||||
public void setIsDisabled(Integer isDisabled)
|
||||
{
|
||||
this.isDisabled = isDisabled;
|
||||
}
|
||||
|
||||
public Integer getIsDisabled()
|
||||
{
|
||||
return isDisabled;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setOrderNumber(Integer orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public Integer getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
public void setHandleId(String handleId)
|
||||
{
|
||||
this.handleId = handleId;
|
||||
}
|
||||
|
||||
public String getHandleId()
|
||||
{
|
||||
return handleId;
|
||||
}
|
||||
public void setPageIndex(Integer pageIndex)
|
||||
{
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
public Integer getPageIndex()
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
public void setFrameIndex(Integer frameIndex)
|
||||
{
|
||||
this.frameIndex = frameIndex;
|
||||
}
|
||||
|
||||
public Integer getFrameIndex()
|
||||
{
|
||||
return frameIndex;
|
||||
}
|
||||
|
||||
|
||||
public String getOperateWay() {
|
||||
return operateWay;
|
||||
}
|
||||
|
||||
public void setOperateWay(String operateWay) {
|
||||
this.operateWay = operateWay;
|
||||
}
|
||||
|
||||
public String getIsEnter() {
|
||||
return isEnter;
|
||||
}
|
||||
|
||||
public void setIsEnter(String isEnter) {
|
||||
this.isEnter = isEnter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("automationId", getAutomationId())
|
||||
.append("operateType", getOperateType())
|
||||
.append("name", getName())
|
||||
.append("stepType", getStepType())
|
||||
.append("url", getUrl())
|
||||
.append("isAppendPage", getIsAppendPage())
|
||||
.append("operate", getOperate())
|
||||
.append("operateObject", getOperateObject())
|
||||
.append("operateGroupId", getOperateGroupId())
|
||||
.append("operateElementId", getOperateElementId())
|
||||
.append("operateLocType", getOperateLocType())
|
||||
.append("operateLocValue", getOperateLocValue())
|
||||
.append("clickMethod", getClickMethod())
|
||||
.append("inputValue", getInputValue())
|
||||
.append("windowSize", getWindowSize())
|
||||
.append("subOptions", getSubOptions())
|
||||
.append("subOptionsValue", getSubOptionsValue())
|
||||
.append("awaitValue", getAwaitValue())
|
||||
.append("isDisabled", getIsDisabled())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("orderNumber", getOrderNumber())
|
||||
.append("handleId", getHandleId())
|
||||
.append("pageIndex", getPageIndex())
|
||||
.append("frameIndex", getFrameIndex())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui自动化场景报告对象 ui_scene_steps_report
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public class UiSceneStepsReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 报告id */
|
||||
@Excel(name = "报告id")
|
||||
private Long reportId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 日志 */
|
||||
@Excel(name = "日志")
|
||||
private String logInfo;
|
||||
|
||||
/** 执行类型 1成功 0未执行 2执行失败 */
|
||||
@Excel(name = "执行类型 1成功 0未执行 2执行失败")
|
||||
private String executionFlag;
|
||||
|
||||
/** 耗时 */
|
||||
@Excel(name = "耗时")
|
||||
private String take;
|
||||
|
||||
/** 截图 */
|
||||
@Excel(name = "截图")
|
||||
private String screenshot;
|
||||
|
||||
/** 断言json */
|
||||
@Excel(name = "断言json")
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
@Excel(name = "数据提取json")
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
@Excel(name = "场景步骤序号")
|
||||
private Integer orderNumber;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setReportId(Long reportId)
|
||||
{
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public Long getReportId()
|
||||
{
|
||||
return reportId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setLogInfo(String logInfo)
|
||||
{
|
||||
this.logInfo = logInfo;
|
||||
}
|
||||
|
||||
public String getLogInfo()
|
||||
{
|
||||
return logInfo;
|
||||
}
|
||||
public void setExecutionFlag(String executionFlag)
|
||||
{
|
||||
this.executionFlag = executionFlag;
|
||||
}
|
||||
|
||||
public String getExecutionFlag()
|
||||
{
|
||||
return executionFlag;
|
||||
}
|
||||
public void setTake(String take)
|
||||
{
|
||||
this.take = take;
|
||||
}
|
||||
|
||||
public String getTake()
|
||||
{
|
||||
return take;
|
||||
}
|
||||
public void setScreenshot(String screenshot)
|
||||
{
|
||||
this.screenshot = screenshot;
|
||||
}
|
||||
|
||||
public String getScreenshot()
|
||||
{
|
||||
return screenshot;
|
||||
}
|
||||
public void setAssertionJson(String assertionJson)
|
||||
{
|
||||
this.assertionJson = assertionJson;
|
||||
}
|
||||
|
||||
public String getAssertionJson()
|
||||
{
|
||||
return assertionJson;
|
||||
}
|
||||
public void setExtractionDataJson(String extractionDataJson)
|
||||
{
|
||||
this.extractionDataJson = extractionDataJson;
|
||||
}
|
||||
|
||||
public String getExtractionDataJson()
|
||||
{
|
||||
return extractionDataJson;
|
||||
}
|
||||
public void setOrderNumber(Integer orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public Integer getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("reportId", getReportId())
|
||||
.append("name", getName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("logInfo", getLogInfo())
|
||||
.append("executionFlag", getExecutionFlag())
|
||||
.append("take", getTake())
|
||||
.append("screenshot", getScreenshot())
|
||||
.append("assertionJson", getAssertionJson())
|
||||
.append("extractionDataJson", getExtractionDataJson())
|
||||
.append("orderNumber", getOrderNumber())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AssertionConfigQO {
|
||||
/** 弹窗文本数组 */
|
||||
private List<AssertionQO> popupTexts = new ArrayList<>();
|
||||
|
||||
/** 元素断言数组 */
|
||||
private List<AssertionQO> elementAssertions = new ArrayList<>();
|
||||
|
||||
/** 下拉框数组 */
|
||||
private List<AssertionQO> dropdownBoxes = new ArrayList<>();
|
||||
|
||||
/** 网页标题数组 */
|
||||
private List<AssertionQO> webTitles = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 断言
|
||||
*/
|
||||
@Data
|
||||
public class AssertionQO {
|
||||
|
||||
/**断言类型 1断言值 2弹窗文本 3元素断言 4下拉框 5网页标题*/
|
||||
private String assertionType;
|
||||
|
||||
/**网页标题*/
|
||||
private String pageTitle;
|
||||
|
||||
/** 操作对象 1元素对象 2元素定位*/
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Long operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Long operateElementId;
|
||||
|
||||
/** 元素定位类型 id css ……*/
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/**元素属性*/
|
||||
private String elementAttribute;
|
||||
|
||||
/**断言方式*/
|
||||
private String assertionMode;
|
||||
|
||||
/**期望值*/
|
||||
private String expectations;
|
||||
|
||||
/**变量*/
|
||||
private String variable;
|
||||
|
||||
/**条件 1等于 2不等于 3包含 ……*/
|
||||
private String condition;
|
||||
|
||||
/**是否为弹窗文本*/
|
||||
private String isPopText;
|
||||
|
||||
|
||||
/**失败是否中止 0否 1是*/
|
||||
private String isFailedAbort;
|
||||
|
||||
/**是否禁用 0否 1是*/
|
||||
private Integer isDisabled;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据提取配置(新版嵌套结构)
|
||||
*/
|
||||
@Data
|
||||
public class DataExtractionConfigQO {
|
||||
/** 窗口信息提取配置 */
|
||||
private List<DataExtractionQO> windowExtractions;
|
||||
|
||||
/** 元素信息提取配置 */
|
||||
private List<DataExtractionQO> elementExtractions;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据提取
|
||||
*/
|
||||
@Data
|
||||
public class DataExtractionQO {
|
||||
|
||||
/** 1提取窗口信息 2提取元素信息 */
|
||||
private String informationType;
|
||||
|
||||
/** informationType为2时 1普通对象(store) 2元素文本(storeText) 3元素值(storeValue) 4元素属性(storeAttribute)
|
||||
* 5CSS属性(storeCssAttribute) 6匹配 xpath 的元素数量(storeXpathCount) */
|
||||
private String elementType;
|
||||
|
||||
/** informationType为1时 1窗口 Handle(storeWindowHandle) 2网页标题(storeTitle) */
|
||||
private String windowType;
|
||||
|
||||
/**值 */
|
||||
private String value;
|
||||
|
||||
|
||||
/** 操作对象 1元素对象 2元素定位*/
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Long operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Long operateElementId;
|
||||
|
||||
/** 元素定位类型 id css ……*/
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/** 普通对象 元素属性 元素css属性*/
|
||||
private String elementAttribute;
|
||||
|
||||
/**是否禁用 0否 1是 */
|
||||
private Integer isDisabled;
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,6 @@ package com.test.test.domain.qo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class IDQO {
|
||||
public class IDQO extends InheritQO{
|
||||
private Long id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InheritQO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6405523005491017445L;
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OtherSettingsQO {
|
||||
private Integer waitElementTime;
|
||||
private Integer screenshotConfiguration;
|
||||
}
|
||||
@@ -3,8 +3,18 @@ package com.test.test.domain.qo;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TestCaseListQO {
|
||||
public class TestCaseListQO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4636502018355979101L;
|
||||
@NotNull(message = "父节点id不能为空")
|
||||
private Long groupId;
|
||||
/** 测试计划主键ID */
|
||||
private Long planId;
|
||||
/**
|
||||
* 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证)
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:查询缺陷列表请求参数qo
|
||||
* @date 2025-04-22 23:54
|
||||
*/
|
||||
@Data
|
||||
public class TestDefectListQO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4632212018365973101L;
|
||||
|
||||
/**
|
||||
* 缺陷编码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 缺陷概要
|
||||
*/
|
||||
private String outline;
|
||||
|
||||
/**
|
||||
* 开始创建时间
|
||||
*/
|
||||
private Date startCreateTime;
|
||||
|
||||
/**
|
||||
* 结束创建时间
|
||||
*/
|
||||
private Date endCreateTime;
|
||||
|
||||
/**
|
||||
* 经办人
|
||||
*/
|
||||
private String manager;
|
||||
|
||||
/**
|
||||
* 严重程度(0,无效,1,轻微,2,一般,3,严重,4,致命)
|
||||
*/
|
||||
private String level;
|
||||
|
||||
/**
|
||||
* 状态(0,待确认,1,修复中,2,已完成,3,无效缺陷,4,挂起,5,待验证)
|
||||
*/
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划新增请求QO
|
||||
*
|
||||
* @author pfl
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanAddQO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 3693196640830164441L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划id */
|
||||
private Long planId;
|
||||
|
||||
/** 测试计划编码 */
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试计划名称 */
|
||||
private String name;
|
||||
|
||||
/** 状态(0,未开始,1,进行中,2,已完成,3,已终止) */
|
||||
private String status;
|
||||
|
||||
/** 负责人 */
|
||||
private String manager;
|
||||
|
||||
/** 测试计划开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 测试计划结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 版本 */
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
|
||||
/** 关联需求id */
|
||||
private Long projectId;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liangdaliang
|
||||
* @Description:测试计划关联用例
|
||||
* @date 2025-04-27 13:16
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanCaseQO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4636202018365979101L;
|
||||
private Long planId;
|
||||
private Integer type;
|
||||
private List<Long> testCaseIdList;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联请求QO
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanDefectQO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 3754531916096288164L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划主键ID */
|
||||
private String planId;
|
||||
|
||||
/** 测试缺陷主键ID */
|
||||
private String defectId;
|
||||
|
||||
/**
|
||||
* 缺陷编码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 缺陷概要
|
||||
*/
|
||||
private String outline;
|
||||
|
||||
/** 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证) */
|
||||
private String type;
|
||||
|
||||
/** 版本 */
|
||||
private String version;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划缺陷关联
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanDefectRelQO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4779866915656657001L;
|
||||
|
||||
private Long planId;
|
||||
private Integer type;
|
||||
private List<Long> defectIdList;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 查询测试计划列表请求参数qo
|
||||
*
|
||||
* @author pfl
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanListQO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -1058615526393949211L;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String manager;
|
||||
|
||||
/**
|
||||
* 测试计划名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 测试计划开始时间起始时间
|
||||
*/
|
||||
private Date startPlanTime;
|
||||
|
||||
/**
|
||||
* 测试计划开始时间结束时间
|
||||
*/
|
||||
private Date endPlanTime;
|
||||
|
||||
/**
|
||||
* 测试计划截止时间起始时间
|
||||
*/
|
||||
private Date startDeadline;
|
||||
|
||||
/**
|
||||
* 测试计划截止时间结束时间
|
||||
*/
|
||||
private Date endDeadline;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试报告新增参数QO
|
||||
*/
|
||||
@Data
|
||||
public class TestReportAddQO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -6325566452451878775L;
|
||||
|
||||
/**
|
||||
* 测试报告id
|
||||
*/
|
||||
private Long reportId;
|
||||
|
||||
/**
|
||||
* 测试计划id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/** 测试报告编码 */
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试报告名称 */
|
||||
private String name;
|
||||
|
||||
/** 测试结果(0,未通过,1,通过) */
|
||||
private String result;
|
||||
|
||||
/** 测试报告发送状态(0,未发送,1,已发送) */
|
||||
private String status;
|
||||
|
||||
/** 测试报告(jason格式存储) */
|
||||
private String report;
|
||||
|
||||
/** 版本 */
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationDataQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 0未开始 1进行中 2已完成 */
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
private String dutyBy;
|
||||
|
||||
/** 运行环境 */
|
||||
private String runEnvironment;
|
||||
|
||||
/** 步骤数 */
|
||||
private Long stepsNumber;
|
||||
|
||||
/** 执行结果 */
|
||||
private String executionResult;
|
||||
|
||||
/** 通过率 */
|
||||
private String passRate;
|
||||
|
||||
/** 定时任务表达式 */
|
||||
private String crontab;
|
||||
|
||||
/** 定时任务表达式状态 */
|
||||
private Long crontabStatus;
|
||||
|
||||
/** 是否删除 */
|
||||
private Long delFlag;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
|
||||
/** 场景步骤 */
|
||||
private List<UiSceneStepsQO> uiSceneStepsVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationQO extends BaseEntity
|
||||
{
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 状态 0正常 1删除 */
|
||||
private String delFlag;
|
||||
@NotNull(message = "节点id不能为空")
|
||||
private Long groupId;
|
||||
|
||||
private List<Long> groupIds;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
private String createBy;
|
||||
|
||||
/** 状态 0未开始 1进行中 2已完成 */
|
||||
private String status;
|
||||
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui元素对象 ui_element
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiElementQO
|
||||
{
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 状态 0正常 1删除 */
|
||||
private String delFlag;
|
||||
|
||||
private Long groupId;
|
||||
|
||||
private List<Long> groupIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiHighSettingQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 场景步骤id */
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
private String awateTime;
|
||||
|
||||
/** 断言json */
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 错误处理 */
|
||||
private String errorHandling;
|
||||
|
||||
/** 其他设置 */
|
||||
private String otherSetting;
|
||||
|
||||
/** 设置顺序 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/**其他设置*/
|
||||
OtherSettingsQO otherSettingsQO = new OtherSettingsQO();
|
||||
|
||||
/**数据提取*/
|
||||
private DataExtractionConfigQO dataExtractionQOList = new DataExtractionConfigQO();
|
||||
|
||||
/**断言*/
|
||||
private AssertionConfigQO assertionQOList = new AssertionConfigQO();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import com.test.test.domain.UiHighSetting;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiSceneStepsQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Long operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Long operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
private String windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
private Integer frameIndex;
|
||||
|
||||
/**是否输入*/
|
||||
private String isEnter;
|
||||
|
||||
|
||||
/**操作方式*/
|
||||
private String operateWay;
|
||||
|
||||
/**高级设置*/
|
||||
private List<UiHighSettingQO> uiHighSettingVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 断言报告结果
|
||||
*/
|
||||
@Data
|
||||
public class AssertionReportVO {
|
||||
|
||||
/**
|
||||
* 断言名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errorInfo;
|
||||
|
||||
/**
|
||||
* 是否成功 0否 1是
|
||||
*/
|
||||
private String isSuccess;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestCaseReportVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6972995415807958849L;
|
||||
|
||||
private String name;
|
||||
|
||||
private String result;
|
||||
|
||||
private Integer caseNum;
|
||||
|
||||
private Integer passNum;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联返回Vo
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanDefectVo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -4826790211276641073L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷ID
|
||||
*/
|
||||
private String defectId;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷ID
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷概要
|
||||
*/
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷经办人
|
||||
*/
|
||||
private String manager;
|
||||
|
||||
/**
|
||||
* 测试计划关联缺陷严重程度
|
||||
*/
|
||||
private String level;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestPlanListVO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 7768851691630986105L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 测试计划编码 */
|
||||
@Excel(name = "测试计划编码")
|
||||
private String serialNumber;
|
||||
|
||||
/** 测试计划名称 */
|
||||
@Excel(name = "测试计划名称")
|
||||
private String name;
|
||||
|
||||
/** 0 冒烟测试 */
|
||||
private String smokeTest;
|
||||
|
||||
/** 1 功能测试 */
|
||||
private String functionTest;
|
||||
|
||||
/** 2 回归测试 */
|
||||
private String regressionTest;
|
||||
|
||||
/** 3 准生产测试 */
|
||||
private String preProductionTest;
|
||||
|
||||
/** 4 生产测试 */
|
||||
private String productionTest;
|
||||
|
||||
/** 冒烟测试通过数 */
|
||||
private String smokeTestPassNum;
|
||||
|
||||
/** 功能测试通过数 */
|
||||
private String functionTestPassNum;
|
||||
|
||||
/** 回归测试通过数 */
|
||||
private String regressionTestPassNum;
|
||||
|
||||
/** 准生产测试通过数 */
|
||||
private String preProductionTestPassNum;
|
||||
|
||||
/** 生产测试通过数 */
|
||||
private String productionTestPassNum;
|
||||
|
||||
/** 状态(0,未开始,1,进行中,2,已完成,3,已终止) */
|
||||
@Excel(name = "状态(0,未开始,1,进行中,2,已完成,3,已终止)")
|
||||
private String status;
|
||||
|
||||
/** 负责人 */
|
||||
@Excel(name = "负责人")
|
||||
private String manager;
|
||||
|
||||
/** 测试计划开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "测试计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 测试计划结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "测试计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 版本 */
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
|
||||
/** 缺陷数量 */
|
||||
@Excel(name = "缺陷数量")
|
||||
private String defectNum;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestPlanOverviewTrendDataVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6444876575138174061L;
|
||||
|
||||
private String caseTrendDates;
|
||||
|
||||
private Integer notExecuted;
|
||||
|
||||
private Integer passed;
|
||||
|
||||
private Integer failed;
|
||||
|
||||
private Integer blocked;
|
||||
|
||||
private Integer skipped;
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestPlanOverviewVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2634301979620606338L;
|
||||
|
||||
/**
|
||||
* 用例总数
|
||||
*/
|
||||
private Integer caseCount;
|
||||
|
||||
/**
|
||||
* 已执行用例数
|
||||
*/
|
||||
private Integer executedCaseCount;
|
||||
|
||||
/**
|
||||
* 用例通过数
|
||||
*/
|
||||
private Integer passedCaseCount;
|
||||
|
||||
/**
|
||||
* 用例失败数
|
||||
*/
|
||||
private Integer failedCaseCount;
|
||||
|
||||
/**
|
||||
* 用例阻塞数
|
||||
*/
|
||||
private Integer blockedCaseCount;
|
||||
|
||||
/**
|
||||
* 用例跳过数
|
||||
*/
|
||||
private Integer skippedCaseCount;
|
||||
|
||||
/**
|
||||
* 用例未执行数
|
||||
*/
|
||||
private Integer notExecutedCaseCount;
|
||||
|
||||
/**
|
||||
* 缺陷数
|
||||
*/
|
||||
private Integer defectCount;
|
||||
|
||||
/**
|
||||
* 待确认缺陷状态数
|
||||
*/
|
||||
private Integer unconfirmedDefectCount;
|
||||
|
||||
/**
|
||||
* 修复中缺陷状态数
|
||||
*/
|
||||
private Integer fixingDefectCount;
|
||||
|
||||
/**
|
||||
* 待验证缺陷状态数
|
||||
*/
|
||||
private Integer unverifiedDefectCount;
|
||||
|
||||
/**
|
||||
* 无效缺陷状态数
|
||||
*/
|
||||
private Integer invalidDefectCount;
|
||||
|
||||
/**
|
||||
* 挂起缺陷状态数
|
||||
*/
|
||||
private Integer suspendedDefectCount;
|
||||
|
||||
/**
|
||||
* 无效等级缺陷数
|
||||
*/
|
||||
private Integer invalidLevelDefectCount;
|
||||
|
||||
/**
|
||||
* 轻微等级缺陷数
|
||||
*/
|
||||
private Integer minorLevelDefectCount;
|
||||
|
||||
/**
|
||||
* 一般等级缺陷数
|
||||
*/
|
||||
private Integer normalLevelDefectCount;
|
||||
|
||||
/**
|
||||
* 严重等级缺陷数
|
||||
*/
|
||||
private Integer seriousLevelDefectCount;
|
||||
|
||||
/**
|
||||
* 致命等级缺陷数
|
||||
*/
|
||||
private Integer fatalLevelDefectCount;
|
||||
|
||||
/**
|
||||
* 功能逻辑类型缺陷数
|
||||
*/
|
||||
private Integer logicDefectCount;
|
||||
|
||||
/**
|
||||
* UI交互类型缺陷数
|
||||
*/
|
||||
private Integer uiDefectCount;
|
||||
|
||||
/**
|
||||
* 性能问题类型缺陷数
|
||||
*/
|
||||
private Integer performanceDefectCount;
|
||||
|
||||
/**
|
||||
* 兼容性问题类型缺陷数
|
||||
*/
|
||||
private Integer compatibilityDefectCount;
|
||||
|
||||
/**
|
||||
* 配置错误类型缺陷数
|
||||
*/
|
||||
private Integer configurationDefectCount;
|
||||
|
||||
/**
|
||||
* 安全问题类型缺陷数
|
||||
*/
|
||||
private Integer securityDefectCount;
|
||||
|
||||
/**
|
||||
* 安装部署类型缺陷数
|
||||
*/
|
||||
private Integer installationDefectCount;
|
||||
|
||||
/**
|
||||
* 其他类型缺陷数
|
||||
*/
|
||||
private Integer otherDefectCount;
|
||||
|
||||
/**
|
||||
* 用例执行时间
|
||||
*/
|
||||
private List<String> caseTrendDates;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 测试计划关联需求VO
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanProjectVo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 2482748159724585467L;
|
||||
|
||||
/** 需求编码 */
|
||||
private String serialNumber;
|
||||
|
||||
/** 需求名称 */
|
||||
private String name;
|
||||
|
||||
/** 需求概要 */
|
||||
private String outline;
|
||||
|
||||
/** 需求描述 */
|
||||
private String detail;
|
||||
|
||||
/** 优先级(p0,p1,p2,p3,p4) */
|
||||
private String priority;
|
||||
|
||||
/** 预计完成时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date estimatedTime;
|
||||
|
||||
/** 需求来源(0,产品经理,1,客户) */
|
||||
private String source;
|
||||
|
||||
/** 需求类型(0,优化,1,新功能) */
|
||||
private String type;
|
||||
|
||||
/** 状态(0,未开始,1,进行中,2,已完成,3,已终止) */
|
||||
private String status;
|
||||
|
||||
/** 负责人 */
|
||||
private String manager;
|
||||
|
||||
/** 版本 */
|
||||
private String version;
|
||||
|
||||
/** 0,正常,1,删除 */
|
||||
private String delFlag;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestReportVo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -4331077290310280474L;
|
||||
|
||||
/** 测试报告id */
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 测试报告名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 测试结果(0,未通过,1,通过) */
|
||||
private String result;
|
||||
|
||||
/** 测试报告(jason格式存储)*/
|
||||
private String report;
|
||||
|
||||
/** 测试用例类型(0,冒烟测试,1,功能测试,2,回归测试,3,准生产测试,4,生产验证) */
|
||||
private Long type;
|
||||
|
||||
/** 测试报告发送状态(0,未发送,1,已发送) */
|
||||
@Excel(name = "测试报告发送状态", readConverterExp = "0=,未发送,1,已发送")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationVO
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 未开始 进行中 已完成 */
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
private String dutyBy;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
/**场景步骤*/
|
||||
private List<UiSceneStepsVO> uiSceneStepsVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.test.domain.qo.AssertionConfigQO;
|
||||
import com.test.test.domain.qo.AssertionQO;
|
||||
import com.test.test.domain.qo.DataExtractionConfigQO;
|
||||
import com.test.test.domain.qo.OtherSettingsQO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiHighSettingVO
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景步骤id */
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
private String awateTime;
|
||||
|
||||
/** 错误处理 */
|
||||
private String errorHandling;
|
||||
|
||||
/** 设置顺序 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/**断言*/
|
||||
private AssertionConfigQO assertionQOList = new AssertionConfigQO();
|
||||
|
||||
/**数据提取*/
|
||||
private DataExtractionConfigQO dataExtractionQOList =new DataExtractionConfigQO();
|
||||
|
||||
/**其他设置*/
|
||||
private OtherSettingsQO otherSettingsQO;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui报告对象 ui_report
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
@Data
|
||||
public class UiReportVO extends BaseEntity
|
||||
{
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 耗时 */
|
||||
private String take;
|
||||
|
||||
/** 失败率 */
|
||||
private String faiiRate;
|
||||
|
||||
/** 成功断言 */
|
||||
private String successAssertion;
|
||||
|
||||
/** 场景数 */
|
||||
private Integer scenesNumber;
|
||||
|
||||
/** 场景成功数 */
|
||||
private Integer scenesSucceedNumber;
|
||||
|
||||
/** 场景失败数 */
|
||||
private Integer scenesErrorNumber;
|
||||
|
||||
/** 场景未执行数 */
|
||||
private Integer scenesNotNumber;
|
||||
|
||||
/** 步骤数 */
|
||||
private Integer stepsNumber;
|
||||
|
||||
/** 步骤成功数 */
|
||||
private Integer stepsSucceedNumber;
|
||||
|
||||
/** 步骤失败数 */
|
||||
private Integer stepsErrorNumber;
|
||||
|
||||
/** 步骤未执行数 */
|
||||
private Integer stepsNotNumber;
|
||||
|
||||
/**报告步骤全部详情*/
|
||||
private List<UiSceneStepsReportVO> uiSceneStepsAllReportVOList = new ArrayList<>() ;
|
||||
/**报告步骤失败详情*/
|
||||
private List<UiSceneStepsReportVO> uiSceneStepsErrorReportVOList = new ArrayList<>() ;
|
||||
/**报告步骤未执行详情*/
|
||||
private List<UiSceneStepsReportVO> uiSceneStepsNotReportVOList = new ArrayList<>() ;
|
||||
/**控制台信息*/
|
||||
private String consoleStr;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* ui自动化场景报告对象 ui_scene_steps_report
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
@Data
|
||||
public class UiSceneStepsReportVO
|
||||
{
|
||||
|
||||
|
||||
/** 报告id */
|
||||
private Long reportId;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 日志 */
|
||||
private String logInfo;
|
||||
|
||||
/** 执行类型 1成功 0未执行 2执行失败 */
|
||||
private String executionFlag;
|
||||
|
||||
/** 耗时 */
|
||||
private String take;
|
||||
|
||||
/** 截图 */
|
||||
private String screenshot;
|
||||
|
||||
/** 断言json */
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
private Integer orderNumber;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import jdk.jfr.DataAmount;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiSceneStepsVO
|
||||
{
|
||||
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Long operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Long operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
private Integer windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
private Integer frameIndex;
|
||||
|
||||
/**是否输入*/
|
||||
private String isEnter;
|
||||
|
||||
|
||||
/**操作方式*/
|
||||
private String operateWay;
|
||||
|
||||
/**高级设置*/
|
||||
private List<UiHighSettingVO> uiHighSettingVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestCaseLog;
|
||||
|
||||
import com.test.test.domain.qo.TestReportAddQO;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -28,6 +29,14 @@ public interface TestCaseLogMapper
|
||||
*/
|
||||
public List<TestCaseLog> selectTestCaseLogList(TestCaseLog testCaseLog);
|
||||
|
||||
/**
|
||||
* 查询用例日志列表
|
||||
*
|
||||
* @param testCaseLog 用例日志
|
||||
* @return 用例日志集合
|
||||
*/
|
||||
public String selectTestCaseLogCaseSid(TestReportAddQO testCaseLog);
|
||||
|
||||
/**
|
||||
* 新增用例日志
|
||||
*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.TestCaseListQO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -20,6 +21,11 @@ public interface TestCaseMapper
|
||||
*/
|
||||
List<TestCase> selectTestCaseList(TestCaseListQO qo);
|
||||
|
||||
/**
|
||||
* 查询测试计划可关联的用例列表
|
||||
*/
|
||||
List<TestCase> selectValidTestPlanCaseList(TestCaseListQO qo);
|
||||
|
||||
/**
|
||||
* 查询用例列表
|
||||
*/
|
||||
@@ -44,4 +50,9 @@ public interface TestCaseMapper
|
||||
* 批量删除用例
|
||||
*/
|
||||
int deleteTestCaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关联的用例列表
|
||||
*/
|
||||
List<TestCase> selectRelateCaseList(Long projectId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.TestDefectListQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试缺陷Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface TestDefectMapper
|
||||
{
|
||||
/**
|
||||
* 查询测试缺陷
|
||||
*
|
||||
* @param id 测试缺陷主键
|
||||
* @return 测试缺陷
|
||||
*/
|
||||
public TestDefect selectTestDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试缺陷列表
|
||||
*
|
||||
* @param qo 测试缺陷
|
||||
* @return 测试缺陷集合
|
||||
*/
|
||||
public List<TestDefect> selectTestDefectList(TestDefectListQO qo);
|
||||
|
||||
/**
|
||||
* 新增测试缺陷
|
||||
*
|
||||
* @param testDefect 测试缺陷
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTestDefect(TestDefect testDefect);
|
||||
|
||||
/**
|
||||
* 修改测试缺陷
|
||||
*
|
||||
* @param testDefect 测试缺陷
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestDefect(TestDefect testDefect);
|
||||
|
||||
/**
|
||||
* 删除测试缺陷
|
||||
*
|
||||
* @param id 测试缺陷主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除测试缺陷
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestDefectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关联的缺陷列表
|
||||
*/
|
||||
List<TestDefect> selectRelateDefectList(Long projectId);
|
||||
}
|
||||
@@ -13,6 +13,11 @@ public interface TestGroupMapper
|
||||
*/
|
||||
List<TestGroup> selectTestGroupList(String type);
|
||||
|
||||
/**
|
||||
* 查询节点(文件夹)列表
|
||||
*/
|
||||
TestGroup selectTestGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询节点(文件夹)列表
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestPlanCase;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划用例关联Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
public interface TestPlanCaseMapper
|
||||
{
|
||||
/**
|
||||
* 查询测试计划用例关联
|
||||
*
|
||||
* @param id 测试计划用例关联主键
|
||||
* @return 测试计划用例关联
|
||||
*/
|
||||
public TestPlanCase selectTestPlanCaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试计划用例关联列表
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 测试计划用例关联集合
|
||||
*/
|
||||
public List<TestPlanCase> selectTestPlanCaseList(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 新增测试计划用例关联
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTestPlanCase(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 修改测试计划用例关联
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestPlanCase(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 删除测试计划用例关联
|
||||
*
|
||||
* @param id 测试计划用例关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanCaseById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除测试计划用例关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanCaseByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface TestPlanDefectMapper
|
||||
{
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联
|
||||
*
|
||||
* @param id 测试计划测试缺陷关联主键
|
||||
* @return 测试计划测试缺陷关联
|
||||
*/
|
||||
public TestPlanDefect selectTestPlanDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联列表
|
||||
*
|
||||
* @param testPlanDefect 测试计划测试缺陷关联
|
||||
* @return 测试计划测试缺陷关联集合
|
||||
*/
|
||||
public List<TestPlanDefectVo> selectTestPlanDefectList(TestPlanDefectQO testPlanDefect);
|
||||
|
||||
/**
|
||||
* 新增测试计划测试缺陷关联
|
||||
*
|
||||
* @param testPlanDefect 测试计划测试缺陷关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTestPlanDefect(TestPlanDefect testPlanDefect);
|
||||
|
||||
/**
|
||||
* 修改测试计划测试缺陷关联
|
||||
*
|
||||
* @param testPlanDefect 测试计划测试缺陷关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestPlanDefect(TestPlanDefect testPlanDefect);
|
||||
|
||||
/**
|
||||
* 删除测试计划测试缺陷关联
|
||||
*
|
||||
* @param id 测试计划测试缺陷关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除测试计划测试缺陷关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanDefectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关联列表
|
||||
* @param testPlanDefect
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanDefect> selectRelList(TestPlanDefect testPlanDefect);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联计划列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlan> selectDefectPlanList(Long defectId);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.qo.TestPlanListQO;
|
||||
import com.test.test.domain.vo.TestPlanListVO;
|
||||
import com.test.test.domain.vo.TestPlanOverviewTrendDataVO;
|
||||
import com.test.test.domain.vo.TestPlanOverviewVO;
|
||||
import java.util.List;
|
||||
public interface TestPlanMapper {
|
||||
|
||||
/**
|
||||
* 查询测试计划列表
|
||||
* @param qo
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanListVO> selectTestPlanList(TestPlanListQO qo);
|
||||
|
||||
/**
|
||||
* 新增测试计划
|
||||
* @param testPlan
|
||||
* @return
|
||||
*/
|
||||
int insertTestPlan(TestPlan testPlan);
|
||||
|
||||
/**
|
||||
* 根据id查询测试计划
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
TestPlan selectTestPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 修改测试计划
|
||||
* @param testPlan
|
||||
* @return
|
||||
*/
|
||||
int updateTestPlan(TestPlan testPlan);
|
||||
|
||||
/**
|
||||
* 根据序列号查询测试计划id
|
||||
* @param serialNumber
|
||||
* @return
|
||||
*/
|
||||
Long selectPlanId(String serialNumber);
|
||||
|
||||
/**
|
||||
* 查询测试计划概览信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
TestPlanOverviewVO selectPlanOverview(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试计划用例执行趋势数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanOverviewTrendDataVO> getCaseTrendData(Long id);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.qo.TestReportAddQO;
|
||||
|
||||
public interface TestPlanReportMapper {
|
||||
|
||||
/**
|
||||
* 新增测试计划关联测试报告
|
||||
* @param testReportAddQO
|
||||
* @return
|
||||
*/
|
||||
int insertTestPlanReport(TestReportAddQO testReportAddQO);
|
||||
}
|
||||
@@ -33,5 +33,19 @@ public interface TestProjectMapper {
|
||||
* @return
|
||||
*/
|
||||
TestProject selectTestProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 更新需求
|
||||
* @param testProject
|
||||
* @return
|
||||
*/
|
||||
int updateTestProject(TestProject testProject);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的测试计划
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestProject> selectRelateProjectList(Long defectId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.qo.TestPlanAddQO;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import java.util.List;
|
||||
|
||||
public interface TestProjectPlanMapper {
|
||||
|
||||
/**
|
||||
* 新增测试计划需求关联
|
||||
* @param testPlanAddQO
|
||||
* @return
|
||||
*/
|
||||
int insertTestProjectPlan(TestPlanAddQO testPlanAddQO);
|
||||
|
||||
/**
|
||||
* 查询测试计划关联需求列表
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectTestPlanProjectList(Long planId);
|
||||
|
||||
/**
|
||||
* 查询需求关联计划列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectRelatePlanList(Long projectId);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestReport;
|
||||
import com.test.test.domain.vo.TestReportVo;
|
||||
import java.util.List;
|
||||
|
||||
public interface TestReportMapper {
|
||||
|
||||
/**
|
||||
* 查询测试报告列表
|
||||
*
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
List<TestReportVo> selectTestReportList(Long planId);
|
||||
|
||||
/**
|
||||
* 新增测试报告
|
||||
* @param testReport
|
||||
* @return
|
||||
*/
|
||||
int addTestReport(TestReport testReport);
|
||||
|
||||
/**
|
||||
* 查询用例执行测试报告详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
TestReport selectCaseTestReportById(Long id);
|
||||
|
||||
/**
|
||||
* 修改用例执行测试报告
|
||||
* @param testReport
|
||||
* @return
|
||||
*/
|
||||
int updateExecuteCaseReport(TestReport testReport);
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.qo.UiAutomationQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface UiAutomationMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return ui自动化
|
||||
*/
|
||||
public UiAutomation selectUiAutomationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return ui自动化集合
|
||||
*/
|
||||
public List<UiAutomation> selectUiAutomationList(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
* @param uiAutomation
|
||||
* @return
|
||||
*/
|
||||
public List<UiAutomation> selectUiAutomationListNew(UiAutomationQO uiAutomation);
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiAutomation(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiAutomation(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 删除ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteUiAutomationByGroupIds(List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiElement;
|
||||
import com.test.test.domain.qo.UiElementQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui元素Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface UiElementMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui元素
|
||||
*
|
||||
* @param id ui元素主键
|
||||
* @return ui元素
|
||||
*/
|
||||
public UiElement selectUiElementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui元素列表
|
||||
*
|
||||
* @param uiElement ui元素
|
||||
* @return ui元素集合
|
||||
*/
|
||||
public List<UiElement> selectUiElementList(UiElement uiElement);
|
||||
|
||||
|
||||
/**
|
||||
* 查询ui元素列表
|
||||
* @param uiElement
|
||||
* @return
|
||||
*/
|
||||
List<UiElement> selectUiElementListNew(UiElementQO uiElement);
|
||||
|
||||
/**
|
||||
* 新增ui元素
|
||||
*
|
||||
* @param uiElement ui元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiElement(UiElement uiElement);
|
||||
|
||||
/**
|
||||
* 修改ui元素
|
||||
*
|
||||
* @param uiElement ui元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiElement(UiElement uiElement);
|
||||
|
||||
/**
|
||||
* 删除ui元素
|
||||
*
|
||||
* @param id ui元素主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiElementById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ui元素
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiElementByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteUiElementByGroupIds(List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiHighSetting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface UiHighSettingMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui高级设置
|
||||
*
|
||||
* @param id ui高级设置主键
|
||||
* @return ui高级设置
|
||||
*/
|
||||
public List<UiHighSetting> selectUiHighSettingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui高级设置列表
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return ui高级设置集合
|
||||
*/
|
||||
public List<UiHighSetting> selectUiHighSettingList(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 新增ui高级设置
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiHighSetting(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 修改ui高级设置
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiHighSetting(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 删除ui高级设置
|
||||
*
|
||||
* @param sceneStepsId ui高级设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiHighSettingById(Long sceneStepsId);
|
||||
|
||||
/**
|
||||
* 批量删除ui高级设置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiHighSettingByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiReport;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui报告Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public interface UiReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui报告
|
||||
*
|
||||
* @param id ui报告主键
|
||||
* @return ui报告
|
||||
*/
|
||||
public UiReport selectUiReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui报告列表
|
||||
*
|
||||
* @param uiReport ui报告
|
||||
* @return ui报告集合
|
||||
*/
|
||||
public List<UiReport> selectUiReportList(UiReport uiReport);
|
||||
|
||||
/**
|
||||
* 新增ui报告
|
||||
*
|
||||
* @param uiReport ui报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiReport(UiReport uiReport);
|
||||
|
||||
/**
|
||||
* 修改ui报告
|
||||
*
|
||||
* @param uiReport ui报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiReport(UiReport uiReport);
|
||||
|
||||
/**
|
||||
* 删除ui报告
|
||||
*
|
||||
* @param id ui报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ui报告
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiReportByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface UiSceneStepsMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化场景步骤
|
||||
*
|
||||
* @param automationId ui自动化场景步骤主键
|
||||
* @return ui自动化场景步骤
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsById(Long automationId);
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景步骤列表
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return ui自动化场景步骤集合
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsList(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 新增ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 修改ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 删除ui自动化场景步骤
|
||||
*
|
||||
* @param automationId ui自动化场景步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsById(Long automationId);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化场景步骤
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiSceneStepsReport;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景报告Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-24
|
||||
*/
|
||||
public interface UiSceneStepsReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化场景报告
|
||||
*
|
||||
* @param id ui自动化场景报告主键
|
||||
* @return ui自动化场景报告
|
||||
*/
|
||||
public UiSceneStepsReport selectUiSceneStepsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景报告列表
|
||||
*
|
||||
* @param uiSceneStepsReport ui自动化场景报告
|
||||
* @return ui自动化场景报告集合
|
||||
*/
|
||||
public List<UiSceneStepsReport> selectUiSceneStepsReportList(UiSceneStepsReport uiSceneStepsReport);
|
||||
|
||||
/**
|
||||
* 新增ui自动化场景报告
|
||||
*
|
||||
* @param uiSceneStepsReport ui自动化场景报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiSceneStepsReport(UiSceneStepsReport uiSceneStepsReport);
|
||||
|
||||
/**
|
||||
* 修改ui自动化场景报告
|
||||
*
|
||||
* @param uiSceneStepsReport ui自动化场景报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiSceneStepsReport(UiSceneStepsReport uiSceneStepsReport);
|
||||
|
||||
/**
|
||||
* 删除ui自动化场景报告
|
||||
*
|
||||
* @param id ui自动化场景报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化场景报告
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsReportByIds(Long[] ids);
|
||||
}
|
||||
@@ -17,9 +17,10 @@ public interface IPerformanceTestCaseReportService
|
||||
* @param id
|
||||
* @param jmeterHomePath
|
||||
* @param triggerType 触发方式:1-定时任务;2-手动
|
||||
* @param createBy 创建人
|
||||
* @return 返回本次性能测试的批次id
|
||||
*/
|
||||
public Long executePerformanceTestAndReport(Long id, String jmeterHomePath, Integer triggerType);
|
||||
public Long executePerformanceTestAndReport(Long id, String jmeterHomePath, Integer triggerType, String createBy);
|
||||
|
||||
/**
|
||||
* 查询性能测试用例报告
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestPlanCase;
|
||||
import com.test.test.domain.qo.TestCaseListQO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,6 +30,13 @@ public interface ITestCaseService
|
||||
*/
|
||||
public List<TestCase> selectTestCaseList(TestCaseListQO qo);
|
||||
|
||||
/**
|
||||
* 查询测试计划可关联的用例列表
|
||||
* @param qo 用例
|
||||
* @return 用例集合
|
||||
*/
|
||||
public List<TestCase> selectValidTestPlanCaseList(TestCaseListQO qo);
|
||||
|
||||
/**
|
||||
* 查询用例列表
|
||||
* @param testCase
|
||||
@@ -77,4 +85,14 @@ public interface ITestCaseService
|
||||
* @return 是否成功
|
||||
*/
|
||||
public String executeTestCaseById(Long id, String jmeterHomePath, String caseSid);
|
||||
|
||||
/**
|
||||
* 执行测试计划关联的用例
|
||||
*
|
||||
* @param testPlanCase 测试计划关联用例查询条件
|
||||
* @param jmeterHomePath jmeter安装路径
|
||||
* @param caseSid 用例执行uuid
|
||||
* @return 是否成功
|
||||
*/
|
||||
public void executeTestCaseByPlanCase(TestPlanCase testPlanCase, String jmeterHomePath, String caseSid);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.TestDefectListQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试缺陷Service接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface ITestDefectService
|
||||
{
|
||||
/**
|
||||
* 查询测试缺陷
|
||||
*
|
||||
* @param id 测试缺陷主键
|
||||
* @return 测试缺陷
|
||||
*/
|
||||
public TestDefect selectTestDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试缺陷列表
|
||||
*
|
||||
* @param qo 测试缺陷
|
||||
* @return 测试缺陷集合
|
||||
*/
|
||||
public List<TestDefect> selectTestDefectList(TestDefectListQO qo);
|
||||
|
||||
/**
|
||||
* 新增测试缺陷
|
||||
*
|
||||
* @param testDefect 测试缺陷
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTestDefect(TestDefect testDefect);
|
||||
|
||||
/**
|
||||
* 修改测试缺陷
|
||||
*
|
||||
* @param testDefect 测试缺陷
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestDefect(TestDefect testDefect);
|
||||
|
||||
/**
|
||||
* 批量删除测试缺陷
|
||||
*
|
||||
* @param ids 需要删除的测试缺陷主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestDefectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除测试缺陷信息
|
||||
*
|
||||
* @param id 测试缺陷主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestDefectById(Long id);
|
||||
}
|
||||
@@ -35,4 +35,18 @@ public interface ITestGroupService {
|
||||
* 删除节点(文件夹)信息
|
||||
*/
|
||||
int deleteTestGroupById(GroupDelectQO qo) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询子节点
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Long> getAllChildIds(Long id,String type);
|
||||
|
||||
/**
|
||||
* 获取模块名
|
||||
* @param groupId
|
||||
* @return
|
||||
*/
|
||||
String buildGroupPath(Long groupId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestPlanCase;
|
||||
import com.test.test.domain.qo.TestPlanCaseQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划用例关联Service接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-25
|
||||
*/
|
||||
public interface ITestPlanCaseService
|
||||
{
|
||||
/**
|
||||
* 查询测试计划用例关联
|
||||
*
|
||||
* @param id 测试计划用例关联主键
|
||||
* @return 测试计划用例关联
|
||||
*/
|
||||
public TestPlanCase selectTestPlanCaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试计划用例关联列表
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 测试计划用例关联集合
|
||||
*/
|
||||
public List<TestPlanCase> selectTestPlanCaseList(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 保存测试计划用例关联列表
|
||||
*
|
||||
* @param testPlanCaseQO 测试计划用例关联
|
||||
* @return
|
||||
*/
|
||||
public void saveRelate(TestPlanCaseQO testPlanCaseQO);
|
||||
|
||||
/**
|
||||
* 新增测试计划用例关联
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTestPlanCase(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 修改测试计划用例关联
|
||||
*
|
||||
* @param testPlanCase 测试计划用例关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestPlanCase(TestPlanCase testPlanCase);
|
||||
|
||||
/**
|
||||
* 批量删除测试计划用例关联
|
||||
*
|
||||
* @param ids 需要删除的测试计划用例关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanCaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除测试计划用例关联信息
|
||||
*
|
||||
* @param id 测试计划用例关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanCaseById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectRelQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划测试缺陷关联Service接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface ITestPlanDefectService
|
||||
{
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联
|
||||
*
|
||||
* @param id 测试计划测试缺陷关联主键
|
||||
* @return 测试计划测试缺陷关联
|
||||
*/
|
||||
public TestPlanDefect selectTestPlanDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联列表
|
||||
*
|
||||
* @param testPlanDefect 测试计划测试缺陷关联
|
||||
* @return 测试计划测试缺陷关联集合
|
||||
*/
|
||||
public List<TestPlanDefectVo> selectTestPlanDefectList(TestPlanDefectQO testPlanDefect);
|
||||
|
||||
/**
|
||||
* 新增测试计划测试缺陷关联
|
||||
*
|
||||
* @param qo 测试计划测试缺陷关联
|
||||
* @return 结果
|
||||
*/
|
||||
public void insertTestPlanDefect(TestPlanDefectRelQO qo);
|
||||
|
||||
/**
|
||||
* 修改测试计划测试缺陷关联
|
||||
*
|
||||
* @param testPlanDefect 测试计划测试缺陷关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTestPlanDefect(TestPlanDefect testPlanDefect);
|
||||
|
||||
/**
|
||||
* 批量删除测试计划测试缺陷关联
|
||||
*
|
||||
* @param ids 需要删除的测试计划测试缺陷关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanDefectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除测试计划测试缺陷关联信息
|
||||
*
|
||||
* @param id 测试计划测试缺陷关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的测试计划列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlan> selectDefectPlanList(Long defectId);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的需求列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestProject> selectDefectProjectList(Long defectId);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试计划需求关联Service接口
|
||||
*/
|
||||
public interface ITestPlanProjectService {
|
||||
|
||||
/**
|
||||
* 查询测试计划需求关联列表
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectTestPlanProjectList(Long planId);
|
||||
|
||||
/**
|
||||
* 查询需求关联测试计划列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectRelatePlanList(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询需求关联用例列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestCase> selectRelateCaseList(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询需求关联缺陷列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestDefect> selectRelateDefectList(Long projectId);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user