Commit ac4e862f authored by 别湘灵's avatar 别湘灵

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/test/java/com/kjj/config/BasicConfig.java
#	src/test/liveTestNG.xml
parents 3883c650 8d36761e
package com.kjj.cases.live;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.Map;
public class DesignatedWinner implements AdminAuthorization{
@BeforeClass
public void setUp() {
agentAuth();
}
@Test(description = "查询指定中奖配置", priority = 1)
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()));
}
// @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()));
//
// }
}
......@@ -34,16 +34,15 @@ public class User implements AdminAuthorization{
}
//访客与代理人建立绑定关系
@Test(description = "邀请关系绑定", priority = 2)
public void 邀请关系绑定() {
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareType", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_BINDING);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_BINDING, "绑定失败", bindingRes.body().asString()));
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
......@@ -93,10 +92,10 @@ public class User implements AdminAuthorization{
public void 保存海报获得抽奖码() {
Map<String, Object> savePosterParam = new HashMap<>();
savePosterParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response savePosterRes = network.postResponse(savePosterParam, BasicConfig.USER_SAVEPOSTER);
Response savePosterRes = network.postResponse(savePosterParam, BasicConfig.USER_savePoster);
boolean data = savePosterRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(savePosterParam, BasicConfig.USER_SAVEPOSTER, "海报保存失败", savePosterRes.body().asString()));
Assert.assertTrue(data, network.message(savePosterParam, BasicConfig.USER_savePoster, "海报保存失败", savePosterRes.body().asString()));
}
......@@ -104,10 +103,10 @@ public class User implements AdminAuthorization{
public void 我的抽奖码数量() {
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);
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()));
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
......
......@@ -2,10 +2,8 @@ package com.kjj.config;
public class BasicConfig {
public static int apiCount; //接口数量统计
// 是否开启钉钉机器人推送
public static final boolean isPushReport =false; //true
public static final boolean isPushReport =true; //true
// 代理人微信昵称
public static final String WECHAT_NAME = "嘿保险"; //true
......@@ -55,10 +53,20 @@ public class BasicConfig {
public static final String MOBILE_HOST = "https://live.duibatest.com.cn";
// *************** 主播端 ***************
public static final String ANCHOR_OPEN = ANCHOR_HOST + "/conf/live/open";
public static final String ANCHOR_CLOSE = ANCHOR_HOST + "/conf/live/close";
public static final String ANCHOR_ADDQUESTION = ANCHOR_HOST + "/kjy/live/assist/question/addQuestion";
public static final String ANCHOR_OPEN = MOBILE_HOST + "/conf/live/open";
public static final String ANCHOR_CLOSE = MOBILE_HOST + "/conf/live/close";
public static final String ANCHOR_ADDQUESTION = MOBILE_HOST + "/kjy/live/assist/question/addQuestion";
public static final String ANCHOR_LIVECARD = MOBILE_HOST + "/kjy/mp/liveCard/getLiveEndSellerCard";
// *************** 访客端 ***************
public static final String USER_SUBSCRIBE = MOBILE_HOST + "/kjy/live/user/appointment/subscribe";
public static final String USER_FIND = MOBILE_HOST + "/kjy/live/user/subscribe/find";
public static final String USER_SYCAPPOINTMENT = MOBILE_HOST + "/kjy/live/user/sycAppointment";
public static final String USER_START = MOBILE_HOST + "/kjy/live/assist/lottery/start";
public static final String USER_DRAW = MOBILE_HOST + "/kjy/live/user/lottery/draw";
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 MANAGER_SAVEANDUPDATE = MANAGER_HOST + "/kjy/manager/live/pre/conf/saveAndUpdate";
......@@ -94,6 +102,7 @@ public class BasicConfig {
public static final String MANAGER_ADD1 = MANAGER_HOST + "/kjy/manager/lottery/conf/add";
public static final String MANAGER_SAVEORUPDATE7 = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/saveOrUpdate";
public static final String MANAGER_getLiveAwardList = MANAGER_HOST + "/kjy/manager/specifyAward/pre/conf/getLiveAwardList";
// *************** 代理人 ***************
......@@ -134,9 +143,10 @@ public class BasicConfig {
public static final String MOBILE_ClueNum = MOBILE_HOST + "/kjy/live/agent/clue/clueNum";
public static final String MOBILE_ClueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
public static final String MOBILE_AGENTSPECIFYAWARDSUBMIN = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardSubmit";
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 MANAGER_SAVEORUPDATE6 = MANAGER_HOST+ "/kjy/manager/conf/base/welfare/saveOrUpdate";
......
......@@ -26,11 +26,32 @@
</classes>
</test>
<test preserve-order="true" name="访客券码领取">
<classes>
<class name="com.kjj.cases.live.User"/>
</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.LiveVisitors"/>
</classes>
</test>
<test preserve-order="true" name="获取代理人排行榜及客户信息">
<classes>
<class name="com.kjj.cases.live.LiveAgent"/>
</classes>
</test>
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.OpenLive"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
......@@ -41,7 +62,5 @@
</suite>
This diff is collapsed.
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