Commit 78e8fdcc authored by 龚小红's avatar 龚小红

Merge branch 'master' into 2021072002-gxh02

# Conflicts:
#	src/test/wechatTestNG.xml
parents 5ae0afcc 390d6a1a
......@@ -14,5 +14,7 @@ public class LiveVisitor {
private String outLinkAppId;
private String resourceButtonTitle;
private String resourceSubTitle;
private String testType;
private String testType;
private boolean hasPasterOn;
private boolean hasConfPaster;
}
......@@ -248,5 +248,14 @@ public interface Authorization {
System.out.println("用户AUTH_KEY:" + visitorAuth24);
}
/**
* 访客S(亦心)ID:96 实名
*/
default void visitorAuth25() {
network.agentCookies.put("authKey", visitorAuth25);
System.out.println("用户AUTH_KEY:" + visitorAuth25);
}
}
package com.kjj.cases.assistant;
import static com.kjj.config.BasicConfig.*;
import com.kjj.cases.admin.Authorization;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.ThreadSleepUtils;
import org.testng.Assert;
import org.testng.annotations.*;
import io.restassured.response.Response;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DailyPaper implements Authorization {
public String contentId; //获取文章id
public String currentId; //获取发圈素材id
public int firstTagId;
public Object pId; //获取早晚安打开图片ID
public Object pUrl; //获取早晚安打开图片url
public String aUrl; //获取管理后台打卡图片
public String deleteId; //获取管理后台要删除的早安打卡图片的ID
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
// 创建用户 并传到network里
AGENT_TKU = BaseUtils.createTku();
network.agentCookies.put("tku",AGENT_TKU);
//System.out.println("代理人tku:"+AGENT_TKU);
// 获取访客tku
VISITOR_TKU = BaseUtils.getTku(VISITOR_USERID);
//System.out.println("访客tku:"+VISITOR_TKU);
}
@Test (description = "今日早报_获取今日早报列表",priority = 1)
public void 代理人_今日早报_获取今日早报列表(){
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String dt = simpleDateFormat.format(new Date());
Map<String,Object> params = new HashMap<>();
params.put("dateDay","20201021");
Response response = network.getResponse(params,Daily_dailyList);
Object data = response.jsonPath().getJsonObject("data");
contentId = response.jsonPath().getJsonObject("data[0].dailyId");
System.out.println(contentId);
Assert.assertNotNull(data, network.message(params,Daily_dailyList,"获取今日早报列表失败",response.body().asString()));
}
@Test(description = "今日早报_今日早报转发",priority = 2)
public void 今日早报_今日早报转发(){
//获取今日早报scid
Map<String,Object> params = new HashMap<>();
params.put("contentId",contentId);
Response response = network.getResponse(params,GETSCID);
String data = response.jsonPath().getString("data");
System.out.println(data);
Assert.assertNotNull(data,network.message(params,GETSCID,"获取文章的scid失败",response.body().asString()));
//获取visitId
Map<String,Object> infoParams = new HashMap<>();
infoParams.put("scid",data);
infoParams.put("visitPath",0);
Response infoResponse = network.getResponse(infoParams,CONTENT_READ);
String visitId = infoResponse.jsonPath().getString("data.visitId");
System.out.println(visitId);
Assert.assertNotNull(visitId, network.message(params,CONTENT_READ,"访客记录查看素材失败",response.body().asString()));
//今日早报转发
Map<String,Object> infoParams2 = new HashMap<>();
infoParams2.put("scId",data);
infoParams2.put("visitId",visitId);
infoParams2.put("forwardType",1);
Response infoResponse2 = network.getResponse(infoParams2,FORWARD);
boolean reData = infoResponse2.jsonPath().getBoolean("data");
boolean success = infoResponse2.jsonPath().getBoolean("success");
Assert.assertTrue(reData,network.message(infoParams2,FORWARD,"今日早报转发失败",infoResponse2.body().asString()));
Assert.assertTrue(success,network.message(infoParams2,FORWARD,"今日早报转发失败",infoResponse2.body().asString()));
}
@Test(description = "今日早报_今日早报首页配置",priority = 3)
public void 今日早报_今日早报首页配置(){
Map<String,Object> params = new HashMap<>();
params.put("type",2);
Response response = network.getResponse(params,Daily_getHomeConf);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params, Daily_getHomeConf,"获取今日早报配置失败",response.body().asString()));
}
@Test(description = "今日早报_发圈素材列表",priority = 4)
public void 今日早报_发圈素材列表(){
// 获取首页发圈素材列表
Response response = network.getResponse(HOME_GETHOMETIMELINECONTENT);
currentId = response.jsonPath().getString("data.materialVos[0].contentId");
Assert.assertNotNull(currentId,network.message(HOME_GETHOMETIMELINECONTENT,"获取首页发圈列表有误",response.body().asString()));
}
@Test(description="今日早报_发圈素材_是否首次进入",priority = 5)
public void 今日早报_发圈素材_是否首次进入(){
Response response = network.getResponse(FRIENDS_ISUSERFIRSTENTERANDCOLLECT);
String desc = response.jsonPath().getString("desc");
Assert.assertEquals(desc,"OK",network.message(FRIENDS_ISUSERFIRSTENTERANDCOLLECT,"是否首次进入和首次收藏发圈素材列表-接口有误",response.body().asString()));
}
@Test(description="今日早报_发圈素材标签列表",priority = 6)
public void 今日早报_发圈素材标签列表(){
Response response = network.getResponse(FRIENDS_GETMATERIALTAGS);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
int id = response.jsonPath().getInt("data.find {it.name == '保险'}.id"); //标签tab
firstTagId = response.jsonPath().getInt("data[0].id");//第一个标签的ID
Assert.assertTrue(hasList,network.message(FRIENDS_GETMATERIALTAGS,"获取tab数量有误",response.body().asString()));
Assert.assertEquals(id,595,network.message(FRIENDS_GETMATERIALTAGS,"获取tab中不包含保险",response.body().asString()));
}
@Test(description = "今日早报_发圈素材详情",priority = 7)
public void 今日早报_发圈素材详情(){
Map<String, Object> params = new HashMap<String, Object>();
params.put("currentId",currentId);
Response response = network.getResponse(params,FRIENDS_GETCURRENTINFO);
String topContentId = response.jsonPath().getString("data.contentId");
Assert.assertEquals(topContentId,currentId,network.message(params,FRIENDS_GETCURRENTINFO,"从首页进入发圈的头部素材有误",response.body().asString()));
}
@Test(description = "今日早报_成功案例列表",priority = 8)
public void 今日早报_成功案例列表(){
Response response = network.getResponse(Daily_getHomeCaseList);
List<HashMap> hashMapList = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(hashMapList, network.message(Daily_getHomeCaseList,"获取成功案例列表失败",response.body().asString()));
}
@Test(description = "今日早报_获取案例列表",priority = 9)
public void 今日早报_获取案例列表(){
Map<String,Object> params = new HashMap<>();
params.put("pageSize",20);
params.put("pageIndex",1);
Response response = network.getResponse(params,Daily_getCaseList);
String contentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertNotNull(contentId, network.message(params,Daily_getCaseList,"获取案例列表失败",response.body().asString()));
}
@Test(description = "获取客集集专区产品列表",priority = 10)
public void 今日早报_获取客集集专区产品列表(){
Response response = network.getResponse(Daily_getHomeCompanyArea);
Object contentList = response.jsonPath().getJsonObject("data.contentList");
System.out.println(contentList);
Assert.assertNotNull(contentList, network.message(Daily_getHomeCaseList,"获取客集集专区产品列表失败",response.body().asString()));
}
@Test(description = "今日早报_客集集专区_获取公司专区标签",priority = 11)
public void 今日早报_客集集专区_获取公司专区标签(){
Response response = network.getResponse(Daily_getTagList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Daily_getTagList,"获取公司专区标签列表失败",response.body().asString()));
}
@Test(description = "今日早报_客集集专区_获取资料列表",priority = 12)
public void 今日早报_客集集专区_获取资料列表(){
Map<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
params.put("pageSize",10);
Response response = network.getResponse(params,Daily_list);
boolean success= response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params,Daily_list,"获取资料列表失败",response.body().asString() ));
}
@Test (description = "获取晚安心语列表",priority = 13)
public void 获取晚安心语列表(){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
String dt = simpleDateFormat.format(new Date());
Map<String,Object> params = new HashMap<>();
params.put("dateDay",dt);
Response response = network.getResponse(params,Daily_eveningList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params,Daily_eveningList,"获取晚安心语列表失败",response.body().asString()));
}
@Test(description = "管理后台_早安打卡图片编辑",priority = 14)
public void 管理后台_早安打卡列表查询(){
//获取早安打卡(configType= 1)图库中的的首个图片id
Map<String,Object> params = new HashMap<>();
params.put("configType",1);
params.put("pageIndex",1);
params.put("pageSize",10);
Response listRes = network.getResponse(params,MANAGER_dailyPostersList);
boolean success = listRes.jsonPath().getBoolean("success");
Object id = listRes.jsonPath().getJsonObject("data.list[0].id");
System.out.println(id);
Assert.assertTrue(success, network.message(params,MANAGER_dailyPostersList,"获取管理后台打卡列表失败",listRes.body().asString()));
//获取早安打卡图片的详细信息
Map<String,Object> paramsFind = new HashMap<>();
paramsFind.put("id",id);
Response findRes = network.getResponse(paramsFind,MANAGER_findId);
aUrl = findRes.jsonPath().getString("data.imageUrl");
System.out.println(aUrl);
boolean successDetail = findRes.jsonPath().getBoolean("success");
Assert.assertTrue(successDetail,network.message(paramsFind,MANAGER_findId,"获取打卡详情失败",findRes.body().asString()));
}
@Test(description = "管理后台_早安打卡新增",priority = 15)
public void 管理后台_早安打卡新增(){
Map<String,Object> params = new HashMap<>();
params.put("configType",1);
params.put("imageUrlConfig",aUrl);
params.put("imgContent","测试使用");
long pt = System.currentTimeMillis();
params.put("pushTime",pt);
Response response = network.postResponse(params,MANAGER_addOrUpdate);
boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,MANAGER_addOrUpdate,"新增早安打卡图片失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,MANAGER_addOrUpdate,"新增早安打卡图片失败",response.body().asString()));
//获取新增的早安打卡的配置ID
Map<String,Object> infoParams = new HashMap<>();
infoParams.put("configType",1);
infoParams.put("pageIndex",1);
infoParams.put("pageSize",10);
Response listRes = network.getResponse(infoParams,MANAGER_dailyPostersList);
deleteId = listRes.jsonPath().getString("data.list[0].id");
boolean successList = listRes.jsonPath().getBoolean("success");
Assert.assertTrue(successList, network.message(infoParams,MANAGER_dailyPostersList,"获取管理后台打卡列表失败",listRes.body().asString()));
}
@Test(description = "获取早晚安图库列表",priority = 16)
public void 获取早晚安图库列表(){
Map<String ,Object> params = new HashMap<>();
params.put("galleryType",1);
params.put("recommend",1);
params.put("pageIndex",1);
params.put("pageSize",10);
Response response = network.getResponse(params,HOME_selectPage);
Object list = response.jsonPath().getJsonObject("data.list");
List<HashMap> hashMapList = response.jsonPath().getJsonObject("data.list");
pId = hashMapList.get(0).get("id");
pUrl = hashMapList.get(0).get("imageUrlConfig");
System.out.println(pId);
System.out.println(list);
Assert.assertNotNull(list, network.message(params,HOME_selectPage,"获取早晚安图库列表失败",response.body().asString()));
}
@Test(description = "早安打卡",priority = 17)
public void 早安打卡(){
Map<String,Object> params = new HashMap<>();
params.put("id",pId);
System.out.println(pId);
params.put("imageUrlConfig",pUrl);
params.put("clock","false");
Response response = network.getResponse(params,HOME_getInfo);
boolean isClock = response.jsonPath().getBoolean("data.isClock");
Assert.assertTrue(isClock, network.message(params,HOME_getInfo,"打卡失败",response.body().asString()));
}
@Test(description = "管理后台_删除早安打卡配置",priority = 18)
public void 管理后台_删除早安打卡配置(){
Map<String,Object> params = new HashMap<>();
params.put("id",deleteId);
Response response = network.postResponse(params,MANAGER_dailyPostersDelete);
boolean success = response.jsonPath().getBoolean("success");
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(success,network.message(params,MANAGER_dailyPostersDelete,"删除早安打卡配置失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,MANAGER_dailyPostersDelete,"删除早安打卡配置失败",response.body().asString()));
}
}
......@@ -12,6 +12,7 @@ import org.testng.annotations.*;
import java.util.HashMap;
import java.util.Map;
public class RecommendMaterial implements Authorization {
public String sid; //加密的销售id
public String grasscontentId; //文章内容id
......@@ -21,6 +22,12 @@ public class RecommendMaterial implements Authorization {
public String inId; //获取赠险详情的id,用于删除赠险
public String userId; // 代理人用户ID
public String visitId; // 访问记录ID
public Object bId; //获取资料包id
public String bScid; //获取资料包的scid
public String bContentid; //获取资料包中的文章id
public String bSid; //获取用户的id
public String aScid; //获取资料包文章内容的scid
public String qId; //获取问答列表中的问题id
@BeforeClass
public void setUp() {
......@@ -45,10 +52,11 @@ public class RecommendMaterial implements Authorization {
@Test(description = "代理人_今日早报_种草素材内容页", priority = 2)
public void 代理人_今日早报_种草素材内容页() {
//根据种草素材的ContentId获取Scid
Map<String, Object> params = new HashMap<String, Object>();
Map<String, Object> params = new HashMap<>();
params.put("contentId", grasscontentId);
Response response = network.getResponse(params, GETSCID);
scid = response.jsonPath().getString("data");
System.out.println(scid);
Assert.assertNotNull(scid, network.message(params, GETSCID, "获取文章的scid失败", response.body().asString()));
Map<String, Object> infoParams = new HashMap<String, Object>();
......@@ -58,8 +66,18 @@ public class RecommendMaterial implements Authorization {
Assert.assertEquals(grasscontentId, id, network.message(infoParams, ARTICLE_H5INFO, "获取种草文章内容失败", response.body().asString()));
}
//种草素材中资料包领取
@Test(description = "代理人_今日早报_种草资料包领取", priority = 3)
public void 代理人_今日早报_种草资料包领取() {
Map<String, Object> params = new HashMap<>();
params.put("scid", scid);
Response response = network.getResponse(params, GRASS_direct);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertNotNull(data, network.message(params, GRASS_direct, "领取文章中的资料包失败", response.body().asString()));
}
//种草文章转发
@Test(description = "代理人_今日早报_种草素材转发", priority = 3)
@Test(description = "代理人_今日早报_种草素材转发", priority = 4)
public void 代理人_今日早报_种草素材转发() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scId", scid);
......@@ -71,15 +89,16 @@ public class RecommendMaterial implements Authorization {
//种草素材标签列表
@Test(description = "代理人_今日早报_种草素材标签列表", priority = 4)
@Test(description = "代理人_今日早报_种草素材标签列表", priority = 5)
public void 代理人_今日早报_种草素材标签列表() {
Response response = network.getResponse(GRASS_getTagList);
String tagId = response.jsonPath().getString("data[0].id");
System.out.println(tagId);
Assert.assertNotNull(tagId, network.message(GRASS_getTagList, "获取种草素材标签列表失败", response.body().asString()));
}
//猜你想搜列表
@Test(description = "代理人_种草素材_猜你想搜列表", priority = 5)
@Test(description = "代理人_种草素材_猜你想搜列表", priority = 6)
public void 代理人_种草素材_猜你想搜列表() {
Response response = network.getResponse(GRASS_guessYourMind);
keyWord = response.jsonPath().getString("data[1].keyWord");
......@@ -87,7 +106,7 @@ public class RecommendMaterial implements Authorization {
}
//搜索获取种草素材列表
@Test(description = "代理人_种草素材_搜索获取动画种草素材列表", priority = 6)
@Test(description = "代理人_种草素材_搜索获取动画种草素材列表", priority = 7)
public void 代理人_种草素材_搜索获取动画种草素材列表() {
String type = "game_animation";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -100,7 +119,7 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(gameContentId, network.message(params, GRASS_searchContent, "获取动画种草素材列表失败", response.body().asString()));
}
@Test(description = "代理人_种草素材_搜索获取文章种草素材列表", priority = 7)
@Test(description = "代理人_种草素材_搜索获取文章种草素材列表", priority = 8)
public void 代理人_种草素材_搜索获取文章种草素材列表() {
String type = "article";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -112,7 +131,7 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(gameContentId, network.message(params, GRASS_searchContent, "获取文章种草素材列表失败", response.body().asString()));
}
@Test(description = "代理人_种草素材_搜索获取视频种草素材列表", priority = 8)
@Test(description = "代理人_种草素材_搜索获取视频种草素材列表", priority = 9)
public void 代理人_种草素材_搜索获取视频种草素材列表() {
String type = "video";
Map<String, Object> params = new HashMap<String, Object>();
......@@ -125,16 +144,15 @@ public class RecommendMaterial implements Authorization {
}
//获取赠险列表
@Test(description = "代理人_赠险管理_获取赠险列表", priority = 9)
@Test(description = "代理人_赠险管理_获取赠险列表", priority = 10)
public void 代理人_赠险管理_获取赠险列表() {
Response response = network.getResponse(GRASS_insuranceListV3t);
Object object = response.jsonPath().getJsonObject("data.insuranceVos");
System.out.println(object);
Assert.assertNotNull(object, network.message(GRASS_insuranceListV3t, "获取赠险列表失败", response.body().asString()));
}
//赠险详情
@Test(description = "代理人_赠险管理_赠险详情", priority = 10)
@Test(description = "代理人_赠险管理_赠险详情", priority = 11)
public void 代理人_赠险管理_赠险详情() {
//根据赠险列表接口获取insuranceType
Response responseParams = network.getResponse(GRASS_insuranceListV3t);
......@@ -148,7 +166,7 @@ public class RecommendMaterial implements Authorization {
// 编辑赠险
@Test(description = "代理人_赠险管理_新增赠险", priority = 11)
@Test(description = "代理人_赠险管理_新增赠险", priority = 12)
public void 代理人_赠险管理_新增赠险() {
Map<String, Object> params = new HashMap<>();
params.put("insuranceTitle", "2222");
......@@ -172,7 +190,8 @@ public class RecommendMaterial implements Authorization {
//删除赠险
@Test(description = "代理人_赠险管理_删除赠险", priority = 12)
@Test(description = "代理人_赠险管理_删除赠险", priority = 13)
public void 代理人_赠险管理_删除赠险() {
Map<String, Object> params = new HashMap<>();
params.put("id", inId);
......@@ -183,8 +202,65 @@ public class RecommendMaterial implements Authorization {
Assert.assertTrue(data, network.message(params, GRASS_delInsurance, "删除赠险信息校验失败", response.body().asString()));
}
// 获取资料包列表
@Test(description = "代理人_获取资料包列表", priority = 14)
public void 代理人_获取资料包列表() {
Response response = network.getResponse(GRASS_materialListV2);
Object obj = response.jsonPath().getJsonObject("data.materialVos");
bId = response.jsonPath().getJsonObject("data.materialVos.get(0).id");
Assert.assertNotNull(obj, network.message(GRASS_materialListV2, "获取赠险列表失败", response.body().asString()));
}
//获取资料包内容
@Test(description = "代理人_获取资料包内容", priority = 15)
public void 代理人_获取资料包内容() {
//根据资料包的id获取scid
Map<String, Object> params = new HashMap<>();
params.put("contentId", bId);
Response response = network.getResponse(params, GETSCID);
bScid = response.jsonPath().getString("data");
System.out.println(bScid);
Assert.assertNotNull(bScid, network.message(params, GETSCID, "获取资料包的scid失败", response.body().asString()));
//获取资料包内容
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("scid", bScid);
Response responseInfo = network.getResponse(infoParams, GRASS_getDetailList);
Object articleBlocks = responseInfo.jsonPath().getJsonObject("data.articleBlocks");
bContentid = responseInfo.jsonPath().getJsonObject("data.articleBlocks.get(0).articles.get(0).contentId");
System.out.println(bContentid);
Assert.assertNotNull(articleBlocks, network.message(infoParams, GRASS_getDetailList, "获取资料包内容失败", responseInfo.body().asString()));
}
@Test(description = "代理人_获取资料包中的文章", priority = 16)
public void 代理人_获取资料包中的文章() {
//获取用户的id
Response response = network.getResponse(USER_INFO);
bSid = response.jsonPath().getString("data.encodeSellerId");
Assert.assertNotNull(bSid, network.message(USER_INFO, "获取用户id失败", response.body().asString()));
//获取资料包中文章的scid
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("contentId", bContentid);
infoParams.put("sid", bSid);
Response responseInfo = network.getResponse(infoParams, GETSCID);
aScid = responseInfo.jsonPath().getString("data");
Assert.assertNotNull(aScid, network.message(infoParams, GETSCID, "获取scid失败", responseInfo.body().asString()));
//获取资料包中的文章
Map<String, Object> infoParams2 = new HashMap<>();
infoParams2.put("scid", aScid);
infoParams2.put("datagramScid", bScid);
infoParams2.put("needDisplayPreNext", 1);
Response responseInfo2 = network.getResponse(infoParams2, GRASS_getArticleInfo);
Object data = responseInfo2.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(infoParams2, GRASS_getArticleInfo, "获取文章失败", responseInfo2.body().asString()));
}
//******************** 访客 **********************8
@Test(description = "访客_记录查看素材", priority = 13)
@Test(description = "访客_记录查看素材", priority = 17)
public void 访客_记录查看素材() {
//tKu 切换为访客
network.agentCookies.put("tKu", VISITOR_TKU);
......@@ -198,7 +274,8 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(visitId, network.message(params, CONTENT_READ, "访客记录查看素材失败", response.body().asString()));
}
@Test(description = "访客_文章内容页", priority = 14)
@Test(description = "访客_文章内容页", priority = 18)
public void 访客_文章内容页() {
Map<String, Object> infoParams = new HashMap<>();
infoParams.put("scid", scid);
......@@ -207,8 +284,8 @@ public class RecommendMaterial implements Authorization {
Assert.assertEquals(grasscontentId, id, network.message(infoParams, ARTICLE_H5INFO, "访客查看文章失败", response.body().asString()));
}
//是否爆款素材
@Test(description = "访客_文章类型判断", priority = 15)
@Test(description = "访客_文章类型判断", priority = 19)
public void 访客_文章类型判断() {
Map<String, Object> params = new HashMap<>();
params.put("id", grasscontentId);
......@@ -225,7 +302,114 @@ public class RecommendMaterial implements Authorization {
Assert.assertNotNull(tags, network.message(infoParams, ARTICLE_GETEXPINFO, "访客-获取文章标签有误", response.body().asString()));
Assert.assertNotNull(recommendReason, network.message(infoParams, ARTICLE_GETEXPINFO, "访客-获取文章推荐理由有误", response.body().asString()));
}
}
// 获取互动区-专业解读
@Test(description = "访客_互动区-专业解读", priority = 20)
public void 访客_互动区_专业解读() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("pageIndex", 1);
params.put("pageSize", 10);
Response response = network.getResponse(params, ARTICLE_ENHANCEDCOLUMN_GETCONTENTS);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
Assert.assertTrue(hasList, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETCONTENTS, "访客-获取专业解读列表有误", response.body().asString()));
}
// 获取互动区-互动问答
@Test(description = "访客_互动区-互动问答", priority = 21)
public void 访客_互动区_互动问答() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("pageIndex", 1);
params.put("pageSize", 2);
Response response = network.getResponse(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
Assert.assertTrue(hasList, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS, "访客-获取个人专栏列表有误", response.body().asString()));
String answer = response.jsonPath().getString("data.list[0].answer");
qId = response.jsonPath().getString("data.list[0].questionId");
System.out.println(qId);
Assert.assertNotNull(answer, network.message(params, ARTICLE_ENHANCEDCOLUMN_GETFAQS, "访客-获取问答内容有误", response.body().asString()));
}
//获取互动问答详情
@Test(description = "获取互动问答详情", priority = 22)
public void 获取互动问答详情() {
Map<String, Object> params = new HashMap<>();
params.put("qId", qId);
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_getQuestionDetail);
Object obj = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(obj, network.message(params, ARTICLE_getQuestionDetail, "获取互动问答详情失败", response.body().asString()));
}
// 获取互动区-风险评测
@Test(description = "访客_互动区-风险评测", priority = 23)
public void 访客_互动区_风险评测() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_ISDISPLAYACTIVITY);
boolean isDisplay = response.jsonPath().getBoolean("data.isDisplay");
String riskScid = response.jsonPath().getString("data.scid");
Assert.assertTrue(isDisplay, network.message(params, ARTICLE_ISDISPLAYACTIVITY, "访客-互动区-风险评测显示有误", response.body().asString()));
Assert.assertNotNull(riskScid, network.message(params, ARTICLE_ISDISPLAYACTIVITY, "访客-互动区-风险评测内容有误", response.body().asString()));
}
// 获取代理人个人专栏
@Test(description = "访客_代理人个人专栏", priority = 24)
public void 访客_代理人个人专栏() {
// 先获取代理人个人专栏设置
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
Response response = network.getResponse(params, ARTICLE_GETENHANCEDCOLUMNCONFIG);
boolean isOpen = response.jsonPath().getBoolean("data.find {it.code == 'personal_document_switch'}.val");
Assert.assertTrue(isOpen, network.message(params, ARTICLE_GETENHANCEDCOLUMNCONFIG, "访客-获取代理人日常精准素材个人专栏开关有误", response.body().asString()));
//tku 切换为代理人的
network.agentCookies.put("tku", AGENT_TKU);
//关闭 代理人个人专栏开关
Map<String, Object> configParams = new HashMap<String, Object>();
configParams.put("configKey", "personal_document_switch");
configParams.put("configValue", false);
response = network.postResponse(configParams, SELLERCONFIG_EDITCONFIG);
//tku 切换为访客的
network.agentCookies.put("tku", VISITOR_TKU);
//再获取代理人个人专栏
response = network.getResponse(params, ARTICLE_GETENHANCEDCOLUMNCONFIG);
isOpen = response.jsonPath().getBoolean("data.find {it.code == 'personal_document_switch'}.val");
Assert.assertFalse(isOpen, network.message(params, ARTICLE_GETENHANCEDCOLUMNCONFIG, "访客-获取代理人日常精准素材个人专栏开关有误", response.body().asString()));
//tku 切换为代理人的
network.agentCookies.put("tku", AGENT_TKU);
//再次开启 代理人个人专栏开关
configParams.put("configKey", "personal_document_switch");
configParams.put("configValue", true);
response = network.postResponse(configParams, SELLERCONFIG_EDITCONFIG);
//tku 切换为访客的
network.agentCookies.put("tku", VISITOR_TKU);
}
// 获取代理人个人专栏
@Test(description = "访客_获取代理人私信", priority = 25)
public void 访客_获取代理人私信() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid", scid);
params.put("t", System.currentTimeMillis());
Response response = network.getResponse(params, CHECKUNREAD);
String desc = response.jsonPath().getString("desc");
Assert.assertEquals(desc, "OK", network.message(params, CHECKUNREAD, "访客-获取私信有误", response.body().asString()));
}
@AfterClass
public void tearDown() {
network.agentCookies.put("tku", AGENT_TKU); //tku 切换为访客的
apiCount += 13;
}
}
\ No newline at end of file
package com.kjj.cases.assistant;
import static com.kjj.config.BasicConfig.*;
import com.kjj.cases.admin.Authorization;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.*;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class homePage implements Authorization {
public int firstTagId; //获取种草素材标签ID
public String contentId; //获取素材文章id
public String tagId; //获取发圈素材标签ID
public String tagName; //获取发圈素材标签名称
public int hotTagId; //获取热榜标签ID
public int posterTagId; //获取海报标签ID
public String posterContentId; //获取海报的的contentId
@BeforeClass
public void setUp() {
// 创建用户 并传到network里
AGENT_TKU = BaseUtils.createTku();
network.agentCookies.put("tku", AGENT_TKU);
//System.out.println("代理人tku:"+AGENT_TKU);
// 获取访客tku
VISITOR_TKU = BaseUtils.getTku(VISITOR_USERID);
//System.out.println("访客tku:"+VISITOR_TKU);
}
//获取种草素材列表页
@Test(description = "首页_种草素材列表",priority = 1)
public void 首页_种草素材列表(){
Map<String,Object> params = new HashMap<>();
params.put("firstTagId","-1");
params.put("contentType","article");
params.put("pageIndex",1);
params.put("pageSize",20);
Response response = network.getResponse(params,HOME_getContentList);
Object obj = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(obj, network.message(params,HOME_getContentList,"获取首页种草素材列表失败",response.body().asString()));
}
//获取发圈素材列表
@Test(description="获取发圈tab列表",priority = 2)
public void 获取发圈tab列表(){
Response response = network.getResponse(FRIENDS_GETMATERIALTAGS);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
int id = response.jsonPath().getInt("data.find {it.name == '保险'}.id"); //标签tab
firstTagId = response.jsonPath().getInt("data[0].id");//第一个标签的ID
System.out.println(firstTagId);
Assert.assertTrue(hasList,network.message(FRIENDS_GETMATERIALTAGS,"获取tab数量有误",response.body().asString()));
Assert.assertEquals(id,595,network.message(FRIENDS_GETMATERIALTAGS,"获取tab中不包含保险",response.body().asString()));
}
//获取未读发圈列表
@Test(description="获取发圈未读列表",priority = 3)
public void 获取发圈未读列表() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("firstTagId",firstTagId);
Response response = network.getResponse(params,FRIENDS_GETUNREADTIMELINSLIST);
Object obj = response.jsonPath().getJsonObject("data");
System.out.println(obj);
Assert.assertNotNull(obj,network.message(params,FRIENDS_GETUNREADTIMELINSLIST,"获取推荐列表有误",response.body().asString()));
}
@Test(description = "获取所有发圈列表",priority = 4)
public void 获取所有发圈列表(){
Map<String,Object> params = new HashMap<>();
params.put("firstTagId",firstTagId);
params.put("pageIndex",1);
params.put("pageSize",20);
Response response = network.getResponse(params,FRIENDS_GETTIMELINELIST);
Object obj = response.jsonPath().getJsonObject("data");
contentId = response.jsonPath().getString("data.list.get(0).contentId"); //素材ID
System.out.println(contentId);
tagId = response.jsonPath().getString("data.list.get(0).materialTag"); //素材频道ID
tagName = response.jsonPath().getString("data.list.get(0).tagName"); //素材频道名称
Assert.assertNotNull(obj,network.message(params,FRIENDS_GETTIMELINELIST,"获取未读发圈列表失败",response.body().asString()));
}
@Test(description = "标记发圈素材是否已读",priority = 5)
public void 标记发圈素材是否已读(){
Map<String,Object> params = new HashMap<>();
params.put("firstTagId",firstTagId);
params.put("contentId",contentId);
Response response = network.postResponse(params,FRIENDS_ASYNCMARKTIMELINEREAD);
System.out.println(params);
boolean data = response.jsonPath().getBoolean("data");
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(data, network.message(params,FRIENDS_ASYNCMARKTIMELINEREAD,"标记发圈素材是否已读失败",response.body().asString()));
Assert.assertTrue(success, network.message(params,FRIENDS_ASYNCMARKTIMELINEREAD,"标记发圈素材是否已读失败",response.body().asString()));
}
@Test(description="收藏发圈素材",priority = 6)
public void 收藏发圈素材(){
// 收藏素材
Map<String, Object> params = new HashMap<String, Object>();
params.put("contentId",contentId);
params.put("operate",1);
Response response = network.getResponse(params,FRIENDS_ADDORCANCELCOLLECT);
boolean isAdd = response.jsonPath().getBoolean("data");
Assert.assertTrue(isAdd,network.message(params,FRIENDS_ADDORCANCELCOLLECT,"收藏素材失败",response.body().asString()));
// 查看收藏列表
params.put("pageSize",12);
response = network.getResponse(params,FRIENDS_QUERYLISTFORCOLLECT);
String collectContentId = response.jsonPath().getString("data[0].contentId");
Assert.assertEquals(collectContentId,contentId,network.message(params,FRIENDS_QUERYLISTFORCOLLECT,"收藏列表有误",response.body().asString()));
// 取消收藏
params.put("operate",2);
response = network.getResponse(params,FRIENDS_ADDORCANCELCOLLECT);
boolean isCancel = response.jsonPath().getBoolean("data");
Assert.assertTrue(isCancel,network.message(params,FRIENDS_ADDORCANCELCOLLECT,"取消收藏素材失败",response.body().asString()));
}
@Test(description="素材频道页",priority = 7)
public void 素材频道页(){
//频道页 头部
ThreadSleepUtils.sleep(500);
Map<String, Object> params = new HashMap<String, Object>();
params.put("tagId",tagId);
Response response = network.getResponse(params,FRIENDS_CHANNELDETAIL);
String name = response.jsonPath().getString("data.tagName");
Assert.assertEquals(name,tagName,network.message(params,FRIENDS_CHANNELDETAIL,"素材频道页-头部获取有误",response.body().asString()));
//频道页 列表
params.put("pageSize",10);
params.put("pageNo",1);
response = network.getResponse(params,FRIENDS_GETCHANNELLIST);
Object obj = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(obj,network.message(params,FRIENDS_GETCHANNELLIST,"素材频道列表-获取有误",response.body().asString()));
}
@Test(description="从首页发圈列表页进入",priority = 8)
public void 从首页发圈列表页进入(){
// 获取首页发圈素材列表
Response response = network.getResponse(HOME_GETHOMETIMELINECONTENT);
String currentId = response.jsonPath().getString("data.materialVos[0].contentId");
Assert.assertNotNull(currentId,network.message(HOME_GETHOMETIMELINECONTENT,"获取首页发圈列表有误",response.body().asString()));
// 如果有推荐列表,进入发圈
if (currentId.length() > 0){
Map<String, Object> params = new HashMap<String, Object>();
params.put("currentId",currentId);
response = network.getResponse(params,FRIENDS_GETCURRENTINFO);
String topContentId = response.jsonPath().getString("data.contentId");
Assert.assertEquals(topContentId,currentId,network.message(params,FRIENDS_GETCURRENTINFO,"从首页进入发圈的头部素材有误",response.body().asString()));
}
}
//获取热榜标签列表
@Test(description = "获取热榜标签列表",priority = 9)
public void 获取热榜标签列表(){
Response response = network.getResponse(HOME_getTopHubTag);
Object obj = response.jsonPath().getJsonObject("data");
hotTagId = response.jsonPath().getInt("data[0].id");
Assert.assertNotNull(obj, network.message(HOME_getTopHubTag,"获取热榜标签列表失败",response.body().asString()));
}
@Test(description = "获取热榜文章列表",priority = 10)
public void 获取热榜文章列表(){
Map<String,Object> params = new HashMap<>();
params.put("tagId",hotTagId);
Response response = network.getResponse(params,HOME_getTopHubContentList);
Object obj = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(obj, network.message(params,HOME_getTopHubContentList,"获取热榜文章列表失败",response.body().asString()));
}
@Test(description = "获取海报标签列表",priority = 11)
public void 获取海报标签列表(){
Response response = network.getResponse(HOME_getTags4Poster);
Object obj = response.jsonPath().getJsonObject("data");
posterTagId = response.jsonPath().getInt("data[1].id");
Assert.assertNotNull(obj, network.message(HOME_getTopHubTag,"获取海报标签列表",response.body().asString()));
}
@Test(description = "获取海报内容列表",priority = 12)
public void 获取海报内容列表(){
Map<String,Object> params = new HashMap<>();
params.put("firstTagId",posterTagId);
params.put("pageIndex",1);
params.put("pageSize",12);
Response response = network.getResponse(params,HOME_getPosterTemplateList);
Object obj = response.jsonPath().getJsonObject("data.list");
posterContentId = response.jsonPath().getString("data.list.get(0).contentId");
Assert.assertNotNull(obj, network.message(params,HOME_getPosterTemplateList,"获取海报内容失败",response.body().asString()));
}
@Test(description = "获取海报内容",priority = 13)
public void 获取海报内容(){
//根据contentId获得sCid
Map<String,Object> params = new HashMap<>();
params.put("contentId",posterContentId);
Response response = network.getResponse(params,GETSCID);
String sCid = response.jsonPath().getString("data");
System.out.println(sCid);
Assert.assertNotNull(sCid, network.message(params,GETSCID,"获取sCid失败",response.body().asString()));
//根据id查询海报
Map<String,Object> infoParams = new HashMap<>();
infoParams.put("scid",sCid);
Response findPosterRes = network.getResponse(infoParams,HOME_findPosterById);
Object data = findPosterRes.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(infoParams,HOME_findPosterById,"查询海报失败",findPosterRes.body().asString()));
}
//获取首页视频列表
@Test(description = "首页_视频列表",priority = 14)
public void 首页_视频列表(){
Map<String,Object> params = new HashMap<>();
params.put("contentType","video");
Response response = network.getResponse(params,HOME_getContentList);
Object obj = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(obj, network.message(params,HOME_getContentList,"获取首页视频列表失败",response.body().asString()));
}
}
package com.kjj.cases.assistant.whoSawMe;
import com.beust.jcommander.internal.Lists;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.config.BasicConfig.AGENT_TKU;
import static com.kjj.config.BasicConfig.BOSS_EDITCONFIG;
public class WhoSawMe implements Authorization {
private Response response;
private Map<String, Object> param;
private String AGENT1_TKU;
@BeforeClass
public void setUp() throws IOException {
// 代理人授权
agentTku();
BaseUtils.ssoLogin();
// 赋值
AGENT1_TKU = "T3gM31f18jCeKCBVHf5MANgyXeBZGCm8vTJQTuWYXHFqxAxq2TQ27ozxyRsZykZBimiwFTrzQnGLWkvAs4";
// 关闭数据看板演示数据
param = new HashMap<>();
param.put("configKey", "boss_board_demon_switch");
param.put("configValue", false);
response = network.postResponse(param, BOSS_EDITCONFIG);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BOSS_EDITCONFIG, "接口请求失败", response.body().asString()));
Assert.assertTrue(data, network.message(param, BOSS_EDITCONFIG, "关闭演示数据开关失败",response.body().asString()));
}
// 进入谁扛过我主页
// 判断代理人是否新会员
@Test(description = "首页_判断是否新会员", priority = 1)
public void 判断是否新会员() throws IOException {
// 判断是否新会员
param = new HashMap<>();
param.put("vipGuideType", 2);
response = network.getResponse(param, BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType");
Boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success, Boolean.TRUE, network.message(BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType", "判断代理人是否新会员失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(BasicConfig.HOST + "/kjy/mp/rookieGuide/isNewVipByType", "新老会员判断错误,预期为新会员判断为老会员", response.body().asString()));
}
// 获取代理人用户信息
@Test(description = "首页_获取代理人用户信息", priority = 2)
public void 获取代理人用户信息() throws IOException{
// 获取代理人用户信息
response = network.getResponse(BasicConfig.USER_INFO);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.USER_INFO, "获取代理人用户信息失败", response.body().asString()));
String wxName = response.jsonPath().getString("data.wxName");
Assert.assertEquals(wxName, BasicConfig.WECHAT_NAME, network.message(BasicConfig.USER_INFO, "代理人微信昵称获取有误,预期为" + BasicConfig.WECHAT_NAME, response.body().asString()));
}
// 获取当前页面Tips
@Test(description = "首页_获取当前页面Tips", priority = 3)
public void 获取当前页面Tips() throws IOException {
// 根据page获取当前页面tips
param = new HashMap<>();
String page = "who_saw_me";
param.put("page", page);
response = network.getResponse(param, BasicConfig.GETTIPSBYPAGE);
Object data = response.jsonPath().getJsonObject("data");
Boolean isShowTips = response.jsonPath().getBoolean("data.isShowTips");
Integer jumpType = response.jsonPath().getInt("data.jumpType");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(BasicConfig.GETTIPSBYPAGE, "获取当前页面tips失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.GETTIPSBYPAGE, "获取当前页面tips失败", response.body().asString()));
Assert.assertNotNull(isShowTips, network.message(BasicConfig.GETTIPSBYPAGE, "获取isShowTips值失败", response.body().asString()));
Assert.assertNotNull(jumpType, network.message(BasicConfig.GETTIPSBYPAGE, "获取跳转类型失败", response.body().asString()));
}
// 查询代理人当前使用版本
@Test(description = "首页_查询使用版本", priority = 4)
public void 查询代理人当前使用版本() throws IOException {
param = new HashMap<>();
String sellerIdEncode = encodeSellerId(getSellerId());
param.put("sellerId", sellerIdEncode);
response = network.getResponse(param, BasicConfig.USING_VERSION);
String userVersion = response.jsonPath().getString("data.userVersion");
Assert.assertEquals(userVersion, "2", network.message(BasicConfig.USING_VERSION, "代理人当前使用版本错误,实际为2.保险专业版", response.body().asString()));
}
// 判断是否展示续费弹窗
@Test(description = "判断是否展示续费弹窗", priority = 6)
public void 判断是否展示续费弹窗() throws IOException{
// 判断是否展示续费弹窗
response = network.getResponse(BasicConfig.LAYER_RENEW);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(BasicConfig.LAYER_RENEW, "判断是否展示续费弹窗失败,data为空", response.body().asString()));
}
// 判断是否展示邀请弹窗
@Test(description = "展示邀请活动弹窗", priority = 7)
public void 展示邀请活动弹窗() throws IOException {
// 邀请活动弹窗
response = network.getResponse(BasicConfig.DISTRIBUTION_LAYER);
boolean success = response.jsonPath().getBoolean("success");
Object data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success, network.message(BasicConfig.DISTRIBUTION_LAYER, "判断是否展示邀请活动弹窗失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.DISTRIBUTION_LAYER, "判断是否展示邀请活动弹窗失败,data为空", response.body().asString()));
}
// 判断是否展示线索页新手引导
@Test(description = "获取线索页新手引导", priority = 8)
public void 获取线索页新手引导() throws IOException {
// 获取线索页新手引导
response = network.getResponse(BasicConfig.ROOKIECLUEGUIDE);
Boolean showClueGuide = response.jsonPath().getBoolean("data.showClueGuide");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(BasicConfig.ROOKIECLUEGUIDE, "接口请求失败", response.body().asString()));
Assert.assertNotNull(response.jsonPath().getJsonObject("data"), network.message(BasicConfig.ROOKIECLUEGUIDE, "获取线索页新手引导失败", response.body().asString()));
Assert.assertNotNull(showClueGuide, network.message(BasicConfig.ROOKIECLUEGUIDE, "获取showClueGuide值失败", response.body().asString()));
}
// 获取周报首页数据
@Test(description = "获取周报首页数据", priority = 9)
public void 获取周报首页数据() throws IOException{
// 获取周报首页数据
response = network.getResponse(BasicConfig.SELLERWEEKLY);
boolean success = response.jsonPath().getBoolean("success");
Object data = response.jsonPath().getJsonObject("data");
Assert.assertTrue(success, network.message(BasicConfig.SELLERWEEKLY, "接口请求失败", response.body().asString()));
Assert.assertNotNull(data, network.message(BasicConfig.SELLERWEEKLY, "获取周报首页数据失败", response.body().asString()));
}
// 获取代理人标签列表
@Test(description = "获取代理人标签列表", priority = 10)
public void 获取代理人标签列表() throws IOException {
// 获取代理人标签列表
response = network.getResponse(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList");
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList", "接口请求失败", response.body().asString()));
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(BasicConfig.HOST + "/kjy/mp/sellerTag/getTagList", "获取代理人标签列表失败", response.body().asString()));
}
// 获取首页来访统计
@Test(description = "获取谁看过我首页来访统计", priority = 11)
public void 来访统计() throws IOException{
response = network.getResponse(BasicConfig.VISITHEADER);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.VISITHEADER, "接口请求失败", response.body().asString()));
String todayClueNum = response.jsonPath().getString("data.todayClueNum");
String todayVisitNum = response.jsonPath().getString("data.todayVisitNum");
String totalVisitNum = response.jsonPath().getString("data.totalVisitNum");
Assert.assertNotNull(todayClueNum, network.message(BasicConfig.VISITHEADER, "获取今日线索数失败", response.body().asString()));
Assert.assertNotNull(todayVisitNum, network.message(BasicConfig.VISITHEADER, "获取今日访问数失败", response.body().asString()));
Assert.assertNotNull(totalVisitNum, network.message(BasicConfig.VISITHEADER, "获取累计访问数失败", response.body().asString()));
}
// 进入运营周报首页
@Test(description = "进入运营周报首页", priority = 12)
public void 进入运营周报首页() throws IOException{
response = network.getResponse(BasicConfig.WEEKLY_LIST);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.WEEKLY_LIST, "接口请求失败", response.body().asString()));
}
// 进入团队看板首页
@Test(description = "进入团队看板首页", priority = 13)
public void 进入团队看板首页() throws IOException{
// 获取当前页面Tips
param.clear();
param.put("page", "data_board");
response = network.getResponse(param, BasicConfig.GETTIPSBYPAGE);
boolean success = response.jsonPath().getBoolean("success");
String tipsContent = response.jsonPath().getString("data.tipsContent");
Assert.assertTrue(success, network.message(BasicConfig.GETTIPSBYPAGE, "接口请求失败", response.body().asString()));
Assert.assertEquals(tipsContent, "数据看板-tips", network.message(param, BasicConfig.GETTIPSBYPAGE, "当前页面Tips错误,实际为 数据看板", response.body().asString()));
// 获取我的上级名称
param.clear();
param.put("sellerId", getSellerId());
response = network.getResponse(param, BasicConfig.BOSS_BOSS);
success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(BasicConfig.BOSS_BOSS, "获取上级名称失败", response.body().asString()));
}
// 邀请成员加入团队
@Test(description = "生成团队邀请码", priority = 14)
public void 生成团队邀请码() throws IOException{
Integer inviteType = 2;
param = new HashMap<>();
param.put("inviteType", inviteType);
response = network.getResponse(param, BasicConfig.BOSS_CODE);
Object data = response.jsonPath().getString("data");
Assert.assertNotNull(data, network.message(param, BasicConfig.BOSS_CODE, "获取团队邀请码失败", response.body().asString()));
}
@Test(description = "其他代理人加入该代理人团队", priority = 15)
public void 邀请加入团队() throws IOException{
// 切换代理人加入团队
Long sellerId = getSellerId();
network.agentCookies.put("tku", AGENT1_TKU);
// 确定被邀请代理人没有上级
response = network.getResponse(BasicConfig.BOSS_ROLE);
boolean hasSuperior = response.jsonPath().getBoolean("data.hasSuperior");
Assert.assertFalse(hasSuperior, network.message(BasicConfig.BOSS_ROLE, "该代理人已有上级", response.body().asString()));
// 代理人加入团队
param = new HashMap<>();
param.put("inviterSid", sellerId);
param.put("inviteType", 2);
response = network.getResponse(param, BasicConfig.BOSS_BOUND);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(param, BasicConfig.BOSS_BOUND, "接口请求失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.BOSS_BOUND, "添加代理人进入团队失败", response.body().asString()));
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
}
@Test(description = "查看被邀请代理人上级名称", priority = 16)
public void 查看上级名称() throws IOException{
// 获取被邀请代理人sellerId
Long sellerId = (Long) decodeTku(AGENT1_TKU).get("sellerId");
param = new HashMap<>();
param.put("sellerId", sellerId);
response = network.getResponse(param, BasicConfig.BOSS_BOSS);
String bossName = response.jsonPath().getString("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.BOSS_BOSS, "接口请求失败", response.body().asString()));
Assert.assertEquals(bossName, BasicConfig.WECHAT_NAME, network.message(param, BasicConfig.BOSS_BOSS, "被邀请人上级名称与邀请人不一致", response.body().asString()));
}
@Test(description = "删除团队成员", priority = 17)
public void 删除团队成员() throws IOException{
// 获取下级代理人sellerId
Long childSellerId = (Long) decodeTku(AGENT1_TKU).get("sellerId");
// 登陆管理后台调用管理后台接口删除成员
param = new HashMap<>();
param.put("superiorSid", getSellerId());
param.put("childSid", childSellerId);
response = network.postResponse(param, BasicConfig.MANAGER_SELLERTEAM_REMOVEMEMBER);
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.MANAGER_SELLERTEAM_REMOVEMEMBER, "删除成员失败", response.body().asString()));
// 切换到被删除代理人确认已没有上级
network.agentCookies.put("tku", AGENT1_TKU);
response = network.getResponse(BasicConfig.BOSS_ROLE);
boolean hasSuperior = response.jsonPath().getBoolean("data.hasSuperior");
Assert.assertFalse(hasSuperior, network.message(BasicConfig.BOSS_ROLE, "该代理人还有上级", response.body().asString()));
network.agentCookies.put("tku", AGENT_TKU);
}
// 转发素材
@Test(description = "转发素材", priority = 18)
public void 转发素材() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
String scId = getContentScId(BasicConfig.ARTICLE_CONTENTID); // 获取文章scId
param = new HashMap<>();
param.put("scId", scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(param, BasicConfig.FORWARD, "转发素材失败", response.body().asString()));
}
// 查看今日转发素材列表
@Test(description = "查看今日转发素材列表", priority = 19)
public void 查看转发素材列表() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MATERIALLIST);
String contentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MATERIALLIST, "接口请求失败", response.body().asString()));
Assert.assertEquals(contentId, BasicConfig.ARTICLE_CONTENTID, network.message(param, BasicConfig.MATERIALLIST, "首条转发文章contentId不符合预期", response.body().asString()));
}
// 转发名片
@Test(description = "转发名片", priority = 20)
public void 转发名片() throws IOException{
response = network.getResponse(BasicConfig.USER_INFO);
String scId = network.getResponse(BasicConfig.SELLERCARD_TOPOFDETAIL).jsonPath().getString("data.scid");
param = new HashMap<>();
param.put("scId", scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
boolean forwardResult = response.jsonPath().getBoolean("data");
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
Assert.assertTrue(forwardResult, network.message(param, BasicConfig.FORWARD, "转发名片失败", response.body().asString()));
}
// 查看转发名片记录列表
@Test(description = "查看转发名片记录列表", priority = 21)
public void 查看转发名片记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.FORWARDCARDLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARDCARDLIST, "接口请求失败", response.body().asString()));
Assert.assertNotNull(response.jsonPath().getJsonObject("data.list"), network.message(param, BasicConfig.FORWARDCARDLIST, "获取转发名片记录列表失败", response.body().asString()));
}
// 使用工具
@Test(description = "使用工具", priority = 22)
public void 使用工具() throws IOException{
// 生成抽奖转盘素材scId
String lottery_scId = getContentScId(BasicConfig.LOTTERY_CONTENTID);
// 分享抽奖
param = new HashMap<>();
param.put("scId", lottery_scId);
param.put("forwardType", 1);
response = network.getResponse(param, BasicConfig.FORWARD);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.FORWARD, "分享抽奖活动失败", response.body().asString()));
}
// 查看使用工具记录列表
@Test(description = "查看使用工具记录列表", priority = 23)
public void 查看使用工具记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MARKETINGTOOLLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MARKETINGTOOLLIST, "接口请求失败", response.body().asString()));
String firstRecordContentId = response.jsonPath().getString("data.list[0].contentId");
Assert.assertEquals(firstRecordContentId, BasicConfig.LOTTERY_CONTENTID, network.message(param, BasicConfig.MARKETINGTOOLLIST, "首条记录素材Id与预期不匹配", response.body().asString()));
}
// 查看获得线索记录列表
@Test(description = "查看获得线索记录列表", priority = 24)
public void 查看获得线索记录列表() throws IOException{
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 1);
response = network.getResponse(param, BasicConfig.SALECLUELIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.SALECLUELIST, "接口请求失败", response.body().asString()));
}
// 查看转发动态访问列表
@Test(description = "查看转发动态访问列表", priority = 25)
public void 查看转发动态访问列表() throws IOException{
// 获取首条素材列表中首条动态id
param = new HashMap<>();
param.put("sellerId", getSellerId());
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("sortType", 4);
response = network.getResponse(param, BasicConfig.MATERIALLIST);
Long dynamicId = response.jsonPath().getLong("data.list[0].id");
// 按照动态id查看动态访问列表
param = new HashMap<>();
param.put("pageSize", 20);
param.put("pageIndex", 1);
param.put("dynamicId", dynamicId);
response = network.getResponse(param, BasicConfig.GETVISITLIST);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.GETVISITLIST, "接口请求失败", response.body().asString()));
}
// 查看谁看过我首页我的访客列表
@Test(description = "查看我的访客列表", priority = 26)
public void 查看我的访客列表() throws IOException{
List<Object> customerTagIds = Lists.newArrayList();
param = new HashMap<>();
param.put("customerTagIds", customerTagIds);
param.put("lastClueId", 0);
param.put("listType", 1);
param.put("pageSize", 20);
response = network.postResponse(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "接口请求失败", response.body().asString()));
List<Object> list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(param, BasicConfig.WHOSAWME_CUSTCLUELISTV3, "获取我的访客列表失败", response.body().asString()));
}
// 获取代理人sellerId
public Long getSellerId(){
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
response = network.getResponse(BasicConfig.USER_INFO);
Long sellerId = response.jsonPath().getLong("data.sellerId");
Assert.assertNotNull(sellerId, network.message(BasicConfig.USER_INFO, "获取代理人sellerId失败", response.body().asString()));
return sellerId;
}
// 通过素材contentId获取线索员文章scId
public String getContentScId(String contentId){
param = new HashMap<>();
param.put("contentId", contentId);
response = network.getResponse(param, BasicConfig.GETSCID);
String contentScid = response.jsonPath().getString("data");
Assert.assertNotNull(contentScid, network.message(param, BasicConfig.GETSCID, "获取scid失败", response.body().asString()));
return contentScid;
}
// 加密sellerId
public String encodeSellerId(Long sellerId){
// 登陆管理后台
param = new HashMap<>();
param.put("code", sellerId);
response = network.getResponse(param, BasicConfig.MANAGER_SELLERID_ENCODE);
String sIds = response.jsonPath().getString("data");
Assert.assertNotNull(sIds, network.message(param, BasicConfig.MANAGER_SELLERID_ENCODE, "加密sellerId失败", response.body().asString()));
return sIds;
}
// 解密sellerId
public HashMap<String, Object> decodeTku(String tku){
// 登陆管理后台
param = new HashMap<>();
param.put("tku", tku);
response = network.getResponse(param, BasicConfig.MANAGER_TKU_DECODE);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.MANAGER_TKU_DECODE, "接口请求失败", response.body().asString()));
Long userId = response.jsonPath().getLong("data.userId");
Long sellerId = response.jsonPath().getLong("data.sellerId");
Assert.assertNotNull(userId, network.message(param, BasicConfig.MANAGER_TKU_DECODE, "获取userId失败", response.body().asString()));
Assert.assertNotNull(userId, network.message(param, BasicConfig.MANAGER_TKU_DECODE, "获取userId失败", response.body().asString()));
HashMap<String, Object> result = new HashMap<>();
result.put("userId", userId);
result.put("sellerId", sellerId);
return result;
}
}
......@@ -27,7 +27,7 @@ public class Customer implements Authorization {
Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(Params, BasicConfig.MOBILE_customerList, "未获取到中奖名单配置信息", response.body().asString()));
List<CustomerList>lists= JsonUtil.parseResponseToPageBean(response,CustomerList.class);
customerId=lists.get(1).getCustomerId();
customerId=lists.get(0).getCustomerId();
}
......@@ -78,7 +78,7 @@ public class Customer implements Authorization {
int customerNum=response.jsonPath().getInt("data.customerNum");
Assert.assertTrue(customerNum>26, network.message(BasicConfig.MOBILE_count, "总客户数量不对", response.body().asString()));
int lastOneNewNum = response.jsonPath().getJsonObject("data.lastOneNewNum");
Assert.assertTrue(lastOneNewNum>17, network.message(BasicConfig.MOBILE_count, "上场新增客户数量", response.body().asString()));
Assert.assertTrue(lastOneNewNum>15, network.message(BasicConfig.MOBILE_count, "上场新增客户数量", response.body().asString()));
}
......@@ -108,7 +108,6 @@ public class Customer implements Authorization {
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(BasicConfig.MOBILE_customerUpdate, "性别修改失败", response.body().asString()));
Map<String, Object> ageParam = new HashMap<>();
ageParam.put("customerId",customerId);
ageParam.put("key",2);
......@@ -117,7 +116,6 @@ public class Customer implements Authorization {
System.out.println(ageRes.body().asString());
boolean data1=ageRes.jsonPath().getBoolean("data");
Assert.assertTrue(data1, network.message(BasicConfig.MOBILE_customerUpdate, "年龄修改失败", ageRes.body().asString()));
Map<String, Object> professionalParam = new HashMap<>();
professionalParam.put("customerId",customerId);
professionalParam.put("key",3);
......@@ -126,7 +124,6 @@ public class Customer implements Authorization {
System.out.println(professionalRes.body().asString());
boolean data2=professionalRes.jsonPath().getBoolean("data");
Assert.assertTrue(data2, network.message(BasicConfig.MOBILE_customerUpdate, "职业修改失败", professionalRes.body().asString()));
Map<String, Object> incomeParam = new HashMap<>();
incomeParam.put("customerId",customerId);
incomeParam.put("key",4);
......@@ -135,7 +132,6 @@ public class Customer implements Authorization {
System.out.println(incomeRes.body().asString());
boolean data3=incomeRes.jsonPath().getBoolean("data");
Assert.assertTrue(data3, network.message(BasicConfig.MOBILE_customerUpdate, "收入修改失败", incomeRes.body().asString()));
Map<String, Object> addressParam = new HashMap<>();
addressParam.put("customerId",customerId);
addressParam.put("key",5);
......@@ -144,7 +140,6 @@ public class Customer implements Authorization {
System.out.println(addressRes.body().asString());
boolean data4=addressRes.jsonPath().getBoolean("data");
Assert.assertTrue(data4, network.message(BasicConfig.MOBILE_customerUpdate, "所在地址修改失败", addressRes.body().asString()));
Map<String, Object> hobbyParam = new HashMap<>();
hobbyParam.put("customerId",customerId);
hobbyParam.put("key",6);
......@@ -153,7 +148,6 @@ public class Customer implements Authorization {
System.out.println(hobbyRes.body().asString());
boolean data5=hobbyRes.jsonPath().getBoolean("data");
Assert.assertTrue(data5, network.message(BasicConfig.MOBILE_customerUpdate, "爱好修改失败", hobbyRes.body().asString()));
Map<String, Object> insuranceParam = new HashMap<>();
insuranceParam.put("customerId",customerId);
insuranceParam.put("key",7);
......@@ -162,7 +156,6 @@ public class Customer implements Authorization {
System.out.println(insuranceRes.body().asString());
boolean data6=insuranceRes.jsonPath().getBoolean("data");
Assert.assertTrue(data6, network.message(BasicConfig.MOBILE_customerUpdate, "保险意识强弱修改失败", hobbyRes.body().asString()));
Map<String, Object> bartenderParam = new HashMap<>();
bartenderParam.put("customerId",customerId);
bartenderParam.put("key",8);
......
......@@ -20,145 +20,84 @@ public class LiveAgent implements Authorization {
* 直播中查看线索
*/
// 获取代理人各线索等级的线索数;
@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数据(){
@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()));
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()));
Response response = network.getResponse(params, BasicConfig.MOBILE_clueList);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "全部线索数为null", response.body().asString()));
}
// 获取直播中我的客户页面观看tab;
@Test(description="获取直播中我的客户页面观看tab数据",priority = 6)
public void 获取直播中我的客户页面观看tab数据() {
@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()));
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()));
Response response = network.getResponse(params, BasicConfig.MOBILE_clueList);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "直播中观看线索数为null", response.body().asString()));
}
// 获取直播中我的客户页面未观看tab;
@Test(description="获取直播中我的客户页面未观看tab数据",priority = 7)
public void 获取直播中我的客户页面未观看tab数据() {
@Test(description="获取直播中未观看线索数",priority = 3)
public void 获取直播中未观看线索数() {
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()));
Response response = network.getResponse(params, BasicConfig.MOBILE_clueList);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "直播中未观看线索数为null", response.body().asString()));
}
// 获取直播中我的客户页面中奖tab;
@Test(description="获取直播中我的客户页面中奖tab数据",priority = 8)
public void 获取直播中我的客户页面中奖tab数据() {
@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",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()));
Response response = network.getResponse(params, BasicConfig.MOBILE_clueList);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "直播中中奖线索数为null", response.body().asString()));
}
// 获取直播中我的客户页面报名tab;
@Test(description="获取直播中我的客户页面报名tab数据",priority = 9)
public void 获取直播中我的客户页面报名tab数据() {
@Test(description="获取直播中报名线索数",priority = 5)
public void 获取直播中报名线索数() {
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()));
}
Response response = network.getResponse(params, BasicConfig.MOBILE_clueList);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "直播中报名线索数为null", response.body().asString()));
}
@Test(description="获取直播间线索数统计",priority = 6)
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_livingClueStatistic);
System.out.println(response.body().asString());
boolean enable=response.jsonPath().getBoolean("data.enable");
Assert.assertTrue(enable, network.message(params, BasicConfig.MOBILE_livingClueStatistic, "功能未开启", response.body().asString()));
}
}
......@@ -6,6 +6,7 @@ import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
......@@ -26,6 +27,7 @@ public class LiveLater implements Authorization {
@Test(description="获取回收成功案例",priority = 1)
public void 获取回收成功案例() {
ThreadSleepUtils.sleep(100000);
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// params.put("liveId","Kj21MzYyNjM");
......@@ -62,13 +64,13 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
long allNum=response.jsonPath().getLong("data.allNum");
Assert.assertTrue(allNum==18, network.message(params, BasicConfig.MOBILE_ClueNum, "总的线索数不对", response.body().asString()));
Assert.assertTrue(allNum>10, network.message(params, BasicConfig.MOBILE_ClueNum, "总的线索数不对", response.body().asString()));
long newCustomNum =response.jsonPath().getLong("data.newCustomNum");
Assert.assertTrue(newCustomNum==15, network.message(params, BasicConfig.MOBILE_ClueNum, "转介绍线索数不对", response.body().asString()));
Assert.assertTrue(newCustomNum>10, network.message(params, BasicConfig.MOBILE_ClueNum, "转介绍线索数不对", response.body().asString()));
long oldCustomNum =response.jsonPath().getLong("data.oldCustomNum");
Assert.assertTrue(oldCustomNum==3, network.message(params, BasicConfig.MOBILE_ClueNum, "直接邀请线索数不对", response.body().asString()));
long awardNum =response.jsonPath().getLong("data.awardNum");
Assert.assertTrue(awardNum==7, network.message(params, BasicConfig.MOBILE_ClueNum, "中奖数量不对", response.body().asString()));
Assert.assertTrue(awardNum>0, network.message(params, BasicConfig.MOBILE_ClueNum, "中奖数量不对", response.body().asString()));
boolean showAward =response.jsonPath().getBoolean("data.showAward");
Assert.assertTrue(showAward, network.message(params, BasicConfig.MOBILE_ClueNum, "未展示中奖tab", response.body().asString()));
long submitFormNum =response.jsonPath().getLong("data.submitFormNum");
......@@ -106,7 +108,7 @@ public class LiveLater implements Authorization {
List<LiveUserList>lists= JsonUtil.parseResponseToPageBean(response,LiveUserList.class);
this.liveUserId=lists;
long totalCount =response.jsonPath().getLong("data.totalCount");
Assert.assertTrue(totalCount==18, network.message(params, BasicConfig.MOBILE_ClueList, "线索数量不对", response.body().asString()));
Assert.assertTrue(totalCount>18, network.message(params, BasicConfig.MOBILE_ClueList, "线索数量不对", response.body().asString()));
}
......@@ -125,7 +127,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount");
Assert.assertTrue(totalCount==3, network.message(params, BasicConfig.MOBILE_ClueList, "直接邀请线索数量不对", response.body().asString()));
Assert.assertTrue(totalCount>0, network.message(params, BasicConfig.MOBILE_ClueList, "直接邀请线索数量不对", response.body().asString()));
}
......@@ -142,7 +144,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount");
Assert.assertTrue(totalCount==15, network.message(params, BasicConfig.MOBILE_ClueList, "转介绍线索数量不对", response.body().asString()));
Assert.assertTrue(totalCount>10, network.message(params, BasicConfig.MOBILE_ClueList, "转介绍线索数量不对", response.body().asString()));
}
......@@ -159,7 +161,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount");
Assert.assertTrue(totalCount==7, network.message(params, BasicConfig.MOBILE_ClueList, "中奖线索数量不对", response.body().asString()));
Assert.assertTrue(totalCount>0, network.message(params, BasicConfig.MOBILE_ClueList, "中奖线索数量不对", response.body().asString()));
......@@ -223,7 +225,6 @@ public class LiveLater implements Authorization {
// params.put("liveId","Kj21MzYyNjM");
params.put("liveUserId",this.liveUserId.get(0).getLiveUserId());
Response response = network.getResponse(params,BasicConfig.MOBILE_getClueDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(response.body().asString());
int visitorInviteNum=response.jsonPath().getInt("data.visitorInviteNum");
Assert.assertTrue(visitorInviteNum==1, network.message(params, BasicConfig.MOBILE_getClueDetail, "访客邀请数不对", response.body().asString()));
......@@ -248,7 +249,22 @@ public class LiveLater implements Authorization {
}
@Test(description="获取回复建议",priority = 13)
@Test(description="查看客户B答题线索详情",priority = 13)
public void 查看客户B答题线索详情() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// params.put("liveId","Kj21MzYyNjM");
params.put("liveUserId",this.liveUserId.get(1).getLiveUserId());
Response response = network.getResponse(params,BasicConfig.MOBILE_getClueDetail);
System.out.println(response.body().asString());
int answerRecords=response.jsonPath().getInt("data.answerRecords");
Assert.assertNotNull(answerRecords, network.message(params, BasicConfig.MOBILE_getClueDetail, "答题线索为null", response.body().asString()));
}
@Test(description="获取回复建议",priority = 14)
public void 获取回复建议() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -262,7 +278,7 @@ public class LiveLater implements Authorization {
}
//需要校验返回结果
@Test(description="访客邀请列表",priority = 14)
@Test(description="访客邀请列表",priority = 15)
public void
访客邀请列表() {
Map<String, Object> params = new HashMap<String, Object>();
......@@ -279,7 +295,7 @@ public class LiveLater implements Authorization {
}
@Test(description="备注客户姓名",priority = 15)
@Test(description="备注客户姓名",priority = 16)
public void 备注客户姓名() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("remarkName","访客A");
......@@ -294,7 +310,7 @@ public class LiveLater implements Authorization {
//代理人首页已结束直播,查询待跟进线索数
@Test(description="查询待跟进线索数",priority = 16)
@Test(description="查询待跟进线索数",priority = 17)
public void 查询待跟进线索数() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -303,7 +319,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Integer clueCount =response.jsonPath().getInt("data.clueCount");
Assert.assertTrue(clueCount==18, network.message(params, BasicConfig.MOBILE_clueNum, "线索总数不对", response.body().asString()));
Assert.assertTrue(clueCount>10, network.message(params, BasicConfig.MOBILE_clueNum, "线索总数不对", response.body().asString()));
Integer notFollowedClueCount=response.jsonPath().getInt("data.notFollowedClueCount");
Assert.assertTrue(notFollowedClueCount>0, network.message(params, BasicConfig.MOBILE_clueNum, "未跟进线索数不对", response.body().asString()));
......
......@@ -87,7 +87,7 @@ public class Reward implements Authorization {
System.out.println(data);
Integer allCount =response.jsonPath().getInt("data.allCount");
Assert.assertTrue(allCount>5, network.message(params, BasicConfig.MOBILE_head, "中奖总数", response.body().asString()));
Assert.assertTrue(allCount>0, network.message(params, BasicConfig.MOBILE_head, "中奖总数", response.body().asString()));
Integer signCount=response.jsonPath().getInt("data.signCount");
Assert.assertTrue(signCount==0, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString()));
......@@ -228,7 +228,7 @@ public class Reward implements Authorization {
System.out.println(data);
Integer allCount =response.jsonPath().getInt("data.allCount");
Assert.assertTrue(allCount>5, network.message(params, BasicConfig.MOBILE_head, "中奖总数", response.body().asString()));
Assert.assertTrue(allCount>0, network.message(params, BasicConfig.MOBILE_head, "中奖总数", response.body().asString()));
Integer signCount=response.jsonPath().getInt("data.signCount");
Assert.assertTrue(signCount==1, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString()));
......
......@@ -20,19 +20,15 @@ import java.util.Map;
public class LiveVisitors implements Authorization
{
public String confId_imagetext;
public String confId_imageText;
public String confId_form;
public String confId_link;
public String confId_test;
public String confId_free;
public String confid;
public int pushType;
public String id;
public List<ResourcePushList>PushList;
//************主播端************
//************主播端************
//************主播端************
/*助播端端权益列表*/
@Test(description = "助播端权益列表", priority = 1)
......@@ -43,11 +39,7 @@ public class LiveVisitors implements Authorization
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceList);
List<ResourcePushList> list = JsonUtil.parseResponseToListBean(response, ResourcePushList.class);
ResourcePushList one=list.get(1);
confid=one.getConfId();
pushType=one.getPushType();
System.out.println(confid);
System.out.println(pushType);
this.PushList=list;
System.out.println(list);
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ResourceList, "查询主播端权益列表失败", response.body().asString()));
......@@ -59,8 +51,8 @@ public class LiveVisitors implements Authorization
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("confId", confid);
params.put("pushType", pushType);
params.put("confId", this.PushList.get(1).getConfId());
params.put("pushType", this.PushList.get(1).getPushType());
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceOn);
boolean data = response.jsonPath().getBoolean("data");
......@@ -81,7 +73,7 @@ public class LiveVisitors implements Authorization
List<LiveVisitor> liveVisitors = JsonUtil.parseResponseToListBean(response, LiveVisitor.class);
LiveVisitor one = liveVisitors.get(0);
System.out.println(one.getConfId());
confId_imagetext=one.getConfId();
confId_imageText=one.getConfId();
LiveVisitor two = liveVisitors.get(3);
System.out.println(two.getConfId());
confId_free=two.getConfId();
......@@ -145,8 +137,8 @@ public class LiveVisitors implements Authorization
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("confId", confid);
params.put("pushType", pushType);
params.put("confId", this.PushList.get(1).getConfId());
params.put("pushType", this.PushList.get(1).getPushType());
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceOff);
boolean data = response.jsonPath().getBoolean("data");
......@@ -161,7 +153,7 @@ public class LiveVisitors implements Authorization
visitorAuth();
Map<String, Object> params = new HashMap<>();
params.put("confId", confId_free);
params.put("liveid", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceFindDetailByConfid);
ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class);
System.out.println(JSON.toJSONString(agentBeans));
......@@ -282,7 +274,7 @@ public class LiveVisitors implements Authorization
{
agentAuth();
Map<String, Object> params = new HashMap<>();
params.put("confId", confId_imagetext);
params.put("confId", confId_imageText);
params.put("liveid", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceFindDetailByConfid);
ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class);
......@@ -391,38 +383,80 @@ public class LiveVisitors implements Authorization
fieldListparam.add(one);
params.put("fieldList", fieldListparam);
System.out.println(JSONObject.toJSONString(params));
Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceTestSubmit);
System.out.println(JSONObject.toJSONString("公司业务员无法参与"));
}
//助播端查询已经添加过的权益列表
@Test(description = "助播端查询已经添加过的权益列表", priority = 23)
public void 助播端查询编辑的权益列表()
//助播端编辑权益
@Test(description = "助播端编辑权益", priority = 23)
public void 助播端编辑权益()
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 30);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("ids", confId_imageText);
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceEditList);
ResourceEditList list = JsonUtil.parseResponseToBean(response, ResourceEditList.class);
System.out.println(list);
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ResourceEditList, "查询主播端权益列表失败", response.body().asString()));
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ResourceEdit, "编辑主播端权益列表失败", response.body().asString()));
}
//助播端编辑权益
@Test(description = "助播端编辑权益", priority = 24)
public void 助播端编辑权益()
@Test(description = "上架贴片", priority = 24)
public void 上架贴片()
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("ids", confId_imagetext);
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceEditList);
ResourceEditList list = JsonUtil.parseResponseToBean(response, ResourceEditList.class);
boolean data = response.jsonPath().getBoolean("success");
params.put("confId", this.PushList.get(5).getConfId());
Response response = network.postResponse(params, BasicConfig.MOBILE_pasterOn);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_ResourceEdit, "编辑主播端权益列表失败", response.body().asString()));
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_pasterOn, "贴片上架失败", response.body().asString()));
}
@Test(description = "获取推送列表", priority = 25)
public void 获取推送列表()
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("confId", this.PushList.get(5).getConfId());
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceList);
List<LiveVisitor> liveVisitors = JsonUtil.parseResponseToListBean(response, LiveVisitor.class);
LiveVisitor form = liveVisitors.get(5);
boolean isHasConfPaster=form.isHasConfPaster();
System.out.println(isHasConfPaster);
Assert.assertTrue(isHasConfPaster, network.message(params, BasicConfig.MOBILE_ResourceList, "贴片上架失败", response.body().asString()));
}
@Test(description = "访客获取贴片信息", priority = 26)
public void 访客获取贴片信息()
{
ThreadSleepUtils.sleep(1000);
visitorAuth();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_pasterInfo);
Object data=response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_pasterInfo, "访客未获取到贴片信息", response.body().asString()));
}
@Test(description = "贴片下架", priority = 27)
public void 贴片下架()
{
adminAuth();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("confId", this.PushList.get(5).getConfId());
Response response = network.postResponse(params, BasicConfig.MOBILE_pasterOff);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_pasterOff, "贴片下架失败", response.body().asString()));
}
}
......@@ -8,43 +8,39 @@ import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
public class FlipCard implements Authorization {
public String cardConfId;
public String redConfId;
public String shareSign;
@Test(description = "查询翻牌弹窗配置状态", priority = 1)
public void 查询翻牌弹窗配置状态() {
@Test(description = "查询翻牌集字配置状态", priority = 1)
public void 查询翻牌集字配置状态() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_status);
boolean confStatus = response.jsonPath().getBoolean("data.confStatus");
System.out.println(confStatus);
Assert.assertTrue(confStatus, network.message(params, BasicConfig.MOBILE_status, "未开启", response.body().asString()));
cardConfId=response.jsonPath().getJsonObject("data.cardConfId");
System.out.println(cardConfId);
Assert.assertNotNull(cardConfId,network.message(params, BasicConfig.MOBILE_status, "配置ID为null", response.body().asString()));
System.out.println(response.body().asString());
int confStatus = response.jsonPath().getInt("data.confStatus");
Assert.assertTrue(confStatus==2, network.message(params, BasicConfig.MOBILE_status, "未开启", response.body().asString()));
}
@Test(description = "查询直播翻牌配置详情", priority = 2)
public void 查询直播翻牌配置详情() {
@Test(description = "查询翻牌集字配置详情", priority = 2)
public void 查询翻牌集字配置详情() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_cardDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_cardDetail, "查询直播翻牌配置详情失败", response.body().asString()));
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_wordConf);
System.out.println(response.body().asString());
String redConfId = response.jsonPath().getString("data.redConfId");
this.redConfId=redConfId;
Assert.assertNotNull(redConfId, network.message(params, BasicConfig.MOBILE_wordConf, "查询直播翻牌配置详情失败", response.body().asString()));
}
//分享助力
//用户任务完成
@Test(description = "访客H分享直播间", priority = 3)
public void 访客H分享直播间() {
visitorAuth9();
......@@ -71,149 +67,410 @@ public class FlipCard implements Authorization {
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_helpInfo, "根据分享类型获取分享内容", response.body().asString()));
}
@Test(description = "访客H与访客V邀请关系绑定", priority = 5)
public void 访客H与访客V邀请关系绑定() {
visitorAuth22();
@Test(description = "访客邀请关系绑定", priority = 5)
public void 访客邀请关系绑定() {
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign",shareSign);
visitorAuth22();
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()));
visitorAuth25();
Response response = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success1 = response.jsonPath().getJsonObject("success");
System.out.println(success1);
Assert.assertTrue(success1, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", response.body().asString()));
}
@Test(description = "访客V获取绑定结果和绑定凭证", priority = 6)
public void 访客V获取绑定结果和绑定凭证() {
visitorAuth22();
@Test(description = "获取绑定结果和绑定凭证", priority = 6)
public void 获取绑定结果和绑定凭证() {
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth22();
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
visitorAuth25();
Response response = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type1 = response.jsonPath().getInt("data.type");
System.out.println(type1);
Assert.assertTrue(type1==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", response.body().asString()));
}
@Test(description = "已登录查询分享人头像昵称", priority = 7)
public void 已登录查询分享人头像昵称() {
visitorAuth22();
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
infoParam.put("shareSign",shareSign);
infoParam.put("shareType",8);
infoParam.put("confId",cardConfId);
infoParam.put("shareType",12);
infoParam.put("confId",this.redConfId);
visitorAuth22();
Response response = network.getResponse(infoParam, BasicConfig.MOBILE_info);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(infoParam, BasicConfig.MOBILE_info, "已登录查询分享人头像昵称失败", response.body().asString()));
visitorAuth25();
Response infoRes = network.getResponse(infoParam, BasicConfig.MOBILE_info);
Object data1 = infoRes.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(infoParam, BasicConfig.MOBILE_info, "已登录查询分享人头像昵称失败", infoRes.body().asString()));
}
@Test(description = "用户V给用户H助力", priority = 8)
public void 用户V给用户H助力() {
@Test(description = "访客H获得助力", priority = 8)
public void 访客H获得助力() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareSign",shareSign);
params.put("shareType",12);
params.put("confId",this.redConfId);
visitorAuth22();
Response response = network.postResponse(params, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_assist, "用户V给用户H助力失败", response.body().asString()));
visitorAuth25();
Response assistRes = network.postResponse(params, BasicConfig.MOBILE_assist);
boolean data1 = assistRes.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_assist, "用户S给用户H助力失败", assistRes.body().asString()));
}
@Test(description = "访客S分享直播间", priority = 9)
public void 访客S分享直播间() {
visitorAuth22();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareType",2);
Response signRes = network.getResponse(params, BasicConfig.MOBILE_sign);
String data = signRes.jsonPath().getString("data");
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(params, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客S获得助力", priority = 10)
public void 访客S获得助力() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareSign",shareSign);
params.put("shareType",8);
params.put("confId",cardConfId);
params.put("shareType",12);
params.put("confId",this.redConfId);
visitorAuth9();
Response response = network.postResponse(params, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_assist, "用户B给用户H助力失败", response.body().asString()));
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_assist, "用户H给用户S助力失败", response.body().asString()));
visitorAuth();
Response assistRes = network.postResponse(params, BasicConfig.MOBILE_assist);
boolean data1 = assistRes.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_assist, "用户A给用户S助力失败", response.body().asString()));
}
//签到
@Test(description = "用户签到", priority = 11)
public void 用户签到() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("markIds", Collections.singleton(149));
visitorAuth9();
Response response = network.postResponse(params, BasicConfig.MOBILE_checkIn);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(response.body().asString());
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_checkIn, "用户签到失败", response.body().asString()));
visitorAuth22();
Response checkinRes = network.postResponse(params, BasicConfig.MOBILE_checkIn);
boolean data1 = checkinRes.jsonPath().getBoolean("data");
System.out.println(checkinRes.body().asString());
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_checkIn, "用户签到失败", checkinRes.body().asString()));
}
//预约
@Test(description = "翻牌集字_预约", priority = 12)
public void 翻牌集字_预约() {
Map<String, Object> params = new HashMap<>();
params.put("bizType",1);
params.put("bizId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("markIds",Collections.singleton(144));
visitorAuth9();
Response response = network.postResponse(params, BasicConfig.MOBILE_appointment);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_appointment, "预约失败", response.body().asString()));
visitorAuth22();
Response appointmentRes = network.postResponse(params, BasicConfig.MOBILE_appointment);
boolean data1 = appointmentRes.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_appointment, "预约失败", appointmentRes.body().asString()));
}
@Test(description = "用户完成任务情况", priority = 13)
public void 用户完成任务情况() {
@Test(description = "开启翻牌", priority = 9)
public void 开启翻牌() {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth9();
for (int i =0;i<11;i++){
Response response = network.getResponse(params, BasicConfig.MOBILE_tasks);
System.out.println(response.body().asString());
boolean checkInStatus=response.jsonPath().getBoolean("data.checkInStatus");
Assert.assertTrue(checkInStatus, network.message(params, BasicConfig.MOBILE_tasks, "签到未完成", response.body().asString()));
boolean appointmentStatus=response.jsonPath().getBoolean("data.appointmentStatus");
Assert.assertTrue(appointmentStatus, network.message(params, BasicConfig.MOBILE_tasks, "预约失败", response.body().asString()));
int helpNum=response.jsonPath().getInt("data.helpNum");
Assert.assertTrue(helpNum==2, network.message(params, BasicConfig.MOBILE_tasks, "助力用户数为null", response.body().asString()));
visitorAuth22();
Response tasksRes = network.getResponse(params, BasicConfig.MOBILE_tasks);
System.out.println(tasksRes.body().asString());
boolean checkInStatus1=tasksRes.jsonPath().getBoolean("data.checkInStatus");
Assert.assertTrue(checkInStatus1, network.message(params, BasicConfig.MOBILE_tasks, "签到未完成", tasksRes.body().asString()));
boolean appointmentStatus1=tasksRes.jsonPath().getBoolean("data.appointmentStatus");
Assert.assertTrue(appointmentStatus1, network.message(params, BasicConfig.MOBILE_tasks, "预约失败", tasksRes.body().asString()));
int helpNum1=tasksRes.jsonPath().getInt("data.helpNum");
Assert.assertTrue(helpNum1==2, network.message(params, BasicConfig.MOBILE_tasks, "助力用户数为null", tasksRes.body().asString()));
}
@Test(description = "查询用户翻牌剩余次数", priority = 14)
public void 查询用户翻牌剩余次数() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth9();
Response response = network.getResponse(params, BasicConfig.MOBILE_record);
System.out.println(response.body().asString());
int leftNum =response.jsonPath().getJsonObject("data.leftNum");
Assert.assertTrue(leftNum==4, network.message(params, BasicConfig.MOBILE_record, "翻牌次数不足", response.body().asString()));
visitorAuth22();
Response recordRes= network.getResponse(params, BasicConfig.MOBILE_record);
System.out.println(recordRes.body().asString());
int leftNum1 =response.jsonPath().getJsonObject("data.leftNum");
Assert.assertTrue(leftNum1==4, network.message(params, BasicConfig.MOBILE_record, "翻牌次数不足", recordRes.body().asString()));
}
@Test(description = "翻牌", priority = 15)
public void 翻牌() {
for (int i =0;i<6;i++){
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
params.put("slot",i);
params.put("turnType",1);//1-活动页翻牌,2-助力翻牌
params.put("pos",i);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_cardOpen);
visitorAuth9();
Response response = network.postResponse(params, BasicConfig.MOBILE_turn);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_cardOpen, "翻牌开启失败", response.body().asString()));
ThreadSleepUtils.sleep(5000);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_turn, "翻牌开启失败", response.body().asString()));
ThreadSleepUtils.sleep(5000);
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("cardConfId",cardConfId);
infoParam.put("slot",i);
infoParam.put("turnType",1);
infoParam.put("pos",i);
infoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response infoRes = network.getResponse(params, BasicConfig.MOBILE_participateInfo);
Response infoRes = network.getResponse(params, BasicConfig.MOBILE_turnState);
Object data1 = infoRes.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_participateInfo, "用户H翻牌参与详情查询失败", infoRes.body().asString()));
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_turnState, "用户H翻牌参与详情查询失败", infoRes.body().asString()));
visitorAuth22();
Response turnRes = network.postResponse(params, BasicConfig.MOBILE_turn);
boolean data2 = turnRes.jsonPath().getBoolean("data");
System.out.println(data2);
Assert.assertTrue(data2, network.message(params, BasicConfig.MOBILE_turn, "翻牌开启失败", turnRes.body().asString()));
ThreadSleepUtils.sleep(5000);
Map<String, Object> turnStateParam = new HashMap<>();
turnStateParam.put("turnType",1);
turnStateParam.put("pos",i);
turnStateParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response turnStateParamRes = network.getResponse(params, BasicConfig.MOBILE_turnState);
Object data3 = turnStateParamRes.jsonPath().getJsonObject("data");
System.out.println(data3);
Assert.assertNotNull(data3, network.message(params, BasicConfig.MOBILE_turnState, "用户H翻牌参与详情查询失败", turnStateParamRes.body().asString()));
}
}
@Test(description = "用户参与翻牌详情", priority = 16)
public void 用户参与翻牌详情() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth9();
Response response = network.getResponse(params, BasicConfig.MOBILE_record);
System.out.println(response.body().asString());
int finishStatus=response.jsonPath().getInt("data.finishStatus");
Assert.assertTrue(finishStatus==2, network.message(params, BasicConfig.MOBILE_record, "未完成集字", response.body().asString()));
int flipNum=response.jsonPath().getInt("data.flipNum");
Assert.assertTrue(flipNum==5, network.message(params, BasicConfig.MOBILE_record, "翻牌次数不足5次", response.body().asString()));
visitorAuth22();
Response recordRes= network.getResponse(params, BasicConfig.MOBILE_record);
System.out.println(recordRes.body().asString());
int finishStatus1=recordRes.jsonPath().getInt("data.finishStatus");
Assert.assertTrue(finishStatus1==2, network.message(params, BasicConfig.MOBILE_record, "未完成集字", recordRes.body().asString()));
int flipNum1=recordRes.jsonPath().getInt("data.flipNum");
Assert.assertTrue(flipNum1==5, network.message(params, BasicConfig.MOBILE_record, "翻牌次数不足5次", recordRes.body().asString()));
}
@Test(description = "翻牌集字领取历史记录", priority = 17)
public void 翻牌集字领取历史记录() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
@Test(description = "用户翻牌参与信息", priority = 10)
public void 用户翻牌参与信息() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_userInfo);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Integer totalAmount =response.jsonPath().getJsonObject("data.totalAmount");
System.out.println(totalAmount);
Assert.assertTrue(totalAmount==100, network.message(params, BasicConfig.MOBILE_userInfo, "查询用户翻牌参与信息失败", response.body().asString()));
Response response = network.getResponse(params, BasicConfig.MOBILE_history);
System.out.println(response.body().asString());
Object data =response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_history, "集字历史记录为null", response.body().asString()));
visitorAuth22();
Response historyRes = network.getResponse(params, BasicConfig.MOBILE_history);
System.out.println(historyRes.body().asString());
Object data1 =historyRes.jsonPath().getJsonObject("data");
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_history, "集字历史记录为null", historyRes.body().asString()));
}
//提现
@Test(description = "提现", priority = 11)
public void 提现() {
//开红包
@Test(description = "用户开红包资格查询", priority = 18)
public void 用户开红包资格查询() {
ThreadSleepUtils.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth9();
Response response = network.getResponse(params, BasicConfig.MOBILE_finishStatus);
System.out.println(response.body().asString());
int status =response.jsonPath().getInt("data.status");
Assert.assertTrue(status==2, network.message(params, BasicConfig.MOBILE_finishStatus, "未完成集字", response.body().asString()));
visitorAuth22();
Response finishRes = network.getResponse(params, BasicConfig.MOBILE_finishStatus);
System.out.println(finishRes.body().asString());
int status1 =finishRes.jsonPath().getInt("data.status");
Assert.assertTrue(status1==2, network.message(params, BasicConfig.MOBILE_finishStatus, "未完成集字", finishRes.body().asString()));
}
@Test(description = "放弃开红包", priority = 19)
public void 放弃开红包() {
visitorAuth22();
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_withdrawal);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_withdrawal, "提现失败", response.body().asString()));
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_abort);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_abort, "放弃开红包报异常", response.body().asString()));
}
//提现结果
@Test(description = "提现结果", priority = 12)
public void 提现结果() {
@Test(description = "开红包", priority = 20)
public void 开红包() {
visitorAuth9();
ThreadSleepUtils.sleep(3000);
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId", cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_withdrawalResult);
Integer status = response.jsonPath().getInt("data.status");
System.out.println(status);
Assert.assertTrue(status == 2, network.message(params, BasicConfig.MOBILE_withdrawalResult, "提现失败", response.body().asString()));
}
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.postResponse(params, BasicConfig.MOBILE_redOpen);
System.out.println(response.body().asString());
boolean data =response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_redOpen, "开红包失败", response.body().asString()));
}
@Test(description = "用户开红包状态查询", priority = 21)
public void 用户开红包状态查询() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
//提现记录
@Test(description = "提现记录", priority = 13)
public void 提现记录() {
visitorAuth9();
ThreadSleepUtils.sleep(5000);
Response response = network.getResponse(params, BasicConfig.MOBILE_finishStatus);
System.out.println(response.body().asString());
int status =response.jsonPath().getInt("data.status");
Assert.assertTrue(status==3, network.message(params, BasicConfig.MOBILE_finishStatus, "集字状态不对", response.body().asString()));
int redStatus =response.jsonPath().getInt("data.redStatus");
Assert.assertTrue(redStatus==4, network.message(params, BasicConfig.MOBILE_finishStatus, "发钱异常", response.body().asString()));
visitorAuth22();
Response finishRes = network.getResponse(params, BasicConfig.MOBILE_finishStatus);
System.out.println(finishRes.body().asString());
int status1 =finishRes.jsonPath().getInt("data.status");
Assert.assertTrue(status1==4, network.message(params, BasicConfig.MOBILE_finishStatus, "集字状态不对", finishRes.body().asString()));
}
@Test(description = "开红包结果", priority = 22)
public void 开红包结果() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("cardConfId",cardConfId);
Response response = network.getResponse(params, BasicConfig.MOBILE_withdrawalRecord);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Integer withdrawalAmount =response.jsonPath().getInt("data.withdrawalAmount");
System.out.println(withdrawalAmount);
Assert.assertTrue(withdrawalAmount==100, network.message(params, BasicConfig.MOBILE_withdrawalRecord, "提现失败", response.body().asString()));
params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_redOpenState);
System.out.println(response.body().asString());
int redStatus =response.jsonPath().getInt("data.redStatus");
Assert.assertTrue(redStatus==4, network.message(params, BasicConfig.MOBILE_redOpenState, "红包领取状态不对", response.body().asString()));
int redAmount =response.jsonPath().getInt("data.redAmount");
Assert.assertTrue(redAmount==1000, network.message(params, BasicConfig.MOBILE_redOpenState, "红包金额不对", response.body().asString()));
}
}
......@@ -1408,66 +1408,64 @@ public class SaveLive implements Authorization {
}
/**
* 翻牌活动配置
* 翻牌集字活动配置
*/
// @Test(description = "保存翻牌配置", priority = 69)
// public void 保存翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("withdrawalAmount", 100);
// Params.put("withdrawalCondition", 1);
// Params.put("withdrawalNum", 1);
// Params.put("invitePresentNum", 1);
// Params.put("initPresentNum", 10);
// Params.put("imgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Params.put("secondImgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Response response = network.postResponse(Params, BasicConfig.MANAGER_card);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_card, "保存翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播翻牌配置详情", priority = 70)
// public void 查看直播翻牌配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_cardDetail);
// Object data = response.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_cardDetail, "查看直播翻牌配置详情失败", response.body().asString()));
//
// }
//
//
// @Test(description = "开启翻牌配置", priority = 71)
// public void 开启翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("confStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_switch);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switch, "开启翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播配置", priority = 72)
// public void 查看直播配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// boolean cardConfBuildStatus = response.jsonPath().getBoolean("data.cardConfBuildStatus");
// System.out.println(cardConfBuildStatus);
// Assert.assertTrue(cardConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
//
// boolean cardConfStatus = response.jsonPath().getBoolean("data.cardConfStatus");
// System.out.println(cardConfStatus);
// Assert.assertTrue(cardConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
//
//
// }
@Test(description = "保存翻牌配置", priority = 69)
public void 保存翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("amount", 1000);
Params.put("helpNum", 1);
Params.put("num",2);
Params.put("showAmount",1000);
Params.put("showMaxAmount",1000);
Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_flipWord, "保存翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播翻牌配置详情", priority = 70)
public void 查看直播翻牌配置详情() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_wordDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_wordDetail, "查看直播翻牌配置详情失败", response.body().asString()));
}
@Test(description = "开启翻牌配置", priority = 71)
public void 开启翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("confStatus",2);
Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播配置", priority = 72)
public void 查看直播配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
System.out.println(flipWordConfBuildStatus);
Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
System.out.println(flipWordConfStatus);
Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
}
/**
* 直播中过渡视频
......@@ -1749,6 +1747,7 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_redSwitchStatus, "开启攒现金红包配置失败", response.body().asString()));
}
/**
* 闯关答题
*/
......@@ -2012,11 +2011,27 @@ public class SaveLive implements Authorization {
}
@Test(description = "查看直播好运配置状态", priority = 108)
public void 查看直播好运配置状态() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean configFortune = response.jsonPath().getBoolean("data.configFortune");
System.out.println(configFortune);
Assert.assertTrue(configFortune, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置好运红包", response.body().asString()));
boolean fortuneConfBuildStatus = response.jsonPath().getBoolean("data.fortuneConfBuildStatus");
System.out.println(fortuneConfBuildStatus);
Assert.assertTrue(fortuneConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启好运红包配置", response.body().asString()));
}
/**
* 直播预告页弹窗
*/
@Test(description = "直播预告页弹窗配置", priority = 108)
@Test(description = "直播预告页弹窗配置", priority = 109)
public void 直播预告页弹窗配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2031,7 +2046,7 @@ public class SaveLive implements Authorization {
}
@Test(description = "预告页弹窗详情", priority = 109)
@Test(description = "预告页弹窗详情", priority = 110)
public void 预告页弹窗详情() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2042,7 +2057,7 @@ public class SaveLive implements Authorization {
}
@Test(description = "开启预告页弹窗", priority = 110)
@Test(description = "开启预告页弹窗", priority = 111)
public void 开启预告页弹窗() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -2054,7 +2069,25 @@ public class SaveLive implements Authorization {
}
@Test(description = "查看直播预告页弹窗配置状态", priority = 112)
public void 查看直播预告页弹窗配置状态() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean preLayerConfStatus = response.jsonPath().getBoolean("data.preLayerConfStatus");
System.out.println(preLayerConfStatus);
Assert.assertTrue(preLayerConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置预告页弹窗", response.body().asString()));
boolean preLayerOpenStatus = response.jsonPath().getBoolean("data.preLayerOpenStatus");
System.out.println(preLayerOpenStatus);
Assert.assertTrue(preLayerOpenStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启预告页弹窗", response.body().asString()));
}
}
......@@ -46,7 +46,7 @@ public class WinningRules implements Authorization {
public void 上传企业指定中奖名单() {
Map<String, Object> Params = new HashMap<>();
Params.put("confId",confIdList.get(2).getConfId());
Params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20210420/51716f59605424332f50a26f0a5d531f.xlsx");
Params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20210719/05af7f67cafeda53930c1f12a46daa6a.xlsx");
Params.put("fileName", "指定中奖名单");
Response response = network.postResponse(Params, BasicConfig.MANAGER_import);
taskId = response.jsonPath().getInt("data");
......@@ -85,7 +85,7 @@ public class WinningRules implements Authorization {
public void 上传新的企业指定中奖名单() {
Map<String, Object> Params = new HashMap<>();
Params.put("confId",confIdList.get(2).getConfId());
Params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20210421/14cfc6260713bc97e7cd6a9b27b0e763.xlsx");
Params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20210719/05af7f67cafeda53930c1f12a46daa6a.xlsx");
Params.put("fileName", "指定中奖名单");
Response response = network.postResponse(Params, BasicConfig.MANAGER_import);
taskId = response.jsonPath().getInt("data");
......
......@@ -24,12 +24,12 @@ public class Lottery implements Authorization {
@Test(description = "代理人抽奖活动弹层福利列表", priority = 1)
public void 抽奖活动弹层福利列表() {
agentAuth();
Map<String, Object> lotterParam = new HashMap<>();
lotterParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(lotterParam, BasicConfig.USER_listLiveLottery);
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.USER_listLiveLottery);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(lotterParam, BasicConfig.USER_listLiveLottery, "抽奖活动弹层福利列表查询失败", response.body().asString()));
Assert.assertNotNull(data, network.message(Params, BasicConfig.USER_listLiveLottery, "抽奖活动弹层福利列表查询失败", response.body().asString()));
}
@Test(description = "代理人查询抽奖奖品列表", priority = 2)
......@@ -259,9 +259,6 @@ public class Lottery implements Authorization {
submitInfoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
submitInfoParam.put("confId", this.List_ConfId.get(0).getWelfareConfId());
submitInfoParam.put("winnerName", "中奖姓名XX");
// submitInfoParam.put("region", "");
// submitInfoParam.put("location", "");
// submitInfoParam.put("phoneNum", "");
Response submitInfoRes = network.postResponse(submitInfoParam, BasicConfig.USER_submitInfo);
Boolean result = submitInfoRes.jsonPath().getBoolean("success");
System.out.println(result);
......@@ -269,24 +266,9 @@ public class Lottery implements Authorization {
ThreadSleepUtils.sleep(3000);
}
@Test(description = "访客A中奖任务", priority = 19)
public void 访客A中奖任务() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> luckDetailParam = new HashMap<>();
luckDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response luckDetailRes = network.getResponse(luckDetailParam, BasicConfig.ANCHOR_luckDetail);
try {
Boolean hasDrawTask = luckDetailRes.jsonPath().getBoolean("data.hasDrawTask");
Assert.assertTrue(hasDrawTask, network.message(luckDetailParam, BasicConfig.USER_result, "查询中奖任务失败", luckDetailRes.body().asString()));
} catch (Exception e) {
System.out.println("result = " + JSON.toJSONString(luckDetailRes.jsonPath().get()));
throw e;
}
}
@Test(description = "访客A中奖任务_分享直播间", priority = 20)
public void 访客A中奖任务_分享直播间() {
@Test(description = "访客A_分享直播间", priority = 19)
public void 访客A_分享直播间() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> signParam = new HashMap<>();
......@@ -300,8 +282,9 @@ public class Lottery implements Authorization {
}
@Test(description = "中奖任务邀请C关系绑定", priority = 21)
public void 中奖任务邀请C关系绑定() {
@Test(description = "邀请C关系绑定", priority = 20)
public void 邀请C关系绑定() {
visitorAuth3();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -313,8 +296,8 @@ public class Lottery implements Authorization {
}
@Test(description = "中奖任务邀请C绑定结果和绑定凭证", priority = 22)
public void 获取访客C绑定结果和绑定凭证() {
@Test(description = "邀请C绑定结果和绑定凭证", priority = 22)
public void 邀请C绑定结果和绑定凭证() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
......@@ -326,24 +309,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客C给访客A助力", priority = 23)
public void 访客C给访客A助力() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
assistParam.put("shareSign",shareSign);
assistParam.put("shareType",3);
assistParam.put("confId",this.List_ConfId.get(0).getWelfareConfId());
Response response = network.postResponse(assistParam, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客C给访客A助力失败", response.body().asString()));
}
@Test(description = "访客C到场", priority = 24)
@Test(description = "访客C到场", priority = 23)
public void 访客C到场() {
visitorAuth3();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -354,20 +320,9 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
//访客B绑定访客A后获取访客A的中奖任务信息
@Test(description = "访客C获取访客A的中奖任务信息", priority = 25)
public void 访客C获取访客A的中奖任务信息() {
visitorAuth3();
Map<String, Object> inviteDrawDetailParam = new HashMap<>();
inviteDrawDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response inviteDrawDetailRes = network.getResponse(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail);
Object result = inviteDrawDetailRes.jsonPath().getJsonObject("success");
System.out.println(result);
Assert.assertNotNull(result, network.message(inviteDrawDetailParam, BasicConfig.ANCHOR_inviteDrawDetail, "查询邀请人中奖信息失败", inviteDrawDetailRes.body().asString()));
}
@Test(description = "访客C关注直播间", priority = 26)
@Test(description = "访客C关注直播间", priority = 24)
public void 访客C关注直播间() {
visitorAuth3();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -378,7 +333,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客C抽奖码数量", priority = 27)
@Test(description = "访客C抽奖码数量", priority = 25)
public void 访客C抽奖码数量() {
visitorAuth3();
ThreadSleepUtils.sleep(1000);
......@@ -390,21 +345,101 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
//好运红包
@Test(description = "分享者访客A获取好运红包", priority = 26)
public void 分享者访客A获取好运红包() {
visitorAuth();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("scene",4);
Response response = network.postResponse(Params, BasicConfig.ANCHOR_getRed);
System.out.println( response.body().asString());
boolean firstGet = response.jsonPath().getBoolean("data.firstGet");
Assert.assertTrue(firstGet, network.message(Params, BasicConfig.ANCHOR_getRed, "非第1次获取好运红包", response.body().asString()));
int redNum = response.jsonPath().getInt("data.redNum");
Assert.assertTrue(redNum>1, network.message(Params, BasicConfig.ANCHOR_getRed, "红包个数不对", response.body().asString()));
@Test(description = "访客A中奖任务是否完成", priority = 28)
public void 访客A中奖任务是否完成() {
}
@Test(description = "访客A分享好运红包给访客B", priority = 27)
public void 访客A分享好运红包给访客B() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> luckDetailParam = new HashMap<>();
luckDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response luckDetailRes = network.getResponse(luckDetailParam, BasicConfig.ANCHOR_luckDetail);
boolean hasDrawTask = luckDetailRes.jsonPath().getJsonObject("data.hasDrawTask");
System.out.println(hasDrawTask);
Assert.assertTrue(hasDrawTask, network.message(luckDetailParam, BasicConfig.ANCHOR_luckDetail, "查询中奖任务失败", luckDetailRes.body().asString()));
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareType",11);
Response response = network.getResponse(Params, BasicConfig.MOBILE_helpInfo);
System.out.println( response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Params, BasicConfig.MOBILE_helpInfo, "分享失败", response.body().asString()));
}
@Test(description = "访客A抽奖券列表", priority = 29)
@Test(description = "访客B获取好运红包领取记录", priority = 28)
public void 访客B获取好运红包领取记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MOBILE_receiveRecord);
System.out.println( response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNull(data, network.message(Params, BasicConfig.MOBILE_receiveRecord, "访客B获取好运红包领取记录不为空", response.body().asString()));
}
@Test(description = "访客B领取好运红包", priority = 29)
public void 访客B领取好运红包() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.postResponse(Params, BasicConfig.MOBILE_receiverOpen);
System.out.println( response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MOBILE_receiverOpen, "访客B领取好运红包失败", response.body().asString()));
}
@Test(description = "访客B参与记录", priority = 30)
public void 访客B参与记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.getResponse(Params, BasicConfig.MOBILE_joinRecord);
System.out.println( response.body().asString());
int redStatus = response.jsonPath().getInt("data.redStatus");
Assert.assertTrue(redStatus==2, network.message(Params, BasicConfig.MOBILE_joinRecord, "领取失败", response.body().asString()));
int awardType = response.jsonPath().getInt("data.awardType");
Assert.assertTrue(awardType==2, network.message(Params, BasicConfig.MOBILE_joinRecord, "奖励类型不对", response.body().asString()));
int amount = response.jsonPath().getInt("data.amount");
Assert.assertTrue(amount==30, network.message(Params, BasicConfig.MOBILE_joinRecord, "红包金额为null", response.body().asString()));
}
@Test(description = "访客A获取好运红包领取记录", priority = 31)
public void 访客A获取好运红包领取记录() {
visitorAuth13();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareUserId","Kj20ODYz");
Response response = network.getResponse(Params, BasicConfig.MOBILE_joinRecord);
System.out.println( response.body().asString());
int redStatus = response.jsonPath().getJsonObject("data.redStatus");
Assert.assertTrue(redStatus==2, network.message(Params, BasicConfig.MOBILE_joinRecord, "领取失败", response.body().asString()));
int awardType = response.jsonPath().getJsonObject("data.awardType");
Assert.assertTrue(awardType==2, network.message(Params, BasicConfig.MOBILE_joinRecord, "奖励类型不对", response.body().asString()));
int amount = response.jsonPath().getJsonObject("data.amount");
Assert.assertTrue(amount==30, network.message(Params, BasicConfig.MOBILE_joinRecord, "领取金额为null", response.body().asString()));
}
@Test(description = "访客A抽奖券列表", priority = 32)
public void 访客A抽奖券列表() {
visitorAuth();
ThreadSleepUtils.sleep(3000);
......@@ -415,18 +450,10 @@ public class Lottery implements Authorization {
Response myLotteryCodeRes = network.getResponse(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode);
Object data = myLotteryCodeRes.jsonPath().getJsonObject("data");
System.out.println(data);
List<Object> values = myLotteryCodeRes.jsonPath().getList("data.list");
boolean result = false;
for (Object value : values) {
if (Objects.equals(((Map) value).get("codeSource"), 5)) {
result = true;
break;
}
}
Assert.assertTrue(result, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询访客A抽奖券列表失败", myLotteryCodeRes.body().asString()));
Assert.assertNotNull(data, network.message(myLotteryCodeParam, BasicConfig.MOBILE_MyLotteryCode, "查询访客A抽奖券列表失败", myLotteryCodeRes.body().asString()));
}
@Test(description = "访客A抽奖码数量", priority = 30)
@Test(description = "访客A抽奖码数量", priority = 33)
public void 访客A抽奖码数量() {
visitorAuth();
ThreadSleepUtils.sleep(500);
......@@ -439,7 +466,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B幸运任务", priority = 31)
@Test(description = "访客B幸运任务", priority = 34)
public void 访客B幸运任务() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -457,7 +484,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B直播中分享直播间", priority = 32)
@Test(description = "访客B直播中分享直播间", priority = 35)
public void 访客B直播中分享直播间() {
visitorAuth2();
Map<String, Object> signParam = new HashMap<>();
......@@ -472,7 +499,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请D关系绑定", priority = 33)
@Test(description = "幸运任务邀请D关系绑定", priority = 36)
public void 幸运任务邀请D关系绑定() {
visitorAuth4();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -485,7 +512,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 34)
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 37)
public void 幸运任务邀请D绑定结果和绑定凭证() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
......@@ -498,7 +525,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客D给访客B助力", priority = 35)
@Test(description = "访客D给访客B助力", priority = 38)
public void 访客D给访客B助力() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
......@@ -513,7 +540,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客D给访客B助力失败", response.body().asString()));
}
@Test(description = "访客D到场", priority = 36)
@Test(description = "访客D到场", priority = 39)
public void 访客D到场() {
visitorAuth4();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -524,7 +551,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", response.body().asString()));
}
@Test(description = "访客D关注直播间", priority = 37)
@Test(description = "访客D关注直播间", priority = 40)
public void 访客D关注直播间() {
visitorAuth4();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -535,7 +562,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客D抽奖码数量", priority = 38)
@Test(description = "访客D抽奖码数量", priority = 41)
public void 访客D抽奖码数量() {
visitorAuth4();
ThreadSleepUtils.sleep(500);
......@@ -548,7 +575,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请E关系绑定", priority = 39)
@Test(description = "幸运任务邀请E关系绑定", priority = 42)
public void 幸运任务邀请E关系绑定() {
visitorAuth5();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -561,7 +588,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 40)
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 43)
public void 幸运任务邀请E绑定结果和绑定凭证() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
......@@ -574,7 +601,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客E给访客B助力", priority = 41)
@Test(description = "访客E给访客B助力", priority = 44)
public void 访客E给访客B助力() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
......@@ -589,7 +616,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客E给访客B助力失败", response.body().asString()));
}
@Test(description = "访客E到场", priority = 42)
@Test(description = "访客E到场", priority = 45)
public void 访客E到场() {
visitorAuth5();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -600,7 +627,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客E关注直播间", priority = 43)
@Test(description = "访客E关注直播间", priority = 46)
public void 访客E关注直播间() {
visitorAuth5();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -611,7 +638,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", response.body().asString()));
}
@Test(description = "访客E抽奖码数量", priority = 44)
@Test(description = "访客E抽奖码数量", priority = 47)
public void 访客E抽奖码数量() {
visitorAuth5();
ThreadSleepUtils.sleep(500);
......@@ -624,7 +651,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请F关系绑定", priority = 45)
@Test(description = "幸运任务邀请F关系绑定", priority = 48)
public void 幸运任务邀请F关系绑定() {
visitorAuth6();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -637,7 +664,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 46)
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 49)
public void 幸运任务邀请F绑定结果和绑定凭证() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
......@@ -649,7 +676,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客F给访客B助力", priority = 47)
@Test(description = "访客F给访客B助力", priority = 50)
public void 访客F给访客B助力() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
......@@ -664,18 +691,26 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客F给访客B助力失败", response.body().asString()));
}
@Test(description = "访客F到场", priority = 48)
@Test(description = "访客F到场", priority = 51)
public void 访客F到场() {
visitorAuth6();
Map<String, Object> connectSuccessParam = new HashMap<>();
connectSuccessParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth6();
Response response = network.getResponse(connectSuccessParam, BasicConfig.USER_connectSuccess);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", response.body().asString()));
agentAuth();
Response connectRes = network.getResponse(connectSuccessParam, BasicConfig.USER_connectSuccess);
boolean success1 = connectRes.jsonPath().getBoolean("success");
System.out.println(success1);
Assert.assertTrue(success1, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectRes.body().asString()));
}
@Test(description = "访客F关注直播间", priority = 49)
@Test(description = "访客F关注直播间", priority = 52)
public void 访客F关注直播间() {
visitorAuth6();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -686,7 +721,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客F抽奖码数量", priority = 50)
@Test(description = "访客F抽奖码数量", priority = 53)
public void 访客F抽奖码数量() {
visitorAuth6();
ThreadSleepUtils.sleep(500);
......@@ -700,7 +735,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请G关系绑定", priority = 51)
@Test(description = "幸运任务邀请G关系绑定", priority = 54)
public void 幸运任务邀请G关系绑定() {
visitorAuth7();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -713,7 +748,7 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 52)
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 55)
public void 幸运任务邀请G绑定结果和绑定凭证() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
......@@ -725,7 +760,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客G给访客B助力", priority = 53)
@Test(description = "访客G给访客B助力", priority = 56)
public void 访客G给访客B助力() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
......@@ -740,7 +775,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客G给访客B助力失败", response.body().asString()));
}
@Test(description = "访客G到场", priority = 54)
@Test(description = "访客G到场", priority = 57)
public void 访客G到场() {
visitorAuth7();//黑名单用户
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -751,18 +786,27 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客G关注直播间", priority = 55)
@Test(description = "访客G关注直播间", priority = 58)
public void 访客G关注直播间() {
visitorAuth7();
Map<String, Object> subscribeParam = new HashMap<>();
subscribeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth7();
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()));
agentAuth();
Response response = network.postResponse(subscribeParam, BasicConfig.USER_SUBSCRIBE);
boolean data1 = response.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", response.body().asString()));
}
@Test(description = "访客G抽奖码数量", priority = 56)
@Test(description = "访客G抽奖码数量", priority = 59)
public void 访客G抽奖码数量() {
visitorAuth7();
ThreadSleepUtils.sleep(500);
......@@ -776,7 +820,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B幸运任务是否完成", priority = 57)
@Test(description = "访客B幸运任务是否完成", priority = 60)
public void 访客B幸运任务是否完成() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -789,7 +833,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B的抽奖券列表", priority = 58)
@Test(description = "访客B的抽奖券列表", priority = 61)
public void 访客B的抽奖券列表() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -810,7 +854,7 @@ public class Lottery implements Authorization {
}
@Test(description = "访客B的抽奖码数量", priority = 59)
@Test(description = "访客B的抽奖码数量", priority = 62)
public void 访客B抽奖码数量() {
visitorAuth2();
ThreadSleepUtils.sleep(3000);
......@@ -823,7 +867,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第二轮抽奖", priority = 60)
@Test(description = "开始第二轮抽奖", priority = 63)
public void 开始第二轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -836,7 +880,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第二轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第二轮正在抽奖的福利", priority = 61)
@Test(description = "查询第二轮正在抽奖的福利", priority = 64)
public void 查询第二轮正在抽奖的福利() {
visitorAuth3();
ThreadSleepUtils.sleep(1000);
......@@ -850,7 +894,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第二轮是否可以结束抽奖状态", priority = 62)
@Test(description = "查询第二轮是否可以结束抽奖状态", priority = 65)
public void 查询第二轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -863,7 +907,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第二轮抽奖", priority = 63)
@Test(description = "结束第二轮抽奖", priority = 66)
public void 结束第二轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -876,7 +920,7 @@ public class Lottery implements Authorization {
}
//昵称:刘超 孝感区域指定中奖
@Test(description = "孝感访客C是否中奖", priority = 64)
@Test(description = "孝感访客C是否中奖", priority = 67)
public void 孝感访客C是否中奖() {
visitorAuth3();
ThreadSleepUtils.sleep(3000);
......@@ -895,7 +939,7 @@ public class Lottery implements Authorization {
}
//昵称:李执--区域中奖用户
@Test(description = "北京访客D查询是否中奖", priority = 65)
@Test(description = "北京访客D查询是否中奖", priority = 68)
public void 北京访客D查询是否中奖() {
visitorAuth4();
ThreadSleepUtils.sleep(3000);
......@@ -914,7 +958,7 @@ public class Lottery implements Authorization {
}
//昵称:周成
@Test(description = "杭州访客E是否中奖", priority = 66)
@Test(description = "杭州访客E是否中奖", priority = 69)
public void 杭州访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
......@@ -934,7 +978,7 @@ public class Lottery implements Authorization {
}
//昵称:新强
@Test(description = "厦门访客F是否中奖", priority = 67)
@Test(description = "厦门访客F是否中奖", priority = 70)
public void 厦门访客F是否中奖() {
visitorAuth6();
ThreadSleepUtils.sleep(3000);
......@@ -953,7 +997,7 @@ public class Lottery implements Authorization {
}
//黑名单用户过滤
@Test(description = "黑名单访客G是否中奖", priority = 68)
@Test(description = "黑名单访客G是否中奖", priority = 71)
public void 黑名单访客G是否中奖() {
visitorAuth7();
ThreadSleepUtils.sleep(3000);
......@@ -974,7 +1018,7 @@ public class Lottery implements Authorization {
//第三轮企业指定中奖
@Test(description = "开始第三轮抽奖", priority = 69)
@Test(description = "开始第三轮抽奖", priority = 72)
public void 开始第三轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -985,23 +1029,32 @@ public class Lottery implements Authorization {
Object data = startRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第三轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第三轮正在抽奖的福利", priority = 70)
@Test(description = "查询第三轮正在抽奖的福利", priority = 73)
public void 查询第三轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth6();
Response infoRes = network.getResponse(infoParam, BasicConfig.USER_info);
System.out.println("result=" + infoRes.asString());
Object data = infoRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(infoParam, BasicConfig.USER_info, "获取正在抽奖的福利失败", infoRes.body().asString()));
agentAuth();
Response response = network.getResponse(infoParam, BasicConfig.USER_info);
Object data1 = response.jsonPath().getJsonObject("data");
System.out.println(data1);
Assert.assertNotNull(data1, network.message(infoParam, BasicConfig.USER_info, "获取正在抽奖的福利失败", response.body().asString()));
}
@Test(description = "查询第三轮是否可以结束抽奖状态", priority = 71)
@Test(description = "查询第三轮是否可以结束抽奖状态", priority = 74)
public void 查询第三轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1012,9 +1065,11 @@ public class Lottery implements Authorization {
boolean data = statusRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第三轮抽奖", priority = 72)
@Test(description = "结束第三轮抽奖", priority = 75)
public void 结束第三轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1026,13 +1081,15 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(endParam, BasicConfig.ANCHOR_end, "结束第三轮抽奖失败", endRes.body().asString()));
}
@Test(description = "企业指定访客E是否中奖", priority = 73)
@Test(description = "企业指定访客E是否中奖", priority = 76)
public void 企业指定访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
Map<String, Object> hasEndParam = new HashMap<>();
hasEndParam.put("confId", this.List_ConfId.get(2).getWelfareConfId());
hasEndParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth5();
Response hasEndRes = network.getResponse(hasEndParam, BasicConfig.USER_result);
try {
Boolean data = hasEndRes.jsonPath().getBoolean("data.lottery");
......@@ -1042,23 +1099,33 @@ public class Lottery implements Authorization {
throw e;
}
agentAuth();
Response response = network.getResponse(hasEndParam, BasicConfig.USER_result);
try {
Boolean data = response.jsonPath().getBoolean("data.lottery");
Assert.assertTrue(data, network.message(hasEndParam, BasicConfig.USER_result, "企业指定访客E未中奖", response.body().asString()));
} catch (Exception e) {
System.out.println("result = " + JSON.toJSONString(response.jsonPath().get()));
throw e;
}
}
//第4轮团队指定份数
@Test(description = "不在指定团队访客H到场", priority = 74)
@Test(description = "不在指定团队访客H到场", priority = 77)
public void 访客H到场() {
visitorAuth9();
Map<String, Object> connectSuccessParam = new HashMap<>();
connectSuccessParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response connectSuccessoRes = network.getResponse(connectSuccessParam, BasicConfig.USER_connectSuccess);
boolean success = connectSuccessoRes.jsonPath().getBoolean("success");
Response response = network.getResponse(connectSuccessParam, BasicConfig.USER_connectSuccess);
boolean success = response.jsonPath().getBoolean("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, "访客到场请求失败", response.body().asString()));
}
@Test(description = "访客H关注直播间", priority = 75)
@Test(description = "访客H关注直播间", priority = 78)
public void 访客H关注直播间() {
visitorAuth9();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1069,7 +1136,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客H抽奖码数量", priority = 76)
@Test(description = "访客H抽奖码数量", priority = 79)
public void 访客H抽奖码数量() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -1083,7 +1150,7 @@ public class Lottery implements Authorization {
}
@Test(description = "不在指定团队访客I到场", priority = 77)
@Test(description = "不在指定团队访客I到场", priority = 80)
public void 访客I到场() {
visitorAuth8();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -1094,7 +1161,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客I关注直播间", priority = 78)
@Test(description = "访客I关注直播间", priority = 81)
public void 访客I关注直播间() {
visitorAuth8();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1105,7 +1172,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客I抽奖码数量", priority = 79)
@Test(description = "访客I抽奖码数量", priority = 82)
public void 访客I抽奖码数量() {
visitorAuth8();
ThreadSleepUtils.sleep(1000);
......@@ -1119,7 +1186,7 @@ public class Lottery implements Authorization {
}
@Test(description = "指定团队访客J到场", priority = 80)
@Test(description = "指定团队访客J到场", priority = 83)
public void 访客J到场() {
visitorAuth10();
Map<String, Object> connectSuccessParam = new HashMap<>();
......@@ -1130,7 +1197,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
@Test(description = "访客J关注直播间", priority = 81)
@Test(description = "访客J关注直播间", priority = 84)
public void 访客J关注直播间() {
visitorAuth10();
Map<String, Object> subscribeParam = new HashMap<>();
......@@ -1141,7 +1208,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "访客J抽奖码数量", priority = 82)
@Test(description = "访客J抽奖码数量", priority = 85)
public void 访客J抽奖码数量() {
visitorAuth10();
ThreadSleepUtils.sleep(1000);
......@@ -1154,7 +1221,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第四轮抽奖", priority = 83)
@Test(description = "开始第四轮抽奖", priority = 86)
public void 开始第四轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -1167,7 +1234,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第四轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第四轮正在抽奖的福利", priority = 84)
@Test(description = "查询第四轮正在抽奖的福利", priority = 87)
public void 查询第四轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
......@@ -1181,7 +1248,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第四轮是否可以结束抽奖状态", priority = 85)
@Test(description = "查询第四轮是否可以结束抽奖状态", priority = 88)
public void 查询第四轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1194,7 +1261,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第四轮抽奖", priority = 86)
@Test(description = "结束第四轮抽奖", priority = 89)
public void 结束第四轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1208,7 +1275,7 @@ public class Lottery implements Authorization {
//企业已指定不能再中奖
@Test(description = "团队指定访客E是否中奖", priority = 87)
@Test(description = "团队指定访客E是否中奖", priority = 90)
public void 团队指定访客E是否中奖() {
visitorAuth5();
ThreadSleepUtils.sleep(3000);
......@@ -1226,7 +1293,7 @@ public class Lottery implements Authorization {
}
//团队分配制定中奖
@Test(description = "团队指定访客是否中奖", priority = 88)
@Test(description = "团队指定访客是否中奖", priority = 91)
public void 团队指定访客是否中奖() {
ThreadSleepUtils.sleep(3000);
//构建参数
......@@ -1261,7 +1328,7 @@ public class Lottery implements Authorization {
//不在公司指定区域内的用户
@Test(description = "团队指定访客F是否中奖", priority = 89)
@Test(description = "团队指定访客F是否中奖", priority = 92)
public void 团队指定访客F是否中奖() {
visitorAuth6();
ThreadSleepUtils.sleep(3000);
......@@ -1280,7 +1347,7 @@ public class Lottery implements Authorization {
@Test(description = "不在团队指定访客I是否中奖", priority = 90)
@Test(description = "不在团队指定访客I是否中奖", priority = 93)
public void 不在团队指定访客I是否中奖() {
visitorAuth8();
ThreadSleepUtils.sleep(3000);
......@@ -1298,7 +1365,7 @@ public class Lottery implements Authorization {
}
@Test(description = "开始第五轮抽奖", priority = 91)
@Test(description = "开始第五轮抽奖", priority = 94)
public void 开始第五轮抽奖() {
adminAuth();
ThreadSleepUtils.sleep(1000);
......@@ -1311,7 +1378,7 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(startParam, BasicConfig.ANCHOR_start, "开启第五轮抽奖失败", startRes.body().asString()));
}
@Test(description = "查询第五轮正在抽奖的福利", priority = 92)
@Test(description = "查询第五轮正在抽奖的福利", priority = 95)
public void 查询第五轮正在抽奖的福利() {
visitorAuth6();
ThreadSleepUtils.sleep(1000);
......@@ -1325,7 +1392,7 @@ public class Lottery implements Authorization {
}
@Test(description = "查询第五轮是否可以结束抽奖状态", priority = 93)
@Test(description = "查询第五轮是否可以结束抽奖状态", priority = 96)
public void 查询第五轮是否可以结束抽奖状态() {
adminAuth();
ThreadSleepUtils.sleep(3000);
......@@ -1338,7 +1405,7 @@ public class Lottery implements Authorization {
Assert.assertTrue(data, network.message(statusParam, BasicConfig.ANCHOR_status, "抽奖状态查询失败", statusRes.body().asString()));
}
@Test(description = "结束第五轮抽奖", priority = 94)
@Test(description = "结束第五轮抽奖", priority = 97)
public void 结束第五轮抽奖() {
adminAuth();
Map<String, Object> endParam = new HashMap<>();
......@@ -1352,7 +1419,7 @@ public class Lottery implements Authorization {
//团队分配指定中奖
@Test(description = "普通抽奖轮次访客是否中奖", priority = 95)
@Test(description = "普通抽奖轮次访客是否中奖", priority = 98)
public void 普通抽奖轮次访客是否中奖() {
ThreadSleepUtils.sleep(3000);
//构建参数
......
......@@ -398,7 +398,7 @@ public class LiveVistorRed implements Authorization {
@Test(description = "访客H帮访客I助力", priority = 24)
public void 访客H帮访客I助力()
{
visitorAuth9();
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......
......@@ -62,12 +62,15 @@ public class BasicConfig {
public static String visitorAuth23 ="LEH7epeHVDJWzhZ6DiexTHnsaRU4euCKXGmUiCDXuHaG6DznL4Mfk9SGwWCnwMvA6urFmXu4Qe9sCCcXMdojZMU4xN39V";
//直播访客 (奶汪)ID:1170 实名用户
public static String visitorAuth24 ="2Tsc8MwHZmXJKPfze38rXm37UEX1EtfvfjxjLr1GZDVAdRXD3hSK2j6WjZQgFaqHHJcT5yk3tB64Ebu38fmuJymWQtPcAdr";
//直播访客 (亦心)ID:96 实名用户
public static String visitorAuth25 ="5MgSyboxqzAQZZJEsTf43nVX38cJBxsCHATPDDoWL7qHS5PaPehMLbSmTNWgySTMFYevyw9tSxYKVU2VfhR9fW1FrWTk";
//***********************************************************************
// 基础线代理人 TKU,sid:2991
public static String AGENT_TKU = "T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UCQd8X84RJEiiPHRHPqbrJYL3KL7tLsZEM5LjN4z";
public static String AGENT_TKU = "T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UCLbai6Pc41VyJK3bXHe1wg7Hb5FGFZheeLvHjbE";
// 基础线访客 TKU
public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfHcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE";
public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfC4HKmj5NJfCUkxusAyFb5SpkWS31srDTYr6KtV";
// 访客的sids
public static final String sids = "Kj21MjMwNTU";
// 访客的userId(固定)
......@@ -99,10 +102,12 @@ public class BasicConfig {
public static final String MANAGER_redConfDetail = MANAGER_HOST + "/kjy/manager/live/fortune/red/confDetail";
public static final String MANAGER_redSwitch = MANAGER_HOST + "/kjy/manager/live/fortune/red/status/switch";
public static final String MANAGER_insertOrUpdate = MANAGER_HOST + "/kjy/manager/live/pre/conf/insertOrUpdate";
public static final String MANAGER_preLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/preLayer";
public static final String MANAGER_openPreLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/openPreLayer";
public static final String MOBILE_receiveRecord = MOBILE_HOST + "/kjy/live/fortune/receiver/receiveRecord";
public static final String MOBILE_receiverOpen= MOBILE_HOST + "/kjy/live/fortune/receiver/open";
public static final String MOBILE_joinRecord= MOBILE_HOST + "/kjy/live/fortune/receiver/joinRecord";
// *************** 闯关答题 ***************
public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues";
......@@ -176,20 +181,25 @@ public class BasicConfig {
public static final String ANCHOR_listLiveFreeReward = MOBILE_HOST + "/kjy/live/lottery/listLiveFreeReward";
public static final String ANCHOR_receive = MOBILE_HOST + "/kjy/live/user/lottery/receive";
// *************** 翻牌红包 ***************
public static final String MANAGER_card = MANAGER_HOST + "/kjy/manager/live/flip/card/save";
public static final String MANAGER_switch = MANAGER_HOST + "/kjy/manager/live/flip/card/status/switch";
public static final String MANAGER_cardDetail = MANAGER_HOST + "/kjy/manager/live/flip/card/detail";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/card/status";
public static final String MOBILE_cardDetail= MOBILE_HOST + "/kjy/live/flip/card/detail";
public static final String MOBILE_userInfo= MOBILE_HOST + "/kjy/live/flip/card/userInfo";
public static final String MOBILE_cardOpen= MOBILE_HOST + "/kjy/live/flip/card/open";
public static final String MOBILE_participateInfo= MOBILE_HOST + "/kjy/live/flip/card/participateInfo";
public static final String MOBILE_withdrawal= MOBILE_HOST + "/kjy/live/flip/card/withdrawal";
public static final String MOBILE_withdrawalResult= MOBILE_HOST + "/kjy/live/flip/card/withdrawalResult";
public static final String MOBILE_withdrawalRecord= MOBILE_HOST + "/kjy/live/flip/card/withdrawalRecord";
// *************** 翻牌集字红包 ***************
public static final String MANAGER_flipWord = MANAGER_HOST + "/kjy/manager/flip/word/saveOrUpdate";
public static final String MANAGER_wordSwitchStatus = MANAGER_HOST + "/kjy/manager/flip/word/switchStatus";
public static final String MANAGER_wordDetail = MANAGER_HOST + "/kjy/manager/flip/word/detail";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/word/status";
public static final String MOBILE_wordConf= MOBILE_HOST + "/kjy/live/flip/word/conf";
public static final String MOBILE_checkIn= MOBILE_HOST + "/kjy/live/flip/word/checkIn";
public static final String MOBILE_history= MOBILE_HOST + "/kjy/live/flip/word/user/history";
public static final String MOBILE_finishStatus= MOBILE_HOST + "/kjy/live/flip/word/user/finishStatus";
public static final String MOBILE_redOpen= MOBILE_HOST + "/kjy/live/flip/word/red/open";
public static final String MOBILE_redOpenState= MOBILE_HOST + "/kjy/live/flip/word/red/open/state";
public static final String MOBILE_abort= MOBILE_HOST + "/kjy/live/flip/word/red/abort";
public static final String MOBILE_appointment= MOBILE_HOST + "/kjy/live/user/appointment";
public static final String MOBILE_tasks= MOBILE_HOST + "/kjy/live/flip/word/user/tasks";
public static final String MOBILE_record= MOBILE_HOST + "/kjy/live/flip/word/user/record";
public static final String MOBILE_turn= MOBILE_HOST + "/kjy/live/flip/word/turn";
public static final String MOBILE_turnState= MOBILE_HOST + "/kjy/live/flip/word/turn/state";
// *************** 直播间过渡视频 ***************
public static final String MANAGER_confCaveOrUpdate = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/saveOrUpdate";
public static final String MANAGER_videoSwitch = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/status/switch";
......@@ -216,6 +226,10 @@ public class BasicConfig {
public static final String MOBILE_open= MOBILE_HOST + "/clue/guess/number/red/open";
public static final String MOBILE_result = MOBILE_HOST + "/clue/guess/number/red/result";
public static final String MANAGER_encode = MANAGER_HOST + "/kjy/manager/testUser/encode";
// *************** 宝箱裂变 ***************
public static final String MANAGER_getList4Admin = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/getList4Admin";
public static final String MANAGER_saveTreasureConf = MANAGER_HOST + "/kjy/manager/live/treasure/saveTreasureConf";
......@@ -290,7 +304,7 @@ public class BasicConfig {
public static final String ANCHOR_status = MOBILE_HOST + "/conf/live/lottery/status";
public static final String ANCHOR_end = MOBILE_HOST + "/conf/live/lottery/end";
public static final String ANCHOR_luckDetail = MOBILE_HOST + "/clue/lottery/task/luckDetail";
public static final String ANCHOR_inviteDrawDetail = MOBILE_HOST + "/clue/lottery/task/inviteDrawDetail";
public static final String ANCHOR_getRed = MOBILE_HOST + "/kjy/live/fortune/sharer/getRed";
// *************** 访客端 ***************
public static final String USER_SUBSCRIBE = MOBILE_HOST + "/kjy/live/user/appointment/subscribe";
......@@ -383,6 +397,13 @@ public class BasicConfig {
public static final String MOBILE_listDetail = MOBILE_HOST + "/kjy/live/guide/list/detail";
public static final String MOBILE_feedbackSave = MOBILE_HOST + "/kjy/live/user/feedback/save";
public static final String MOBILE_agentInfo = MOBILE_HOST + "/kjy/live/share/help/agent/info";
//直播中线索
public static final String MOBILE_clueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
public static final String MOBILE_livingClueStatistic = MOBILE_HOST + "/kjy/live/agent/clue/livingClueStatistic";
//排行榜
public static final String MOBILE_allRewardList = MOBILE_HOST + "/kjy/live/reward/allRewardList";
public static final String MOBILE_companyTotalData = MOBILE_HOST + "/kjy/live/team/companyTotalData";
......@@ -421,6 +442,9 @@ public class BasicConfig {
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_pasterOn = MOBILE_HOST + "/conf/live/push/pasterOn";
public static final String MOBILE_pasterInfo = MOBILE_HOST + "/clue/paster/info";
public static final String MOBILE_pasterOff = MOBILE_HOST + "/conf/live/push/pasterOff";
......@@ -567,6 +591,7 @@ public class BasicConfig {
public static final String ANIMATION_CONTENTID = "Kj21MzgzMTk";
public static final String GAME_CONTENTID = "Kj21NjIxNTk";
public static final String UPLOAD_CONTENTID = "Kj21NjA1NTE";
public static final String LOTTERY_CONTENTID = "Kj21MzQ3ODM"; // 营销工具抽奖暖冬大转盘素材ID
// *************** 公共 ***************
public static final String CREATE_USER = HOST + "/kjy/mp/autotest/create/user";
......@@ -581,7 +606,15 @@ public class BasicConfig {
public static final String CHECKUNREAD = HOST + "/kjy/mp/chat/checkUnread";
public static final String CONTENT_READ = HOST + "/kjy/mp/content/read";
public static final String INTERACTION_LIKE = HOST + "/kjy/mp/interaction/like";
public static final String GETTIPSBYPAGE = HOST + "/kjy/mp/tips/getTipsByPage";
public static final String USING_VERSION = HOST + "/kjy/mp/version/getInUseVersion";
public static final String DAILY_FIRST = HOST + "/kjy/mp/billing/clock/dailyFirst";
public static final String LAYER_RENEW = HOST + "/kjy/mp/layer/renew";
public static final String DISTRIBUTION_LAYER = HOST + "/kjy/sp/seller/distributionLayer";
public static final String ROOKIECLUEGUIDE = HOST + "/kjy/mp/rookieGuide/clueGuide";
public static final String VISITHEADER = HOST + "/kjy/mp/visit/header/v2";
public static final String SELLERWEEKLY = HOST + "/kjy/mp/whoSawMe/sellerWeekly";
public static final String WEEKLY_LIST = HOST + "/kjy/mp/seller/weekly/list";
// *************** 支付 ***************
......@@ -639,6 +672,7 @@ public class BasicConfig {
public static final String SELLERCARD_GETINTERACTIONCONFIG = HOST + "/kjy/mp/sellerConfig/getInteractionConfig";
public static final String SELLERCARD_GETSELLERPROMOTEINFO = HOST + "/kjy/mp/seller/getSellerPromoteInfo";
public static final String SELLERCARD_DIRECT = HOST + "/kjy/mp/user/direct";
public static final String GREETING_GETTIPSBYPAGE = HOST + "/kjy/mp/tips/getTipsByPage";
// *************** 上传 ***************
......@@ -662,6 +696,7 @@ public class BasicConfig {
// *************** 谁看过我 ***************
public static final String WHOSAWME_CUSTCLUELISTV2 = HOST + "/kjy/mp/whoSawMe/custClueList/v2";
public static final String WHOSAWME_CUSTCLUELISTV3 = HOST + "/kjy/mp/whoSawMe/custClueList/v3";
// *************** 文章 ***************
......@@ -673,6 +708,7 @@ public class BasicConfig {
public static final String ARTICLE_GETENHANCEDCOLUMNCONFIG = HOST + "/kjy/mp/sellerConfig/getEnhancedColumnConfig";
public static final String ARTICLE_ENHANCEDCOLUMN_GETCONTENTS = HOST + "/kjy/mp/enhancedColumn/getContents";
public static final String ARTICLE_ENHANCEDCOLUMN_GETFAQS = HOST + "/kjy/mp/enhancedColumn/getFAQs";
public static final String ARTICLE_getQuestionDetail = HOST +"/kjy/mp/explosioncontent/qa/getQuestionDetail";
public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = HOST + "/kjy/mp/explosioncontent/getExplosionContentList";
......@@ -697,10 +733,32 @@ public class BasicConfig {
public static final String GRASS_lastInsurance = HOST + "/kjy/mp/welfare/lastInsurance";
public static final String GRASS_editInsurance = HOST + "/kjy/mp/welfare/editInsurance";
public static final String GRASS_delInsurance = HOST + "/kjy/mp/welfare/delInsurance";
public static final String GRASS_materialListV2 = HOST + "/kjy/mp/welfare/materialListV2";
public static final String GRASS_getDetailList = HOST + "/kjy/mp/datagram/getDetailList";
public static final String GRASS_getArticleInfo = HOST + "/kjy/mp/datagram/getArticleInfo";
public static final String GRASS_direct = HOST + "/kjy/mp/user/direct";
// ************* 今日早报 *********
public static final String Daily_dailyList = HOST + "/kjy/mp/gatherPage/dailyList";
public static final String Daily_getHomeConf = HOST + "/kjy/mp/home/getHomeConf";
public static final String Daily_getHomeCaseList = HOST + "/kjy/mp/successCases/getHomeCaseList";
public static final String Daily_getCaseList = HOST + "/kjy/mp/successCases/getCaseList";
public static final String Daily_getHomeCompanyArea = HOST + "/kjy/mp/home/getHomeCompanyArea";
public static final String Daily_getTagList = HOST + "/kjy/mp/companyArea/getTagList";
public static final String Daily_getContentList = HOST +"/kjy/mp/companyArea/getContentList";
public static final String Daily_list = HOST + "/kjy/mp/companyDocument/list";
public static final String Daily_eveningList = HOST + "/kjy/mp/gatherPage/eveningList";
// ************** 首页 ****************
public static final String HOME_GETHOMETIMELINECONTENT = HOST + "/kjy/mp/home/getHomeTimeLineContent";
public static final String HOME_getInfo = HOST + "/kjy/mp/dailyPoster/getInfo";
public static final String HOME_selectPage = HOST + "/kjy/mp/dailyPoster/selectPage";
public static final String HOME_getContentList = HOST +"/kjy/mp/grassContent/getContentList";
public static final String HOME_getTopHubTag = HOST + "/kjy/mp/home/getTopHubTag";
public static final String HOME_getTopHubContentList = HOST + "/kjy/mp/home/getTopHubContentList";
public static final String HOME_getTags4Poster = HOST + "/kjy/mp/posterTemplate/getTags4Poster";
public static final String HOME_getPosterTemplateList = HOST + "/kjy/mp/posterTemplate/getPosterTemplateList";
public static final String HOME_findPosterById = HOST + "/kjy/mp/posterTemplate/findPosterById";
// ************** 设置中心 ***************
......@@ -720,6 +778,12 @@ public class BasicConfig {
public static final String BOSS_DETAIL = HOST + "/kjy/mp/seller/team/task/detail";
public static final String BOSS_PUBLISH = HOST + "/kjy/mp/seller/team/task/publish";
public static final String BOSS_RECEIVERLIST = HOST + "/kjy/mp/seller/team/task/receiverList";
public static final String BOSS_BOUND = HOST + "/kjy/mp/seller/team/bound";
public static final String MATERIALLIST = HOST + "/kjy/mp/seller/dynamic/getMaterialList";
public static final String FORWARDCARDLIST = HOST + "/kjy/mp/seller/dynamic/getForwardCardList";
public static final String MARKETINGTOOLLIST = HOST + "/kjy/mp/seller/dynamic/getMarketingToolList";
public static final String SALECLUELIST = HOST + "/kjy/mp/seller/dynamic/getSaleClueList";
public static final String GETVISITLIST = HOST + "/kjy/mp/seller/dynamic/getVisitList";
......@@ -758,6 +822,11 @@ public class BasicConfig {
public static final String MANAGER_PROMOTIONCODELIST = MANAGER_HOST + "/kjy/manager/promotionCode/codeList";
public static final String MANAGER_PROMOTIONBATCHMODIFY = MANAGER_HOST + "/kjy/manager/promotionCode/batchModify";
public static final String MANAGER_PROMOTIONCODEBATCHDETAIL = MANAGER_HOST + "/kjy/manager/promotionCode/batchDetail";
public static final String MANAGER_dailyPostersList = MANAGER_HOST + "/kjy/manager/dailyPosters/list";
public static final String MANAGER_findId = MANAGER_HOST + "/kjy/manager/dailyPosters/findById";
public static final String MANAGER_addOrUpdate = MANAGER_HOST + "/kjy/manager/dailyPosters/addOrUpdate";
public static final String MANAGER_dailyPostersDelete = MANAGER_HOST + "/kjy/manager/dailyPosters/delete";
public static final String MANAGER_SELLERTEAM_REMOVEMEMBER = MANAGER_HOST + "/kjy/manager/sellerTeam/removeMember";
public static final String MANAGER_SELLERID_ENCODE = MANAGER_HOST + "/kjy/manager/testUser/encode";
public static final String MANAGER_TKU_DECODE = MANAGER_HOST + "/kjy/manager/testUser/decryptTku";
}
......@@ -57,11 +57,11 @@
</classes>
</test>
<!-- <test preserve-order="false" name="翻牌红包">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="false" name="翻牌集字红包">
<classes>
<class name="com.kjj.cases.live.flipCard.FlipCard"/>
</classes>
</test>
<test preserve-order="true" name="中奖规则配置">
<classes>
......
<?xml version="1.0" encoding="UTF-8"?>
<!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.qa.cases.Home"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="新手任务">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="支付">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.Pay"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="上传">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.Upload"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="发圈">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.CircleFriends"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="boss看板">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.Boss"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="boss看板演示版">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.BossTest"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="贺卡">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.basics.GreetingCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="支付">
<classes>
<class name="com.kjj.cases.basics.Pay"/>
</classes>
</test>
<test preserve-order="true" name = "首页">
<classes>
<class name="com.kjj.cases.assistant.homePage"/>
</classes>
</test>
<test preserve-order="true" name="我的名片">
<classes>
<class name="com.kjj.cases.assistant.card.PersonCard"/>
......@@ -51,16 +22,22 @@
<class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>
</classes>
</test>
<test preserve-order="true" name="营销工具-贺卡">
<test preserve-order="true" name = "种草素材">
<classes>
<class name="com.kjj.cases.assistant.markettools.greetingCrad"/>
<class name="com.kjj.cases.assistant.RecommendMaterial"/>
</classes>
</test>
<!-- <test preserve-order="true" name = "种草素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.RecommendMaterial"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name = "今日早报">
<classes>
<class name="com.kjj.cases.assistant.DailyPaper"/>
</classes>
</test>
<test preserve-order="true" name = "谁看过我_团队看板">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>
</classes>
</test>
</suite>
<!-- 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