Commit 39a1dd26 by 齐文博

自动化

parent 50167dbb
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>CGLIB</groupId> <groupId>cglib</groupId>
<artifactId>cglib</artifactId> <artifactId>cglib</artifactId>
<version>3.3.0</version> <!-- 确保版本适合您的项目 --> <version>3.3.0</version> <!-- 确保版本适合您的项目 -->
</dependency> </dependency>
......
...@@ -13,7 +13,6 @@ import com.lemon.utils.HttpUtils; ...@@ -13,7 +13,6 @@ import com.lemon.utils.HttpUtils;
import io.qameta.allure.Step; import io.qameta.allure.Step;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.AfterSuite; import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite; import org.testng.annotations.BeforeSuite;
......
package com.lemon.cases; package com.lemon.cases;
import com.lemon.utils.AuthorizationUtils;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.CookieStore; import org.apache.http.client.CookieStore;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity; import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.DataProvider; import org.testng.annotations.DataProvider;
......
...@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONPath; ...@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONPath;
import com.lemon.constants.Constants; import com.lemon.constants.Constants;
import com.lemon.pojo.API; import com.lemon.pojo.API;
import com.lemon.pojo.Case; import com.lemon.pojo.Case;
import com.lemon.utils.AuthorizationUtils;
import com.lemon.utils.ExcelUtils; import com.lemon.utils.ExcelUtils;
import com.lemon.utils.SqlUtils; import com.lemon.utils.SqlUtils;
import io.qameta.allure.Step; import io.qameta.allure.Step;
......
package com.lemon.cases; package com.lemon.cases;
import com.alibaba.fastjson.JSONObject;
import com.lemon.constants.Constants; import com.lemon.constants.Constants;
import com.lemon.pojo.API; import com.lemon.pojo.API;
import com.lemon.pojo.Case; import com.lemon.pojo.Case;
import com.lemon.utils.AuthorizationUtils;
import com.lemon.utils.ExcelUtils; import com.lemon.utils.ExcelUtils;
import com.lemon.utils.HttpUtils;
import com.lemon.utils.SqlUtils; import com.lemon.utils.SqlUtils;
import netscape.javascript.JSObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.DataProvider; import org.testng.annotations.DataProvider;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
/** /**
* @program: Lemon * @program: Lemon
* @description: * @description:
......
package com.lemon.cases; package com.lemon.cases;
import com.alibaba.fastjson.JSONPath;
import com.lemon.constants.Constants; import com.lemon.constants.Constants;
import com.lemon.pojo.API; import com.lemon.pojo.API;
import com.lemon.pojo.Case; import com.lemon.pojo.Case;
...@@ -11,16 +10,12 @@ import com.lemon.utils.SqlUtils; ...@@ -11,16 +10,12 @@ import com.lemon.utils.SqlUtils;
/*import com.pcloud.universe.wework.client.MessageBuilder; /*import com.pcloud.universe.wework.client.MessageBuilder;
import com.pcloud.universe.wework.client.WeworkRobotSender;*/ import com.pcloud.universe.wework.client.WeworkRobotSender;*/
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Step;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.utils.DateUtils; import org.apache.http.client.utils.DateUtils;
import org.testng.annotations.DataProvider; import org.testng.annotations.DataProvider;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import org.testng.Assert; import org.testng.Assert;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal;
import java.text.DecimalFormat;
public class ServerCase extends BaseCase { public class ServerCase extends BaseCase {
@Test(dataProvider = "data1", description = "1A:A段和B段sql完全匹配") // DTO数据传输 @Test(dataProvider = "data1", description = "1A:A段和B段sql完全匹配") // DTO数据传输
......
...@@ -35,7 +35,7 @@ public class WonderfulChinaInTheMuseumServeCase extends BaseCase { ...@@ -35,7 +35,7 @@ public class WonderfulChinaInTheMuseumServeCase extends BaseCase {
//excel用例路径 todo 此处需要根据具体书籍进行更换 //excel用例路径 todo 此处需要根据具体书籍进行更换
public static final String EXCEL_PATH = "src/test/resources/WonderfulChinaInTheMuseum.xls"; public static final String EXCEL_PATH = "src/test/resources/博物馆里的奇妙中国(1).xls";
private static final String ramdonUserId = UUID.randomUUID().toString(); private static final String ramdonUserId = UUID.randomUUID().toString();
...@@ -53,8 +53,8 @@ public class WonderfulChinaInTheMuseumServeCase extends BaseCase { ...@@ -53,8 +53,8 @@ public class WonderfulChinaInTheMuseumServeCase extends BaseCase {
webSocketManager.scheduler.scheduleAtFixedRate(() -> { webSocketManager.scheduler.scheduleAtFixedRate(() -> {
if (webSocketManager.webSocketClient.isOpen()) { if (webSocketManager.webSocketClient.isOpen()) {
// todo 此处需要根据具体书籍进行更换 // todo 此处需要根据具体书籍进行更换
String heartbeatMessage = "{\"event\":0,\"sendType\":0,\"userId\":\"33624445\"," + String heartbeatMessage = "{\"event\":0,\"sendType\":0,\"userId\":\"260513294\"," +
"\"officialAccountsId\":23,\"messageBody\":\"\",\"origin\":\"WEB_H5\",\"bookId\":\"12623004\"}"; "\"officialAccountsId\":997,\"messageBody\":\"\",\"origin\":\"WEB_H5\",\"bookId\":\"12623004\"}";
webSocketManager.webSocketClient.send(heartbeatMessage); webSocketManager.webSocketClient.send(heartbeatMessage);
log.info("发送心跳消息: " + heartbeatMessage); log.info("发送心跳消息: " + heartbeatMessage);
} }
......
...@@ -27,7 +27,6 @@ import java.util.Optional; ...@@ -27,7 +27,6 @@ import java.util.Optional;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class WebSocketManager { public class WebSocketManager {
......
...@@ -10,7 +10,6 @@ import com.lemon.pojo.WriteBackData; ...@@ -10,7 +10,6 @@ import com.lemon.pojo.WriteBackData;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import java.io.*; import java.io.*;
import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
package com.lemon.utils; package com.lemon.utils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.lemon.constants.Constants;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
...@@ -13,7 +12,6 @@ import org.apache.http.impl.client.CloseableHttpClient; ...@@ -13,7 +12,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import java.sql.SQLOutput;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
......
...@@ -2,8 +2,6 @@ package com.lemon.utils; ...@@ -2,8 +2,6 @@ package com.lemon.utils;
import com.lemon.constants.Constants; import com.lemon.constants.Constants;
import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler; import org.apache.commons.dbutils.handlers.ScalarHandler;
import java.sql.Connection; import java.sql.Connection;
......
...@@ -3,27 +3,32 @@ ...@@ -3,27 +3,32 @@
<!-- <test name="睿思数据"> &lt;!&ndash; 模块&ndash;&gt;--> <!-- <test name="睿思数据"> &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <classes>--> <!-- <classes>-->
<!-- <class name="com.lemon.cases.RaysDataCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;--> <!-- <class name="cases.com.lemon.RaysDataCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test name="RAYS支付"> &lt;!&ndash; 模块&ndash;&gt;--> <!-- <test name="RAYS支付"> &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <classes>--> <!-- <classes>-->
<!-- <class name="com.lemon.cases.PayCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;--> <!-- <class name="cases.com.lemon.PayCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test name="RAYS7标准化"> &lt;!&ndash; 模块&ndash;&gt;--> <!-- <test name="RAYS7标准化"> &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <classes>--> <!-- <classes>-->
<!-- <class name="com.lemon.cases.Rays7Case"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;--> <!-- <class name="cases.com.lemon.Rays7Case"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test name="RAYS7服务"> &lt;!&ndash; 模块&ndash;&gt; <!-- <test name="RAYS7服务"> &lt;!&ndash; 模块&ndash;&gt;
<classes> <classes>
<class name="com.lemon.cases.changjiangzuoyeserveCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt; <class name="cases.com.lemon.changjiangzuoyeserveCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;
</classes> </classes>
</test>--> </test>-->
<test name="多媒体制作与人工智能运用繁体"> <!-- 模块-->
<classes>
<class name="com.lemon.cases.OverseasMultimediaServeCase"/> <!-- 测试类/用例类-->
</classes>
</test>
<test name="博物馆里的奇妙中国"> <!-- 模块--> <test name="博物馆里的奇妙中国"> <!-- 模块-->
<classes> <classes>
...@@ -31,9 +36,20 @@ ...@@ -31,9 +36,20 @@
</classes> </classes>
</test> </test>
<test name="摄影的黄金时间"> <!-- 模块-->
<classes>
<class name="com.lemon.cases.ThegoldentimeofphotographyServeCase"/> <!-- 测试类/用例类-->
</classes>
</test>
<test name="2024幼小衔接"> <!-- 模块-->
<classes>
<class name="com.lemon.cases.youxiaoxianjieServeCase"/> <!-- 测试类/用例类-->
</classes>
</test>
<!-- <test name="注册模块"> &lt;!&ndash; 模块&ndash;&gt;--> <!-- <test name="注册模块"> &lt;!&ndash; 模块&ndash;&gt;-->
<!-- <classes>--> <!-- <classes>-->
<!-- <class name="com.lemon.cases.RegisterDemoCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;--> <!-- <class name="cases.com.lemon.RegisterDemoCase"/> &lt;!&ndash; 测试类/用例类&ndash;&gt;-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment