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

update

parent ac17aa28
package com.kjj.bean;
import lombok.Data;
@Data
public class GetShareSign {
private String posterUrl;
private String mpQrcode;
private String mpShareUrl;
private String mpShareTitle;
private String shareSign;
private String shareContent;
private String liveType;
}
package com.kjj.bean;
import lombok.Data;
import java.util.List;
@Data
public class LotteryList {
private List<List_Lottery> LotteryList;
private String welfareId;
private String configId;
@Data
public static class List_Lottery
{
private String id;
private String name;
}
}
package com.kjj.bean;
import lombok.Data;
import java.util.Date;
@Data
public class RedSimpleDetail {
private int totalAmount;
private int luckAmount;
private int luckNum;
private int luckHelpNum;
private Date startTime;
private int redStatus;
}
package com.kjj.bean; package com.kjj.bean.admin;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.agent;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.agent;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.agent;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.lottery;
import lombok.Data; import lombok.Data;
......
...@@ -2,8 +2,20 @@ package com.kjj.bean.lottery; ...@@ -2,8 +2,20 @@ package com.kjj.bean.lottery;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class LotteryList { public class LotteryList {
private int drawDownNum; private List<List_Lottery> LotteryList;
private String welfareId;
private String configId;
@Data
public static class List_Lottery
{
private String id;
private String name;
}
} }
package com.kjj.bean; package com.kjj.bean.manager;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.manager;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
......
package com.kjj.bean; package com.kjj.bean.manager;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.manager;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.manager;
import com.kjj.bean.manager.VoteBean;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class VoteListBean { public class VoteListBean {
......
package com.kjj.bean; package com.kjj.bean.manager;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.manager;
import com.kjj.bean.manager.WelfareBean;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.red;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.bean; package com.kjj.bean.resources;
import lombok.Data; import lombok.Data;
......
package com.kjj.cases.live;
import com.kjj.utils.NetworkUtils;
/**
* 管理员后台授权
*/
public interface MngAuthorization {
NetworkUtils network = NetworkUtils.getInstance();
default void mngAuth(){
// 创建sso用户 并传到network里
network.agentCookies.put("csrf_token","ff715857c2234f6577cbf1a57600c316");
network.agentCookies.put("sso_ticket","dcdc60f6fe4a0c5a439d15d67101400cb");
}
}
package com.kjj.cases.live; package com.kjj.cases.live.admin;
import com.kjj.utils.NetworkUtils; import com.kjj.utils.NetworkUtils;
import static com.kjj.config.BasicConfig.*; import static com.kjj.config.BasicConfig.*;
......
package com.kjj.cases.live; package com.kjj.cases.live.agent;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import io.restassured.response.Response; import io.restassured.response.Response;
......
package com.kjj.cases.live; package com.kjj.cases.live.agent;
import com.alibaba.fastjson.JSONArray; import com.kjj.cases.live.admin.AdminAuthorization;
import com.alibaba.fastjson.JSONObject;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import io.restassured.response.Response; import io.restassured.response.Response;
...@@ -11,7 +10,6 @@ import org.testng.annotations.Test; ...@@ -11,7 +10,6 @@ import org.testng.annotations.Test;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package com.kjj.cases.live; package com.kjj.cases.live.agent;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.kjj.bean.AgentBean; import com.kjj.bean.agent.AgentBean;
import com.kjj.bean.AgentCard; import com.kjj.bean.agent.AgentCard;
import com.kjj.bean.AgentEndList; import com.kjj.bean.agent.AgentEndList;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
import io.restassured.response.Response; import io.restassured.response.Response;
...@@ -17,7 +18,7 @@ import java.util.List; ...@@ -17,7 +18,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/*代理人端*/ /*代理人端*/
public class Procurator implements AdminAuthorization{ public class Procurator implements AdminAuthorization {
@BeforeClass @BeforeClass
public void setUp() { public void setUp() {
......
package com.kjj.cases.live; package com.kjj.cases.live.anchor;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import io.restassured.response.Response; import io.restassured.response.Response;
...@@ -10,7 +11,7 @@ import org.testng.annotations.Test; ...@@ -10,7 +11,7 @@ import org.testng.annotations.Test;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class CloseLive implements AdminAuthorization{ public class CloseLive implements AdminAuthorization {
@BeforeClass @BeforeClass
......
package com.kjj.cases.live; package com.kjj.cases.live.anchor;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.*; import com.kjj.bean.resources.*;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
......
package com.kjj.cases.live; package com.kjj.cases.live.anchor;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.ThreadSleepUtils; import com.kjj.utils.ThreadSleepUtils;
......
package com.kjj.cases.live; package com.kjj.cases.live.lottery;
import com.kjj.bean.LotteryList; import com.kjj.bean.lottery.LotteryList;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
...@@ -13,7 +14,7 @@ import java.util.HashMap; ...@@ -13,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class DesignatedWinner implements AdminAuthorization{ public class DesignatedWinner implements AdminAuthorization {
public List<LotteryList.List_Lottery> List_Lottery; public List<LotteryList.List_Lottery> List_Lottery;
public List<LotteryList> welfareId; public List<LotteryList> welfareId;
......
package com.kjj.cases.live; package com.kjj.cases.live.lottery;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.kjj.bean.lottery.ConfidList;
import com.kjj.bean.AgentEndList; import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.bean.ConfidList;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils; import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -364,19 +361,8 @@ public class Lottery implements AdminAuthorization { ...@@ -364,19 +361,8 @@ public class Lottery implements AdminAuthorization {
System.out.println(success); System.out.println(success);
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString())); Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
} }
@Test(description = "访客C关注直播间", priority = 26)
public void 访客C关注直播间() {
visitorAuth3();
Map<String, Object> subscribeParam = new HashMap<>();
subscribeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response subscribeRes = network.postResponse(subscribeParam, BasicConfig.USER_SUBSCRIBE);
boolean data = subscribeRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
//访客B绑定访客A后获取访客A的中奖任务信息 //访客B绑定访客A后获取访客A的中奖任务信息
@Test(description = "访客C获取访客A的中奖任务信息", priority = 27) @Test(description = "访客C获取访客A的中奖任务信息", priority = 26)
public void 访客C获取访客A的中奖任务信息() { public void 访客C获取访客A的中奖任务信息() {
visitorAuth3(); visitorAuth3();
Map<String, Object> inviteDrawDetailParam = new HashMap<>(); Map<String, Object> inviteDrawDetailParam = new HashMap<>();
...@@ -387,6 +373,16 @@ public class Lottery implements AdminAuthorization { ...@@ -387,6 +373,16 @@ public class Lottery implements AdminAuthorization {
Assert.assertNotNull(result, network.message(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail, "查询邀请人中奖信息失败", inviteDrawDetailRes.body().asString())); Assert.assertNotNull(result, network.message(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail, "查询邀请人中奖信息失败", inviteDrawDetailRes.body().asString()));
} }
@Test(description = "访客C关注直播间", priority = 27)
public void 访客C关注直播间() {
visitorAuth3();
Map<String, Object> subscribeParam = new HashMap<>();
subscribeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response subscribeRes = network.postResponse(subscribeParam, BasicConfig.USER_SUBSCRIBE);
boolean data = subscribeRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客C抽奖码数量", priority = 28) @Test(description = "访客C抽奖码数量", priority = 28)
public void 访客C抽奖码数量() { public void 访客C抽奖码数量() {
visitorAuth3(); visitorAuth3();
...@@ -400,7 +396,6 @@ public class Lottery implements AdminAuthorization { ...@@ -400,7 +396,6 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "访客A中奖任务是否完成", priority = 29) @Test(description = "访客A中奖任务是否完成", priority = 29)
public void 访客A中奖任务是否完成() { public void 访客A中奖任务是否完成() {
visitorAuth(); visitorAuth();
...@@ -429,8 +424,20 @@ public class Lottery implements AdminAuthorization { ...@@ -429,8 +424,20 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "访客A抽奖码数量", priority = 31)
public void 访客A抽奖码数量() {
visitorAuth();
ThreadSleepUtils.sleep(500);
Map<String, Object> myCountParam = new HashMap<>();
myCountParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response myCountRes = network.getResponse(myCountParam, BasicConfig.USER_myCount);
long data = myCountRes.jsonPath().getLong("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
@Test(description = "访客B幸运任务", priority = 31) @Test(description = "访客B幸运任务", priority = 32)
public void 访客B幸运任务() { public void 访客B幸运任务() {
visitorAuth2(); visitorAuth2();
ThreadSleepUtils.sleep(3000); ThreadSleepUtils.sleep(3000);
...@@ -444,7 +451,7 @@ public class Lottery implements AdminAuthorization { ...@@ -444,7 +451,7 @@ public class Lottery implements AdminAuthorization {
} }
//完成幸运任务逻辑 //完成幸运任务逻辑
@Test(description = "访客B直播中分享直播间", priority = 32) @Test(description = "访客B直播中分享直播间", priority = 33)
public void 访客B直播中分享直播间() { public void 访客B直播中分享直播间() {
visitorAuth2(); visitorAuth2();
Map<String, Object> signParam = new HashMap<>(); Map<String, Object> signParam = new HashMap<>();
...@@ -459,7 +466,7 @@ public class Lottery implements AdminAuthorization { ...@@ -459,7 +466,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请D关系绑定", priority = 33) @Test(description = "幸运任务邀请D关系绑定", priority = 34)
public void 幸运任务邀请D关系绑定() { public void 幸运任务邀请D关系绑定() {
visitorAuth4(); visitorAuth4();
Map<String, Object> bindingParam = new HashMap<>(); Map<String, Object> bindingParam = new HashMap<>();
...@@ -472,7 +479,7 @@ public class Lottery implements AdminAuthorization { ...@@ -472,7 +479,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 34) @Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 35)
public void 幸运任务邀请D绑定结果和绑定凭证() { public void 幸运任务邀请D绑定结果和绑定凭证() {
visitorAuth4(); visitorAuth4();
Map<String, Object> tokenParam = new HashMap<>(); Map<String, Object> tokenParam = new HashMap<>();
...@@ -487,7 +494,7 @@ public class Lottery implements AdminAuthorization { ...@@ -487,7 +494,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请D根据绑定凭证发放抽奖码", priority = 35) @Test(description = "幸运任务邀请D根据绑定凭证发放抽奖码", priority = 36)
public void 幸运任务邀请D根据绑定凭证发放抽奖码() { public void 幸运任务邀请D根据绑定凭证发放抽奖码() {
visitorAuth4(); visitorAuth4();
Map<String, Object> codeParam = new HashMap<>(); Map<String, Object> codeParam = new HashMap<>();
...@@ -499,7 +506,7 @@ public class Lottery implements AdminAuthorization { ...@@ -499,7 +506,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString())); Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString()));
} }
@Test(description = "幸运任务邀请E关系绑定", priority = 36) @Test(description = "幸运任务邀请E关系绑定", priority = 37)
public void 幸运任务邀请E关系绑定() { public void 幸运任务邀请E关系绑定() {
visitorAuth5(); visitorAuth5();
Map<String, Object> bindingParam = new HashMap<>(); Map<String, Object> bindingParam = new HashMap<>();
...@@ -512,7 +519,7 @@ public class Lottery implements AdminAuthorization { ...@@ -512,7 +519,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 37) @Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 38)
public void 幸运任务邀请E绑定结果和绑定凭证() { public void 幸运任务邀请E绑定结果和绑定凭证() {
visitorAuth5(); visitorAuth5();
Map<String, Object> tokenParam = new HashMap<>(); Map<String, Object> tokenParam = new HashMap<>();
...@@ -527,7 +534,7 @@ public class Lottery implements AdminAuthorization { ...@@ -527,7 +534,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请E根据绑定凭证发放抽奖码", priority = 38) @Test(description = "幸运任务邀请E根据绑定凭证发放抽奖码", priority = 39)
public void 幸运任务邀请E根据绑定凭证发放抽奖码() { public void 幸运任务邀请E根据绑定凭证发放抽奖码() {
visitorAuth5(); visitorAuth5();
Map<String, Object> codeParam = new HashMap<>(); Map<String, Object> codeParam = new HashMap<>();
...@@ -539,7 +546,7 @@ public class Lottery implements AdminAuthorization { ...@@ -539,7 +546,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString())); Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString()));
} }
@Test(description = "幸运任务邀请F关系绑定", priority = 39) @Test(description = "幸运任务邀请F关系绑定", priority = 40)
public void 幸运任务邀请F关系绑定() { public void 幸运任务邀请F关系绑定() {
visitorAuth6(); visitorAuth6();
Map<String, Object> bindingParam = new HashMap<>(); Map<String, Object> bindingParam = new HashMap<>();
...@@ -552,7 +559,7 @@ public class Lottery implements AdminAuthorization { ...@@ -552,7 +559,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 40) @Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 41)
public void 幸运任务邀请F绑定结果和绑定凭证() { public void 幸运任务邀请F绑定结果和绑定凭证() {
visitorAuth6(); visitorAuth6();
Map<String, Object> tokenParam = new HashMap<>(); Map<String, Object> tokenParam = new HashMap<>();
...@@ -566,7 +573,7 @@ public class Lottery implements AdminAuthorization { ...@@ -566,7 +573,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertNotNull(token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString())); Assert.assertNotNull(token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
} }
@Test(description = "幸运任务邀请F根据绑定凭证发放抽奖码", priority = 41) @Test(description = "幸运任务邀请F根据绑定凭证发放抽奖码", priority = 42)
public void 幸运任务邀请F根据绑定凭证发放抽奖码() { public void 幸运任务邀请F根据绑定凭证发放抽奖码() {
visitorAuth6(); visitorAuth6();
Map<String, Object> codeParam = new HashMap<>(); Map<String, Object> codeParam = new HashMap<>();
...@@ -578,7 +585,7 @@ public class Lottery implements AdminAuthorization { ...@@ -578,7 +585,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString())); Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString()));
} }
@Test(description = "访客B幸运任务是否完成", priority = 42) @Test(description = "访客B幸运任务是否完成", priority = 43)
public void 访客B幸运任务是否完成() { public void 访客B幸运任务是否完成() {
visitorAuth2(); visitorAuth2();
ThreadSleepUtils.sleep(3000); ThreadSleepUtils.sleep(3000);
...@@ -591,7 +598,7 @@ public class Lottery implements AdminAuthorization { ...@@ -591,7 +598,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "访客B的抽奖券列表", priority = 43) @Test(description = "访客B的抽奖券列表", priority = 44)
public void 访客B的抽奖券列表() { public void 访客B的抽奖券列表() {
visitorAuth2(); visitorAuth2();
ThreadSleepUtils.sleep(10000); ThreadSleepUtils.sleep(10000);
...@@ -605,7 +612,7 @@ public class Lottery implements AdminAuthorization { ...@@ -605,7 +612,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertNotNull(data, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询邀请人抽奖券列表失败", myLotteryCodeRes.body().asString())); Assert.assertNotNull(data, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询邀请人抽奖券列表失败", myLotteryCodeRes.body().asString()));
} }
@Test(description = "访客B的抽奖码数量", priority = 44) @Test(description = "访客B的抽奖码数量", priority = 45)
public void 访客B抽奖码数量() { public void 访客B抽奖码数量() {
visitorAuth2(); visitorAuth2();
ThreadSleepUtils.sleep(3000); ThreadSleepUtils.sleep(3000);
...@@ -618,7 +625,7 @@ public class Lottery implements AdminAuthorization { ...@@ -618,7 +625,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "开始第二轮抽奖", priority = 45) @Test(description = "开始第二轮抽奖", priority = 46)
public void 开始第二轮抽奖() { public void 开始第二轮抽奖() {
adminAuth(); adminAuth();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
...@@ -631,7 +638,7 @@ public class Lottery implements AdminAuthorization { ...@@ -631,7 +638,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第二轮抽奖失败", startRes.body().asString())); Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第二轮抽奖失败", startRes.body().asString()));
} }
@Test(description = "查询第二轮正在抽奖的福利", priority = 46) @Test(description = "查询第二轮正在抽奖的福利", priority = 47)
public void 查询第二轮正在抽奖的福利() { public void 查询第二轮正在抽奖的福利() {
visitorAuth3(); visitorAuth3();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
...@@ -645,7 +652,7 @@ public class Lottery implements AdminAuthorization { ...@@ -645,7 +652,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "查询第二轮是否可以结束抽奖状态", priority = 47) @Test(description = "查询第二轮是否可以结束抽奖状态", priority = 48)
public void 查询第二轮是否可以结束抽奖状态() { public void 查询第二轮是否可以结束抽奖状态() {
adminAuth(); adminAuth();
ThreadSleepUtils.sleep(3000); ThreadSleepUtils.sleep(3000);
...@@ -658,7 +665,7 @@ public class Lottery implements AdminAuthorization { ...@@ -658,7 +665,7 @@ public class Lottery implements AdminAuthorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString())); Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
} }
@Test(description = "结束第二轮抽奖", priority = 48) @Test(description = "结束第二轮抽奖", priority = 49)
public void 结束第二轮抽奖() { public void 结束第二轮抽奖() {
adminAuth(); adminAuth();
Map<String, Object> endParam = new HashMap<>(); Map<String, Object> endParam = new HashMap<>();
...@@ -669,7 +676,7 @@ public class Lottery implements AdminAuthorization { ...@@ -669,7 +676,7 @@ public class Lottery implements AdminAuthorization {
System.out.println(data); System.out.println(data);
Assert.assertTrue(data, network.message(endParam, BasicConfig.ANCHOR_end, "结束第二轮抽奖失败", endRes.body().asString())); Assert.assertTrue(data, network.message(endParam, BasicConfig.ANCHOR_end, "结束第二轮抽奖失败", endRes.body().asString()));
} }
@Test(description = "查看第二轮抽奖榜单", priority = 49) @Test(description = "查看第二轮抽奖榜单", priority = 50)
public void 查看第二轮抽奖榜单() { public void 查看第二轮抽奖榜单() {
visitorAuth(); visitorAuth();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
...@@ -686,7 +693,7 @@ public class Lottery implements AdminAuthorization { ...@@ -686,7 +693,7 @@ public class Lottery implements AdminAuthorization {
} }
@Test(description = "获取第二轮喜报", priority = 50) @Test(description = "获取第二轮喜报", priority = 51)
public void 获取第二轮喜报() { public void 获取第二轮喜报() {
visitorAuth(); visitorAuth();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
......
package com.kjj.cases.live; package com.kjj.cases.live.manager;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.kjj.bean.VoteBean; import com.kjj.bean.manager.VoteBean;
import com.kjj.bean.VoteListBean; import com.kjj.bean.manager.VoteListBean;
import com.kjj.bean.WelfareBean; import com.kjj.bean.manager.WelfareBean;
import com.kjj.bean.WelfareListBean; import com.kjj.bean.manager.WelfareListBean;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils; import com.kjj.utils.BaseUtils;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
...@@ -14,16 +15,12 @@ import org.testng.annotations.Test; ...@@ -14,16 +15,12 @@ import org.testng.annotations.Test;
import java.util.*; import java.util.*;
public class LiveMaterial implements AdminAuthorization { public class LiveMaterial implements AdminAuthorization {
@BeforeClass @BeforeClass
public void setUp() { public void setUp() {
// adminAuth();
BaseUtils.ssoLogin(); BaseUtils.ssoLogin();
} }
@Test(description = "添加奖品", priority = 1) @Test(description = "添加奖品", priority = 1)
public void 添加奖品() { public void 添加奖品() {
......
package com.kjj.cases.live; package com.kjj.cases.live.manager;
import com.kjj.bean.AnswerBean; import com.kjj.bean.manager.AnswerBean;
import com.kjj.bean.AnswerListBean; import com.kjj.bean.manager.AnswerListBean;
import com.kjj.bean.RewardPkBean; import com.kjj.bean.manager.RewardPkBean;
import com.kjj.bean.answer.*; import com.kjj.bean.answer.*;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils; import com.kjj.utils.BaseUtils;
......
package com.kjj.cases.live; package com.kjj.cases.live.red;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.kjj.bean.*; import com.kjj.bean.red.*;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
...@@ -14,7 +15,7 @@ import java.util.HashMap; ...@@ -14,7 +15,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class LiveVistorRed implements AdminAuthorization{ public class LiveVistorRed implements AdminAuthorization {
public String confId_Red; public String confId_Red;
public String visitor_red; public String visitor_red;
......
package com.kjj.cases.live; package com.kjj.cases.live.red;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.kjj.bean.answer.*; import com.kjj.bean.answer.*;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
...@@ -16,7 +17,7 @@ import java.util.HashMap; ...@@ -16,7 +17,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class QuestionAwards implements AdminAuthorization{ public class QuestionAwards implements AdminAuthorization {
public String confId_ques; public String confId_ques;
public String confId_reward; public String confId_reward;
......
package com.kjj.cases.live; package com.kjj.cases.live.user;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import io.restassured.response.Response; import io.restassured.response.Response;
...@@ -10,7 +11,7 @@ import java.util.HashMap; ...@@ -10,7 +11,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class User implements AdminAuthorization{ public class User implements AdminAuthorization {
@BeforeClass @BeforeClass
public void setUp() { visitorAuth(); } public void setUp() { visitorAuth(); }
......
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