Commit a4b781d8 authored by 张艳玲's avatar 张艳玲

update

parent a04efa8d
package com.kjj.cases.basics;
public class Video {
}
......@@ -24,14 +24,25 @@ public interface AdminAuthorization {
// 创建用户 并传到network里
network.agentCookies.put("authKey",AUTH_KEY);
System.out.println("用户AUTH_KEY:"+AUTH_KEY);
}
/**
* 访客授权
* 访客(嘿保险)授权
*/
}
default void visitorAuth() {
network.agentCookies.put("authKey", VISITORKEY);
System.out.println("用户AUTH_KEY:" + VISITORKEY);
}
/**
* 访客(🍗)授权
*/
default void visitorAuth2() {
network.agentCookies.put("authKey", VISITORKEY1);
System.out.println("用户AUTH_KEY:" + VISITORKEY1);
}
}
......@@ -14,7 +14,20 @@ public class DesignatedWinner implements AdminAuthorization{
agentAuth();
}
@Test(description = "查询指定中奖配置", priority = 1)
@Test(description = "获取直播状态", priority = 1)
public void 获取直播状态() {
Map<String, Object> astatusParam = new HashMap<>();
astatusParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response astatusRes = network.getResponse(astatusParam, BasicConfig.MOBILE_status);
Map<String, Object> data = astatusRes.jsonPath().getJsonObject("data");
System.out.println(data);
int liveStatus = (int) data.get("liveStatus");
boolean lotteryFlag = (boolean)data.get("lotteryFlag");
Assert.assertEquals(liveStatus,1, network.message(astatusParam, BasicConfig.MOBILE_status, "直播状态查询失败", astatusRes.body().asString()));
Assert.assertTrue(lotteryFlag, network.message(astatusParam, BasicConfig.MOBILE_status, "抽奖标记为false", astatusRes.body().asString()));
}
@Test(description = "查询指定中奖配置", priority = 2)
public void 查询指定中奖配置() {
Map<String, Object> awardConfParam = new HashMap<>();
awardConfParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -23,20 +36,63 @@ public class DesignatedWinner implements AdminAuthorization{
System.out.println(data);
Assert.assertNotNull(data, network.message(awardConfParam, BasicConfig.MOBILE_AgentSpecifyAwardConf, "中奖配置查询失败", awardConfRes.body().asString()));
}
@Test(description = "查询指定中奖用户列表", priority = 3)
public void 查询指定中奖用户列表() {
Map<String, Object> UserSelectListfParam = new HashMap<>();
UserSelectListfParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response UserSelectListRes = network.getResponse(UserSelectListfParam, BasicConfig.MOBILE_SpecifyAwardUserSelectList);
Object data = UserSelectListRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(UserSelectListfParam, BasicConfig.MOBILE_SpecifyAwardUserSelectList, "查询指定中奖用户失败", UserSelectListRes.body().asString()));
}
@Test(description = "代理人指定访客中奖表单提交", priority = 4)
public void 代理人指定访客中奖表单提交() {
Map<String, Object> SubmitParam = new HashMap<>();
SubmitParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
SubmitParam.put("visitorId","Kj22NzI2Mw");
Response SubmitRes = network.postResponse(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit);
Object data = SubmitRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit, "代理人指定中奖提交失败", SubmitRes.body().asString()));
}
// @Test(description = "代理人指定访客中奖表单提交", priority = 2)
// public void 代理人指定访客中奖表单提交() {
// Map<String, Object> SubmitParam = new HashMap<>();
// SubmitParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// SubmitParam.put("visitorId","Kj21NDE0NTU");
//
// Response SubmitRes = network.getResponse(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit);
// Object data = SubmitRes.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit, "代理人指定中奖失败", SubmitRes.body().asString()));
//
// }
@Test(description = "被代理人指定中奖的用户列表", priority = 5)
public void 被代理人指定中奖的用户列表() {
Map<String, Object> AwardUserListParam = new HashMap<>();
AwardUserListParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response AwardUserListRes = network.getResponse(AwardUserListParam, BasicConfig.MOBILE_agentSpecifyAwardUserList);
Object data = AwardUserListRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(AwardUserListParam, BasicConfig.MOBILE_agentSpecifyAwardUserList, "查询指定中奖用户列表失败", AwardUserListRes.body().asString()));
}
@Test(description = "代理人指定中奖信息查询", priority = 6)
public void 代理人指定中奖信息查询() {
Map<String, Object> AwardInfoParam = new HashMap<>();
AwardInfoParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response AAwardInfoRes = network.getResponse(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo);
Object data = AAwardInfoRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo, "查询指定中奖信息失败", AAwardInfoRes.body().asString()));
}
@Test(description = "代理人指定中奖配置查询", priority = 7)
public void 代理人指定中奖配置查询() {
Map<String, Object> AwardConfParam = new HashMap<>();
AwardConfParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response AwardConfRes = network.getResponse(AwardConfParam, BasicConfig.MOBILE_agentSpecifyAwardConf);
Object data = AwardConfRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(AwardConfParam, BasicConfig.MOBILE_agentSpecifyAwardConf, "代理人指定中奖配置查询失败", AwardConfRes.body().asString()));
}
......
This diff is collapsed.
......@@ -14,6 +14,8 @@ public class BasicConfig {
public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu";
//直播访客 (嘿 保险)
public static String VISITORKEY ="LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW";
//直播访客 (🍗)
public static String VISITORKEY1 ="LEH7epeHVDJWzhZ6DiexTHnsYWTEo46qxbPUiJ1xnTqmCJPHLGsoTuy5C2psyH1j5t5ppr3BNQLrBXrBmsmJUDJcXSivb";
// 基础线代理人 TKU
public static String AGENT_TKU = "T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm";
// 基础线访客 TKU
......@@ -36,6 +38,7 @@ public class BasicConfig {
//手机端地址
public static final String MOBILE_HOST = "https://live.duibatest.com.cn";
public static final String MOBILE_HOST1 = "https://kjj.m.duibatest.com.cn";
// *************** 主播端 ***************
public static final String ANCHOR_OPEN = MOBILE_HOST + "/conf/live/open";
......@@ -52,6 +55,7 @@ public class BasicConfig {
public static final String USER_END = MOBILE_HOST + "/kjy/live/assist/lottery/end";
public static final String USER_savePoster = MOBILE_HOST + "/kjy/live/user/share/savePoster";
public static final String USER_myCount = MOBILE_HOST + "/kjy/live/user/lottery/myCount";
public static final String USER_wxIdAllList = MOBILE_HOST1 + "/kjy/mp/msg/config/live/user/wxIdAllList";
// *************** 直播管理端 ***************
public static final String MANAGER_SAVEANDUPDATE = MANAGER_HOST + "/kjy/manager/live/pre/conf/saveAndUpdate";
......@@ -104,6 +108,14 @@ public class BasicConfig {
public static final String MOBILE_GETSHARESIGN = MOBILE_HOST + "/kjy/live/getShareSign";
public static final String MOBILE_binding = MOBILE_HOST + "/clue/invitation/binding";
public static final String MOBILE_AgentSpecifyAwardConf = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardConf";
public static final String MOBILE_Token = MOBILE_HOST + "/clue/invitation/token";
public static final String MOBILE_Code = MOBILE_HOST + "/clue/invitation/code";
public static final String MOBILE_MyLotteryCode = MOBILE_HOST + "/kjy/live/lottery/myLotteryCode";
public static final String MOBILE_SpecifyAwardUserSelectList = MOBILE_HOST + "/kjy/live/agent/specifyAwardUserSelectList";
public static final String MOBILE_status = MOBILE_HOST + "/index/status";
public static final String MOBILE_agentSpecifyAwardUserList = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardUserList";
public static final String MOBILE_agentSpecifyAwardInfo = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardInfo";
public static final String MOBILE_agentSpecifyAwardConf = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardConf";
//***************直播素材*****************
public static final String MANAGER_SAVEORUPDATE6 = MANAGER_HOST+ "/kjy/manager/conf/base/welfare/saveOrUpdate";
......
......@@ -32,17 +32,16 @@
</classes>
</test>
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.OpenLive"/>
</classes>
</test>
<test preserve-order="true" name="指定中奖">
<classes>
<class name="com.kjj.cases.live.DesignatedWinner"/>
</classes>
</test>
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.OpenLive"/>
</classes>
</test>
<test preserve-order="true" name="访客领取资料">
<classes>
<class name="com.kjj.cases.live.LiveVisitors"/>
......@@ -54,15 +53,10 @@
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
<class name="com.kjj.cases.live.CloseLive"/>
</classes>
</test>
</suite>
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