Commit 78e8c0bb authored by Su-Yi's avatar Su-Yi

新增贺卡、修改tku

parent f5a32d69
...@@ -21,6 +21,7 @@ import static com.kjj.qa.config.BasicConfig.BOSS_USERINFO; ...@@ -21,6 +21,7 @@ import static com.kjj.qa.config.BasicConfig.BOSS_USERINFO;
public class Boss { public class Boss {
private static final NetworkUtil network = NetworkUtil.getInstance(); private static final NetworkUtil network = NetworkUtil.getInstance();
String sellerId = ""; String sellerId = "";
String usellerId =""; String usellerId ="";
String sids =""; String sids ="";
......
package com.kjj.qa.cases;
import com.kjj.qa.utils.NetworkUtil;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.*;
public class GreetingCard {
private static final NetworkUtil network = NetworkUtil.getInstance();
int tagId = 0;
String contentId = "";
@BeforeClass
public void setUp() {
}
// BANNER
@Test(description="BANNER",priority = 1)
public void BANNER() throws IOException {
Response response = network.getResponse(GREETING_BANNER);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_BANNER,"获取Banner列表失败"));
}
// 转发最多
@Test(description="大家都在发",priority = 2)
public void 大家都在发() throws IOException {
Response response = network.getResponse(GREETING_ALLFORWARD);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_ALLFORWARD,"获取大家都在发列表失败"));
}
// 贺卡tab
@Test(description="贺卡tab",priority = 3)
public void 贺卡tab() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("tagType","greeting_card");
params.put("exclusiveArea",0);
Response response = network.getResponse(params,GREETING_FINDBYTYPE);
int totalCount = response.jsonPath().getInt("data.list.size()");
tagId = response.jsonPath().getInt("data.list[-1].id");
Assert.assertEquals(totalCount,3,network.message(params,GREETING_FINDBYTYPE,"获取贺卡tab失败"));
}
// 获取539的贺卡列表
@Test(description="生日tab贺卡列表",priority = 3)
public void 生日tab贺卡列表() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex", 1);
params.put("pageSize", 10);
params.put("type",6);
params.put("tag1Id",tagId);
Response response = network.getResponse(params,GREETING_PAGELIST);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
contentId = response.jsonPath().getString("data.list[0].id");
Assert.assertTrue(hasList,network.message(params,GREETING_PAGELIST,"获取贺卡tab失败"));
}
// 我送出的贺卡列表
@Test(description="我送出的贺卡列表",priority = 3)
public void 我送出的贺卡列表() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex", 1);
params.put("pageSize", 10);
Response response = network.getResponse(params,GREETING_CONFLIST);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
Assert.assertFalse(hasList,network.message(params,GREETING_CONFLIST,"获取我的贺卡初始列表数量有误"));
}
@AfterClass
public static void tearDown(){
apiCount += 5;
}
}
...@@ -146,7 +146,7 @@ public class SellerCard { ...@@ -146,7 +146,7 @@ public class SellerCard {
params.put("scid", scid); params.put("scid", scid);
Response response = network.getResponse(params, SELLERCARD_ISDISPLAYACTIVITY); Response response = network.getResponse(params, SELLERCARD_ISDISPLAYACTIVITY);
String contentId = response.jsonPath().getString("data.contentId");//写死风险评测id String contentId = response.jsonPath().getString("data.contentId");//写死风险评测id
Assert.assertEquals(contentId, "Kj21MzY5OTk", network.message(params, SELLERCARD_ISDISPLAYACTIVITY,"风险评测-获取失败")); Assert.assertEquals(contentId, "Kj21Mzc0NzE", network.message(params, SELLERCARD_ISDISPLAYACTIVITY,"风险评测-获取失败"));
} }
// //
...@@ -156,7 +156,7 @@ public class SellerCard { ...@@ -156,7 +156,7 @@ public class SellerCard {
params.put("pageIndex", 1); params.put("pageIndex", 1);
params.put("pageSize", 200); params.put("pageSize", 200);
Response response = network.getResponse(params, SELLERCARD_COMPANYLIST); Response response = network.getResponse(params, SELLERCARD_COMPANYLIST);
String companyId = response.jsonPath().getString("data.list.find {it.companyName == '杭州兑吧网络科技有限公司'}.id"); String companyId = response.jsonPath().getString("data.list.find {it.companyName == '太平洋保险'}.id");
Assert.assertNotNull(companyId, network.message(params, SELLERCARD_COMPANYLIST,"公司列表-获取失败")); Assert.assertNotNull(companyId, network.message(params, SELLERCARD_COMPANYLIST,"公司列表-获取失败"));
......
...@@ -6,11 +6,11 @@ public class BasicConfig { ...@@ -6,11 +6,11 @@ public class BasicConfig {
// *************** 配置信息,每次重新配置以下信息就ok *************** // *************** 配置信息,每次重新配置以下信息就ok ***************
// 是否推送 // 是否推送
public static final boolean isPushReport = false; //true public static final boolean isPushReport = true; //true
// 用户微信昵称 // 用户微信昵称
public static final String WECHAT_NAME = "小疙瘩人寿"; //true public static final String WECHAT_NAME = "小疙瘩人寿"; //true
// 用户tku // 用户tku
public static final String AGENT_TKU = "T3gM31f18jAW2PVEuxwPreHo8jGtZ4RXgxzf6auDUuycYgcqWT9RW2qrbYKFVpTCj4yhhp9BfQ6RDrgfYK"; public static final String AGENT_TKU = "T3gM31f18jAWCm8UgfhkgUGK6keS7psk3kRcFaD3xYNRpmGEK2sydf3d6vD6vzJzcwuQW844ndqTRHq7mX";
// *************** 钉钉机器人 *************** // *************** 钉钉机器人 ***************
// 线上-告警群 // 线上-告警群
...@@ -18,6 +18,7 @@ public class BasicConfig { ...@@ -18,6 +18,7 @@ public class BasicConfig {
// 测试 // 测试
// public static final String DINGTALKPATH = "https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd"; // public static final String DINGTALKPATH = "https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd";
// *************** 客集集域名 *************** // *************** 客集集域名 ***************
public static final String HOST = "https://kjj.m.duibatest.com.cn"; public static final String HOST = "https://kjj.m.duibatest.com.cn";
...@@ -29,6 +30,7 @@ public class BasicConfig { ...@@ -29,6 +30,7 @@ public class BasicConfig {
// *************** TKU *************** // *************** TKU ***************
public static final String VISITOR_TKU = "T3gM31f18jAW2hicRDxbwHFSuwA4MMVLLeHZ5G4yvb3kN3GLCWAGnZVPFsnr6i8exgC4uYrYUctn4qheph"; public static final String VISITOR_TKU = "T3gM31f18jAW2hicRDxbwHFSuwA4MMVLLeHZ5G4yvb3kN3GLCWAGnZVPFsnr6i8exgC4uYrYUctn4qheph";
// *************** 素材ID *************** // *************** 素材ID ***************
public static final String ARTICLE_CONTENTID = "Kj21NjM4NDc"; public static final String ARTICLE_CONTENTID = "Kj21NjM4NDc";
...@@ -158,6 +160,7 @@ public class BasicConfig { ...@@ -158,6 +160,7 @@ public class BasicConfig {
public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = "/kjy/mp/explosioncontent/getExplosionContentList"; public static final String ARTICLE_GETEXPLOSIONCONTENTLIST = "/kjy/mp/explosioncontent/getExplosionContentList";
// ************** 发圈素材 *************** // ************** 发圈素材 ***************
public static final String FRIENDS_GETMATERIALTAGS = "/kjy/mp/materialContent/getmaterialTags"; public static final String FRIENDS_GETMATERIALTAGS = "/kjy/mp/materialContent/getmaterialTags";
...@@ -189,11 +192,6 @@ public class BasicConfig { ...@@ -189,11 +192,6 @@ public class BasicConfig {
// ************** 设置中心 *************** // ************** 设置中心 ***************
public static final String SELLERCONFIG_EDITCONFIG = "/kjy/mp/sellerConfig/editConfig"; public static final String SELLERCONFIG_EDITCONFIG = "/kjy/mp/sellerConfig/editConfig";
// ************************* 管理后台 **************************
public static final String TESTUSER_DISABLEUSER = "kjj-mng.duibatest.com.cn/kjy/manager/testUser/disableUser";
// ************** BOSS看板 *************** // ************** BOSS看板 ***************
public static final String BOSS_VERSIONINFO = "/kjy/mp/version/info"; public static final String BOSS_VERSIONINFO = "/kjy/mp/version/info";
...@@ -213,11 +211,31 @@ public class BasicConfig { ...@@ -213,11 +211,31 @@ public class BasicConfig {
public static final String BOSS_MEMBER = "/kjy/mp/seller/team/member"; public static final String BOSS_MEMBER = "/kjy/mp/seller/team/member";
// 管理后台
// *************** 贺卡 ***************
public static final String GREETING_BANNER = "/kjy/mp/greeting/banner";
public static final String GREETING_SHOW = "/kjy/mp/seller/parctice/show";
public static final String GREETING_ALLFORWARD = "/kjy/mp/greeting/allForward";
public static final String GREETING_FINDBYTYPE = "/kjy/mp/tag/findByType";
public static final String GREETING_GETTIPSBYPAGE = "/kjy/mp/tips/getTipsByPage";
public static final String GREETING_SHOWLAYER = "/kjy/mp/festival/showLayer";
public static final String GREETING_PAGELIST = "/kjy/mp/greeting/pageList";
public static final String GREETING_CONFLIST = "/kjy/mp/greeting/conf/list";
// *************** 管理后台 ***************
public static final String SSO_DOLOGIN = "/doLogin"; public static final String SSO_DOLOGIN = "/doLogin";
public static final String SSO_INDEX = "/sso/ssoIndex"; public static final String SSO_INDEX = "/sso/ssoIndex";
public static final String TESTUSER_DISABLEUSER = "kjj-mng.duibatest.com.cn/kjy/manager/testUser/disableUser";
public static final String MANAGER_AUTH = "/auth/getAuthList"; public static final String MANAGER_AUTH = "/auth/getAuthList";
public static final String MANAGER_CHANGECOMPANY = "/kjy/manager/seller/changeCompany"; public static final String MANAGER_CHANGECOMPANY = "/kjy/manager/seller/changeCompany";
...@@ -227,4 +245,5 @@ public class BasicConfig { ...@@ -227,4 +245,5 @@ public class BasicConfig {
public static final String MANAGER_SETINTERALSELLER = "/kjy/manager/seller/setInternalSeller"; public static final String MANAGER_SETINTERALSELLER = "/kjy/manager/seller/setInternalSeller";
public static final String MANAGER_ADMININFO = "/kjy/manager/admin/info"; public static final String MANAGER_ADMININFO = "/kjy/manager/admin/info";
} }
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<class name="com.kjj.qa.cases.Boss"/> <class name="com.kjj.qa.cases.Boss"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="贺卡">
<classes>
<class name="com.kjj.qa.cases.GreetingCard"/>
</classes>
</test>
<!-- 监听器--> <!-- 监听器-->
<listeners> <listeners>
<listener class-name="com.kjj.qa.config.ExtentTestNGIReporterListener"/> <listener class-name="com.kjj.qa.config.ExtentTestNGIReporterListener"/>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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