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 { ...@@ -14,5 +14,7 @@ public class LiveVisitor {
private String outLinkAppId; private String outLinkAppId;
private String resourceButtonTitle; private String resourceButtonTitle;
private String resourceSubTitle; private String resourceSubTitle;
private String testType; private String testType;
private boolean hasPasterOn;
private boolean hasConfPaster;
} }
...@@ -248,5 +248,14 @@ public interface Authorization { ...@@ -248,5 +248,14 @@ public interface Authorization {
System.out.println("用户AUTH_KEY:" + visitorAuth24); System.out.println("用户AUTH_KEY:" + visitorAuth24);
} }
/**
* 访客S(亦心)ID:96 实名
*/
default void visitorAuth25() {
network.agentCookies.put("authKey", visitorAuth25);
System.out.println("用户AUTH_KEY:" + visitorAuth25);
}
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -27,7 +27,7 @@ public class Customer implements Authorization { ...@@ -27,7 +27,7 @@ public class Customer implements Authorization {
Object list = response.jsonPath().getJsonObject("data.list"); Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(Params, BasicConfig.MOBILE_customerList, "未获取到中奖名单配置信息", response.body().asString())); Assert.assertNotNull(list, network.message(Params, BasicConfig.MOBILE_customerList, "未获取到中奖名单配置信息", response.body().asString()));
List<CustomerList>lists= JsonUtil.parseResponseToPageBean(response,CustomerList.class); 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 { ...@@ -78,7 +78,7 @@ public class Customer implements Authorization {
int customerNum=response.jsonPath().getInt("data.customerNum"); int customerNum=response.jsonPath().getInt("data.customerNum");
Assert.assertTrue(customerNum>26, network.message(BasicConfig.MOBILE_count, "总客户数量不对", response.body().asString())); Assert.assertTrue(customerNum>26, network.message(BasicConfig.MOBILE_count, "总客户数量不对", response.body().asString()));
int lastOneNewNum = response.jsonPath().getJsonObject("data.lastOneNewNum"); 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 { ...@@ -108,7 +108,6 @@ public class Customer implements Authorization {
System.out.println(response.body().asString()); System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data"); boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(BasicConfig.MOBILE_customerUpdate, "性别修改失败", response.body().asString())); Assert.assertTrue(data, network.message(BasicConfig.MOBILE_customerUpdate, "性别修改失败", response.body().asString()));
Map<String, Object> ageParam = new HashMap<>(); Map<String, Object> ageParam = new HashMap<>();
ageParam.put("customerId",customerId); ageParam.put("customerId",customerId);
ageParam.put("key",2); ageParam.put("key",2);
...@@ -117,7 +116,6 @@ public class Customer implements Authorization { ...@@ -117,7 +116,6 @@ public class Customer implements Authorization {
System.out.println(ageRes.body().asString()); System.out.println(ageRes.body().asString());
boolean data1=ageRes.jsonPath().getBoolean("data"); boolean data1=ageRes.jsonPath().getBoolean("data");
Assert.assertTrue(data1, network.message(BasicConfig.MOBILE_customerUpdate, "年龄修改失败", ageRes.body().asString())); Assert.assertTrue(data1, network.message(BasicConfig.MOBILE_customerUpdate, "年龄修改失败", ageRes.body().asString()));
Map<String, Object> professionalParam = new HashMap<>(); Map<String, Object> professionalParam = new HashMap<>();
professionalParam.put("customerId",customerId); professionalParam.put("customerId",customerId);
professionalParam.put("key",3); professionalParam.put("key",3);
...@@ -126,7 +124,6 @@ public class Customer implements Authorization { ...@@ -126,7 +124,6 @@ public class Customer implements Authorization {
System.out.println(professionalRes.body().asString()); System.out.println(professionalRes.body().asString());
boolean data2=professionalRes.jsonPath().getBoolean("data"); boolean data2=professionalRes.jsonPath().getBoolean("data");
Assert.assertTrue(data2, network.message(BasicConfig.MOBILE_customerUpdate, "职业修改失败", professionalRes.body().asString())); Assert.assertTrue(data2, network.message(BasicConfig.MOBILE_customerUpdate, "职业修改失败", professionalRes.body().asString()));
Map<String, Object> incomeParam = new HashMap<>(); Map<String, Object> incomeParam = new HashMap<>();
incomeParam.put("customerId",customerId); incomeParam.put("customerId",customerId);
incomeParam.put("key",4); incomeParam.put("key",4);
...@@ -135,7 +132,6 @@ public class Customer implements Authorization { ...@@ -135,7 +132,6 @@ public class Customer implements Authorization {
System.out.println(incomeRes.body().asString()); System.out.println(incomeRes.body().asString());
boolean data3=incomeRes.jsonPath().getBoolean("data"); boolean data3=incomeRes.jsonPath().getBoolean("data");
Assert.assertTrue(data3, network.message(BasicConfig.MOBILE_customerUpdate, "收入修改失败", incomeRes.body().asString())); Assert.assertTrue(data3, network.message(BasicConfig.MOBILE_customerUpdate, "收入修改失败", incomeRes.body().asString()));
Map<String, Object> addressParam = new HashMap<>(); Map<String, Object> addressParam = new HashMap<>();
addressParam.put("customerId",customerId); addressParam.put("customerId",customerId);
addressParam.put("key",5); addressParam.put("key",5);
...@@ -144,7 +140,6 @@ public class Customer implements Authorization { ...@@ -144,7 +140,6 @@ public class Customer implements Authorization {
System.out.println(addressRes.body().asString()); System.out.println(addressRes.body().asString());
boolean data4=addressRes.jsonPath().getBoolean("data"); boolean data4=addressRes.jsonPath().getBoolean("data");
Assert.assertTrue(data4, network.message(BasicConfig.MOBILE_customerUpdate, "所在地址修改失败", addressRes.body().asString())); Assert.assertTrue(data4, network.message(BasicConfig.MOBILE_customerUpdate, "所在地址修改失败", addressRes.body().asString()));
Map<String, Object> hobbyParam = new HashMap<>(); Map<String, Object> hobbyParam = new HashMap<>();
hobbyParam.put("customerId",customerId); hobbyParam.put("customerId",customerId);
hobbyParam.put("key",6); hobbyParam.put("key",6);
...@@ -153,7 +148,6 @@ public class Customer implements Authorization { ...@@ -153,7 +148,6 @@ public class Customer implements Authorization {
System.out.println(hobbyRes.body().asString()); System.out.println(hobbyRes.body().asString());
boolean data5=hobbyRes.jsonPath().getBoolean("data"); boolean data5=hobbyRes.jsonPath().getBoolean("data");
Assert.assertTrue(data5, network.message(BasicConfig.MOBILE_customerUpdate, "爱好修改失败", hobbyRes.body().asString())); Assert.assertTrue(data5, network.message(BasicConfig.MOBILE_customerUpdate, "爱好修改失败", hobbyRes.body().asString()));
Map<String, Object> insuranceParam = new HashMap<>(); Map<String, Object> insuranceParam = new HashMap<>();
insuranceParam.put("customerId",customerId); insuranceParam.put("customerId",customerId);
insuranceParam.put("key",7); insuranceParam.put("key",7);
...@@ -162,7 +156,6 @@ public class Customer implements Authorization { ...@@ -162,7 +156,6 @@ public class Customer implements Authorization {
System.out.println(insuranceRes.body().asString()); System.out.println(insuranceRes.body().asString());
boolean data6=insuranceRes.jsonPath().getBoolean("data"); boolean data6=insuranceRes.jsonPath().getBoolean("data");
Assert.assertTrue(data6, network.message(BasicConfig.MOBILE_customerUpdate, "保险意识强弱修改失败", hobbyRes.body().asString())); Assert.assertTrue(data6, network.message(BasicConfig.MOBILE_customerUpdate, "保险意识强弱修改失败", hobbyRes.body().asString()));
Map<String, Object> bartenderParam = new HashMap<>(); Map<String, Object> bartenderParam = new HashMap<>();
bartenderParam.put("customerId",customerId); bartenderParam.put("customerId",customerId);
bartenderParam.put("key",8); bartenderParam.put("key",8);
......
...@@ -6,6 +6,7 @@ import com.kjj.cases.admin.Authorization; ...@@ -6,6 +6,7 @@ import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.JsonUtil; import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
...@@ -26,6 +27,7 @@ public class LiveLater implements Authorization { ...@@ -26,6 +27,7 @@ public class LiveLater implements Authorization {
@Test(description="获取回收成功案例",priority = 1) @Test(description="获取回收成功案例",priority = 1)
public void 获取回收成功案例() { public void 获取回收成功案例() {
ThreadSleepUtils.sleep(100000);
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// params.put("liveId","Kj21MzYyNjM"); // params.put("liveId","Kj21MzYyNjM");
...@@ -62,13 +64,13 @@ public class LiveLater implements Authorization { ...@@ -62,13 +64,13 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
long allNum=response.jsonPath().getLong("data.allNum"); 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"); 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"); long oldCustomNum =response.jsonPath().getLong("data.oldCustomNum");
Assert.assertTrue(oldCustomNum==3, network.message(params, BasicConfig.MOBILE_ClueNum, "直接邀请线索数不对", response.body().asString())); Assert.assertTrue(oldCustomNum==3, network.message(params, BasicConfig.MOBILE_ClueNum, "直接邀请线索数不对", response.body().asString()));
long awardNum =response.jsonPath().getLong("data.awardNum"); 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"); boolean showAward =response.jsonPath().getBoolean("data.showAward");
Assert.assertTrue(showAward, network.message(params, BasicConfig.MOBILE_ClueNum, "未展示中奖tab", response.body().asString())); Assert.assertTrue(showAward, network.message(params, BasicConfig.MOBILE_ClueNum, "未展示中奖tab", response.body().asString()));
long submitFormNum =response.jsonPath().getLong("data.submitFormNum"); long submitFormNum =response.jsonPath().getLong("data.submitFormNum");
...@@ -106,7 +108,7 @@ public class LiveLater implements Authorization { ...@@ -106,7 +108,7 @@ public class LiveLater implements Authorization {
List<LiveUserList>lists= JsonUtil.parseResponseToPageBean(response,LiveUserList.class); List<LiveUserList>lists= JsonUtil.parseResponseToPageBean(response,LiveUserList.class);
this.liveUserId=lists; this.liveUserId=lists;
long totalCount =response.jsonPath().getLong("data.totalCount"); 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 { ...@@ -125,7 +127,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount"); 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 { ...@@ -142,7 +144,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount"); 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 { ...@@ -159,7 +161,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
long totalCount =response.jsonPath().getLong("data.totalCount"); 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 { ...@@ -223,7 +225,6 @@ public class LiveLater implements Authorization {
// params.put("liveId","Kj21MzYyNjM"); // params.put("liveId","Kj21MzYyNjM");
params.put("liveUserId",this.liveUserId.get(0).getLiveUserId()); params.put("liveUserId",this.liveUserId.get(0).getLiveUserId());
Response response = network.getResponse(params,BasicConfig.MOBILE_getClueDetail); Response response = network.getResponse(params,BasicConfig.MOBILE_getClueDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(response.body().asString()); System.out.println(response.body().asString());
int visitorInviteNum=response.jsonPath().getInt("data.visitorInviteNum"); int visitorInviteNum=response.jsonPath().getInt("data.visitorInviteNum");
Assert.assertTrue(visitorInviteNum==1, network.message(params, BasicConfig.MOBILE_getClueDetail, "访客邀请数不对", response.body().asString())); Assert.assertTrue(visitorInviteNum==1, network.message(params, BasicConfig.MOBILE_getClueDetail, "访客邀请数不对", response.body().asString()));
...@@ -248,7 +249,22 @@ public class LiveLater implements Authorization { ...@@ -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 获取回复建议() { public void 获取回复建议() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
...@@ -262,7 +278,7 @@ public class LiveLater implements Authorization { ...@@ -262,7 +278,7 @@ public class LiveLater implements Authorization {
} }
//需要校验返回结果 //需要校验返回结果
@Test(description="访客邀请列表",priority = 14) @Test(description="访客邀请列表",priority = 15)
public void public void
访客邀请列表() { 访客邀请列表() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
...@@ -279,7 +295,7 @@ public class LiveLater implements Authorization { ...@@ -279,7 +295,7 @@ public class LiveLater implements Authorization {
} }
@Test(description="备注客户姓名",priority = 15) @Test(description="备注客户姓名",priority = 16)
public void 备注客户姓名() { public void 备注客户姓名() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("remarkName","访客A"); params.put("remarkName","访客A");
...@@ -294,7 +310,7 @@ public class LiveLater implements Authorization { ...@@ -294,7 +310,7 @@ public class LiveLater implements Authorization {
//代理人首页已结束直播,查询待跟进线索数 //代理人首页已结束直播,查询待跟进线索数
@Test(description="查询待跟进线索数",priority = 16) @Test(description="查询待跟进线索数",priority = 17)
public void 查询待跟进线索数() { public void 查询待跟进线索数() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
...@@ -303,7 +319,7 @@ public class LiveLater implements Authorization { ...@@ -303,7 +319,7 @@ public class LiveLater implements Authorization {
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
System.out.println(data); System.out.println(data);
Integer clueCount =response.jsonPath().getInt("data.clueCount"); 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"); Integer notFollowedClueCount=response.jsonPath().getInt("data.notFollowedClueCount");
Assert.assertTrue(notFollowedClueCount>0, network.message(params, BasicConfig.MOBILE_clueNum, "未跟进线索数不对", response.body().asString())); Assert.assertTrue(notFollowedClueCount>0, network.message(params, BasicConfig.MOBILE_clueNum, "未跟进线索数不对", response.body().asString()));
......
...@@ -87,7 +87,7 @@ public class Reward implements Authorization { ...@@ -87,7 +87,7 @@ public class Reward implements Authorization {
System.out.println(data); System.out.println(data);
Integer allCount =response.jsonPath().getInt("data.allCount"); 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"); Integer signCount=response.jsonPath().getInt("data.signCount");
Assert.assertTrue(signCount==0, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString())); Assert.assertTrue(signCount==0, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString()));
...@@ -228,7 +228,7 @@ public class Reward implements Authorization { ...@@ -228,7 +228,7 @@ public class Reward implements Authorization {
System.out.println(data); System.out.println(data);
Integer allCount =response.jsonPath().getInt("data.allCount"); 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"); Integer signCount=response.jsonPath().getInt("data.signCount");
Assert.assertTrue(signCount==1, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString())); Assert.assertTrue(signCount==1, network.message(params, BasicConfig.MOBILE_head, "签收数量", response.body().asString()));
......
...@@ -20,19 +20,15 @@ import java.util.Map; ...@@ -20,19 +20,15 @@ import java.util.Map;
public class LiveVisitors implements Authorization public class LiveVisitors implements Authorization
{ {
public String confId_imageText;
public String confId_imagetext;
public String confId_form; public String confId_form;
public String confId_link; public String confId_link;
public String confId_test; public String confId_test;
public String confId_free; public String confId_free;
public String confid;
public int pushType;
public String id; public String id;
public List<ResourcePushList>PushList;
//************主播端************
//************主播端************
//************主播端************
/*助播端端权益列表*/ /*助播端端权益列表*/
@Test(description = "助播端权益列表", priority = 1) @Test(description = "助播端权益列表", priority = 1)
...@@ -43,11 +39,7 @@ public class LiveVisitors implements Authorization ...@@ -43,11 +39,7 @@ public class LiveVisitors implements Authorization
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_ResourceList); Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceList);
List<ResourcePushList> list = JsonUtil.parseResponseToListBean(response, ResourcePushList.class); List<ResourcePushList> list = JsonUtil.parseResponseToListBean(response, ResourcePushList.class);
ResourcePushList one=list.get(1); this.PushList=list;
confid=one.getConfId();
pushType=one.getPushType();
System.out.println(confid);
System.out.println(pushType);
System.out.println(list); System.out.println(list);
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ResourceList, "查询主播端权益列表失败", response.body().asString())); Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_ResourceList, "查询主播端权益列表失败", response.body().asString()));
...@@ -59,8 +51,8 @@ public class LiveVisitors implements Authorization ...@@ -59,8 +51,8 @@ public class LiveVisitors implements Authorization
{ {
adminAuth(); adminAuth();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("confId", confid); params.put("confId", this.PushList.get(1).getConfId());
params.put("pushType", pushType); params.put("pushType", this.PushList.get(1).getPushType());
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.postResponse(params, BasicConfig.MOBILE_ResourceOn); Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceOn);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -81,7 +73,7 @@ public class LiveVisitors implements Authorization ...@@ -81,7 +73,7 @@ public class LiveVisitors implements Authorization
List<LiveVisitor> liveVisitors = JsonUtil.parseResponseToListBean(response, LiveVisitor.class); List<LiveVisitor> liveVisitors = JsonUtil.parseResponseToListBean(response, LiveVisitor.class);
LiveVisitor one = liveVisitors.get(0); LiveVisitor one = liveVisitors.get(0);
System.out.println(one.getConfId()); System.out.println(one.getConfId());
confId_imagetext=one.getConfId(); confId_imageText=one.getConfId();
LiveVisitor two = liveVisitors.get(3); LiveVisitor two = liveVisitors.get(3);
System.out.println(two.getConfId()); System.out.println(two.getConfId());
confId_free=two.getConfId(); confId_free=two.getConfId();
...@@ -145,8 +137,8 @@ public class LiveVisitors implements Authorization ...@@ -145,8 +137,8 @@ public class LiveVisitors implements Authorization
{ {
adminAuth(); adminAuth();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("confId", confid); params.put("confId", this.PushList.get(1).getConfId());
params.put("pushType", pushType); params.put("pushType", this.PushList.get(1).getPushType());
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.postResponse(params, BasicConfig.MOBILE_ResourceOff); Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceOff);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -161,7 +153,7 @@ public class LiveVisitors implements Authorization ...@@ -161,7 +153,7 @@ public class LiveVisitors implements Authorization
visitorAuth(); visitorAuth();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("confId", confId_free); 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); Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceFindDetailByConfid);
ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class); ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class);
System.out.println(JSON.toJSONString(agentBeans)); System.out.println(JSON.toJSONString(agentBeans));
...@@ -282,7 +274,7 @@ public class LiveVisitors implements Authorization ...@@ -282,7 +274,7 @@ public class LiveVisitors implements Authorization
{ {
agentAuth(); agentAuth();
Map<String, Object> params = new HashMap<>(); 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())); params.put("liveid", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceFindDetailByConfid); Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceFindDetailByConfid);
ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class); ResourceFree agentBeans = JsonUtil.parseResponseToBean(response, ResourceFree.class);
...@@ -391,38 +383,80 @@ public class LiveVisitors implements Authorization ...@@ -391,38 +383,80 @@ public class LiveVisitors implements Authorization
fieldListparam.add(one); fieldListparam.add(one);
params.put("fieldList", fieldListparam); params.put("fieldList", fieldListparam);
System.out.println(JSONObject.toJSONString(params)); System.out.println(JSONObject.toJSONString(params));
Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceTestSubmit); Response response = network.postResponse(params, BasicConfig.MOBILE_ResourceTestSubmit);
System.out.println(JSONObject.toJSONString("公司业务员无法参与")); System.out.println(JSONObject.toJSONString("公司业务员无法参与"));
} }
//助播端查询已经添加过的权益列表 //助播端编辑权益
@Test(description = "助播端查询已经添加过的权益列表", priority = 23) @Test(description = "助播端编辑权益", priority = 23)
public void 助播端查询编辑的权益列表() public void 助播端编辑权益()
{ {
adminAuth(); adminAuth();
Map<String, Object> params = new HashMap<>(); 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("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("ids", confId_imageText);
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceEditList); Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceEditList);
ResourceEditList list = JsonUtil.parseResponseToBean(response, ResourceEditList.class); ResourceEditList list = JsonUtil.parseResponseToBean(response, ResourceEditList.class);
System.out.println(list); 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)
@Test(description = "助播端编辑权益", priority = 24) public void 上架贴片()
public void 助播端编辑权益()
{ {
adminAuth(); adminAuth();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("ids", confId_imagetext); params.put("confId", this.PushList.get(5).getConfId());
Response response = network.getResponse(params, BasicConfig.MOBILE_ResourceEditList); Response response = network.postResponse(params, BasicConfig.MOBILE_pasterOn);
ResourceEditList list = JsonUtil.parseResponseToBean(response, ResourceEditList.class); boolean data = response.jsonPath().getBoolean("data");
boolean data = response.jsonPath().getBoolean("success");
System.out.println(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()));
}
} }
...@@ -46,7 +46,7 @@ public class WinningRules implements Authorization { ...@@ -46,7 +46,7 @@ public class WinningRules implements Authorization {
public void 上传企业指定中奖名单() { public void 上传企业指定中奖名单() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("confId",confIdList.get(2).getConfId()); 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", "指定中奖名单"); Params.put("fileName", "指定中奖名单");
Response response = network.postResponse(Params, BasicConfig.MANAGER_import); Response response = network.postResponse(Params, BasicConfig.MANAGER_import);
taskId = response.jsonPath().getInt("data"); taskId = response.jsonPath().getInt("data");
...@@ -85,7 +85,7 @@ public class WinningRules implements Authorization { ...@@ -85,7 +85,7 @@ public class WinningRules implements Authorization {
public void 上传新的企业指定中奖名单() { public void 上传新的企业指定中奖名单() {
Map<String, Object> Params = new HashMap<>(); Map<String, Object> Params = new HashMap<>();
Params.put("confId",confIdList.get(2).getConfId()); 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", "指定中奖名单"); Params.put("fileName", "指定中奖名单");
Response response = network.postResponse(Params, BasicConfig.MANAGER_import); Response response = network.postResponse(Params, BasicConfig.MANAGER_import);
taskId = response.jsonPath().getInt("data"); taskId = response.jsonPath().getInt("data");
......
...@@ -398,7 +398,7 @@ public class LiveVistorRed implements Authorization { ...@@ -398,7 +398,7 @@ public class LiveVistorRed implements Authorization {
@Test(description = "访客H帮访客I助力", priority = 24) @Test(description = "访客H帮访客I助力", priority = 24)
public void 访客H帮访客I助力() public void 访客H帮访客I助力()
{ {
visitorAuth9(); visitorAuth3();
ThreadSleepUtils.sleep(2000); ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>(); Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......
...@@ -57,11 +57,11 @@ ...@@ -57,11 +57,11 @@
</classes> </classes>
</test> </test>
<!-- <test preserve-order="false" name="翻牌红包">--> <test preserve-order="false" name="翻牌集字红包">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>--> <class name="com.kjj.cases.live.flipCard.FlipCard"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<test preserve-order="true" name="中奖规则配置"> <test preserve-order="true" name="中奖规则配置">
<classes> <classes>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="集客助手" verbose="1" thread-count="3"> <suite name="集客助手" verbose="1" thread-count="3">
<!-- <test preserve-order="true" name="首页" >-->
<!-- <classes>--> <test preserve-order="true" name="支付">
<!-- <class name="com.kjj.qa.cases.Home"/>--> <classes>
<!-- </classes>--> <class name="com.kjj.cases.basics.Pay"/>
<!-- </test>--> </classes>
<!-- <test preserve-order="true" name="新手任务">--> </test>
<!-- <classes>--> <test preserve-order="true" name = "首页">
<!-- <class name="com.kjj.qa.cases.Novice"/>--> <classes>
<!-- </classes>--> <class name="com.kjj.cases.assistant.homePage"/>
<!-- </test>--> </classes>
<!-- <test preserve-order="true" name="支付">--> </test>
<!-- <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="我的名片"> <test preserve-order="true" name="我的名片">
<classes> <classes>
<class name="com.kjj.cases.assistant.card.PersonCard"/> <class name="com.kjj.cases.assistant.card.PersonCard"/>
...@@ -51,16 +22,22 @@ ...@@ -51,16 +22,22 @@
<class name="com.kjj.cases.assistant.card.ArticalPersonCard"/> <class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="营销工具-贺卡"> <test preserve-order="true" name = "种草素材">
<classes> <classes>
<class name="com.kjj.cases.assistant.markettools.greetingCrad"/> <class name="com.kjj.cases.assistant.RecommendMaterial"/>
</classes> </classes>
</test> </test>
<!-- <test preserve-order="true" name = "种草素材">--> <test preserve-order="true" name = "今日早报">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.assistant.RecommendMaterial"/>--> <class name="com.kjj.cases.assistant.DailyPaper"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<test preserve-order="true" name = "谁看过我_团队看板">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>
</classes>
</test>
</suite> </suite>
<!-- 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