Commit 94aa84b0 authored by 张艳玲's avatar 张艳玲

update

parent 227640f7
......@@ -433,142 +433,6 @@ public class Agent implements AdminAuthorization {
}
// 获取代理人各线索等级的线索数;
@Test(description="获取线索等级的线索数",priority = 27)
public void 获取线索等级的线索数() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueNum, "获取线索数失败", response.body().asString()));
}
//获取代理人所有线索数量
public String allNum;
@Test(description="获取所有线索数量",priority = 28)
public void 获取所有线索数量() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
allNum = response.jsonPath().getString("data.allNum");
System.out.println(allNum);
Assert.assertNotNull(allNum,network.message(params,BasicConfig.MOBILE_ClueNum,"获取所有线索数量失败",response.body().asString()));
}
//获取观看超过20分钟的人数
public String moreThan20MinNum;
@Test(description="获取观看超过20分钟的人数",priority = 29)
public void 获取观看超过20分钟的人数() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
moreThan20MinNum = response.jsonPath().getString("data.moreThan20MinNum");
System.out.println(moreThan20MinNum);
Assert.assertNotNull(moreThan20MinNum,network.message(MOBILE_ClueNum,"获取观看超过20分钟的人数失败",response.body().asString()));
}
// 获取直播中直播结束线索列表;
@Test(description="获取线索列表",priority = 30)
public void 获取线索列表() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",2);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
List<String> list = response.jsonPath().getList("data.list.name");
System.out.println("-------"+list.size());
for (String name:list){
System.out.println("-------"+list.size());
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取线索列表失败", response.body().asString()));
Assert.assertNotNull(name,network.message(MOBILE_ClueList,"线索列表微信昵称获取失败",response.body().asString()));
}
}
//直播中我的客户页面
// 获取直播中我的客户页面全部tab;
@Test(description="获取直播中我的客户页面全部tab数据",priority = 31)
public void 获取直播中我的客户页面全部tab数据(){
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取全部tab下数据失败", response.body().asString()));
}
// 获取直播中我的客户页面观看tab;
@Test(description="获取直播中我的客户页面观看tab数据",priority = 32)
public void 获取直播中我的客户页面观看tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",25);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面观看tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面未观看tab;
@Test(description="获取直播中我的客户页面未观看tab数据",priority = 33)
public void 获取直播中我的客户页面未观看tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",24);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面未观看tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面中奖tab;
@Test(description="获取直播中我的客户页面中奖tab数据",priority = 34)
public void 获取直播中我的客户页面中奖tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",17);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面中奖tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面报名tab;
@Test(description="获取直播中我的客户页面报名tab数据",priority = 35)
public void 获取直播中我的客户页面报名tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面报名tab数据失败", response.body().asString()));
}
}
......
package com.kjj.cases.live.agent;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.config.BasicConfig.MOBILE_ClueList;
import static com.kjj.config.BasicConfig.MOBILE_ClueNum;
public class LiveAgent implements AdminAuthorization {
/**
* 直播中查看线索
*/
// 获取代理人各线索等级的线索数;
@Test(description="获取线索等级的线索数",priority = 1)
public void 获取线索等级的线索数() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_ClueNum);
Object data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_ClueNum, "获取线索数失败", response.body().asString()));
}
//获取代理人所有线索数量
public String allNum;
@Test(description="获取所有线索数量",priority = 2)
public void 获取所有线索数量() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
allNum = response.jsonPath().getString("data.allNum");
System.out.println(allNum);
Assert.assertNotNull(allNum,network.message(params,BasicConfig.MOBILE_ClueNum,"获取所有线索数量失败",response.body().asString()));
}
//获取观看超过20分钟的人数
public String moreThan20MinNum;
@Test(description="获取观看超过20分钟的人数",priority = 3)
public void 获取观看超过20分钟的人数() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
moreThan20MinNum = response.jsonPath().getString("data.moreThan20MinNum");
System.out.println(moreThan20MinNum);
Assert.assertNotNull(moreThan20MinNum,network.message(MOBILE_ClueNum,"获取观看超过20分钟的人数失败",response.body().asString()));
}
// 获取直播中直播结束线索列表;
@Test(description="获取线索列表",priority = 4)
public void 获取线索列表() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",2);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
List<String> list = response.jsonPath().getList("data.list.name");
System.out.println("-------"+list.size());
for (String name:list){
System.out.println("-------"+list.size());
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取线索列表失败", response.body().asString()));
Assert.assertNotNull(name,network.message(MOBILE_ClueList,"线索列表微信昵称获取失败",response.body().asString()));
}
}
// 获取直播中我的客户页面全部tab;
@Test(description="获取直播中我的客户页面全部tab数据",priority = 5)
public void 获取直播中我的客户页面全部tab数据(){
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取全部tab下数据失败", response.body().asString()));
}
// 获取直播中我的客户页面观看tab;
@Test(description="获取直播中我的客户页面观看tab数据",priority = 6)
public void 获取直播中我的客户页面观看tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",25);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面观看tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面未观看tab;
@Test(description="获取直播中我的客户页面未观看tab数据",priority = 7)
public void 获取直播中我的客户页面未观看tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",24);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面未观看tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面中奖tab;
@Test(description="获取直播中我的客户页面中奖tab数据",priority = 8)
public void 获取直播中我的客户页面中奖tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",17);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面中奖tab数据失败", response.body().asString()));
}
// 获取直播中我的客户页面报名tab;
@Test(description="获取直播中我的客户页面报名tab数据",priority = 9)
public void 获取直播中我的客户页面报名tab数据() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播中我的客户页面报名tab数据失败", response.body().asString()));
}
}
......@@ -61,7 +61,7 @@ public class BasicConfig {
//***********************************************************************
// 基础线代理人 TKU
// 基础线代理人 TKU,ID:
public static String AGENT_TKU = "T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm";
// 基础线访客 TKU
public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfHcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE";
......@@ -192,7 +192,7 @@ public class BasicConfig {
public static final String MOBILE_agentSpecifyAwardConf = MOBILE_HOST + "/kjy/live/agent/agentSpecifyAwardConf";
// *************** 直播中抽奖 ***************
public static final String USER_getLiveAwardList = MOBILE_HOST + "/kjy/live/conf/specifyAward/getLiveAwardList";
public static final String USER_getLiveAwardList = MOBILE_HOST + "/conf/pre/specifyAward/getLiveAwardList";
public static final String USER_listLiveLottery = MOBILE_HOST + "/kjy/live/lottery/listLiveLottery";
public static final String USER_pageList = MOBILE_HOST + "/clue/lottery/pageList";
public static final String USER_result = MOBILE_HOST + "/clue/lottery/result";
......
......@@ -2,59 +2,58 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="直播" verbose="1" thread-count="3">
<test preserve-order="true" name="直播素材">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>
</classes>
</test>
<test preserve-order="true" name="团队管理">
<classes>
<class name="com.kjj.cases.live.liveConfig.Team"/>
</classes>
</test>
<test preserve-order="true" name="精彩视频">
<classes>
<class name="com.kjj.cases.live.liveConfig.Video"/>
</classes>
</test>
<test preserve-order="true" name="创建直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes>
</test>
<test preserve-order="true" name="直播素材">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>
</classes>
</test>
<test preserve-order="true" name="团队管理">
<classes>
<class name="com.kjj.cases.live.liveConfig.Team"/>
</classes>
</test>
<test preserve-order="true" name="代理人首页">
<classes>
<class name="com.kjj.cases.live.agent.Agent"/>
</classes>
</test>
<test preserve-order="true" name="精彩视频">
<classes>
<class name="com.kjj.cases.live.liveConfig.Video"/>
</classes>
</test>
<test preserve-order="true" name="小程序分享">
<classes>
<class name="com.kjj.cases.live.liveConfig.Share"/>
</classes>
</test>
<test preserve-order="true" name="创建直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes>
</test>
<test preserve-order="true" name="获取抽奖码校验">
<classes>
<class name="com.kjj.cases.live.lotteryCode.LotteryCode"/>
</classes>
</test>
<test preserve-order="true" name="代理人首页">
<classes>
<class name="com.kjj.cases.live.agent.Agent"/>
</classes>
</test>
<test preserve-order="true" name="翻牌红包">
<classes>
<class name="com.kjj.cases.live.flipCard.FlipCard"/>
</classes>
</test>
<test preserve-order="true" name="小程序分享">
<classes>
<class name="com.kjj.cases.live.liveConfig.Share"/>
</classes>
</test>
<test preserve-order="true" name="获取抽奖码校验">
<classes>
<class name="com.kjj.cases.live.lotteryCode.LotteryCode"/>
</classes>
</test>
<test preserve-order="true" name="中奖规则配置">
<classes>
<class name="com.kjj.cases.live.liveConfig.WinningRules"/>
</classes>
</test>
<test preserve-order="true" name="翻牌红包">
<classes>
<class name="com.kjj.cases.live.flipCard.FlipCard"/>
</classes>
</test>
<test preserve-order="true" name="中奖规则配置">
<classes>
<class name="com.kjj.cases.live.liveConfig.WinningRules"/>
</classes>
</test>
<test preserve-order="true" name="指定中奖">
......@@ -71,11 +70,11 @@
</test>
<test preserve-order="true" name="助播-开启直播">
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.anchor.OpenLive"/>
</classes>
</test>
</test>
<test preserve-order="true" name="访客签到">
<classes>
......@@ -112,11 +111,6 @@
<class name="com.kjj.cases.live.anchor.LiveVisitors"/>
</classes>
</test>
<!-- <test preserve-order="true" name="获取代理人排行榜及客户信息">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.LiveAgent"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="红包领取">
<classes>
......@@ -148,6 +142,12 @@
</classes>
</test>
<test preserve-order="true" name="直播中获取线索统计">
<classes>
<class name="com.kjj.cases.live.agent.LiveAgent"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
<class name="com.kjj.cases.live.anchor.CloseLive"/>
......
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