Commit 5ae0afcc authored by 龚小红's avatar 龚小红

修改部分接口规范名,修改了我的名片-选择公司,增加了营销工具首页、贺卡首页的接口测试用例

parent d7339e21
package com.kjj.cases.basics.card;
package com.kjj.cases.assistant.card;
import static com.kjj.config.BasicConfig.*;
import static com.kjj.utils.ThreadSleepUtils.sleep;
......@@ -101,7 +101,7 @@ public class ArticalPersonCard implements Authorization {
@Test(description="代理人_头部名片详情",priority = 7)
public void 代理人_头部名片详情(){
//获取加密的销售ID
sleep(1000);
sleep(5000);
Response response = network.getResponse(USER_INFO);
sid = response.jsonPath().getString("data.encodeSellerId");
String sellerName = response.jsonPath().getString("data.sellerName");
......@@ -201,7 +201,7 @@ public class ArticalPersonCard implements Authorization {
//切换为访客
userTku();
sleep(1000);
sleep(2000);
Map<String, Object> params = new HashMap<String, Object>();
params.put("scid",scid);//代理人的scid
params.put("cancelPush",false);
......
package com.kjj.cases.basics;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -32,17 +31,17 @@ public class GreetingCard {
// BANNER
@Test(description="BANNER",priority = 1)
public void BANNER() throws IOException {
Response response = network.getResponse(GREETING_BANNER);
Response response = network.getResponse(GREETING_banner);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_BANNER,"获取Banner列表失败",response.body().asString()));
Assert.assertTrue(hasList,network.message(GREETING_banner,"获取Banner列表失败",response.body().asString()));
}
// 转发最多
@Test(description="大家都在发",priority = 2)
public void 大家都在发() throws IOException {
Response response = network.getResponse(GREETING_ALLFORWARD);
Response response = network.getResponse(GREETING_allForward);
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_ALLFORWARD,"获取大家都在发列表失败",response.body().asString()));
Assert.assertTrue(hasList,network.message(GREETING_allForward,"获取大家都在发列表失败",response.body().asString()));
}
// 贺卡tab
......@@ -51,10 +50,10 @@ public class GreetingCard {
Map<String, Object> params = new HashMap<String, Object>();
params.put("tagType","greeting_card");
params.put("exclusiveArea",0);
Response response = network.getResponse(params,GREETING_FINDBYTYPE);
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失败",response.body().asString()));
Assert.assertEquals(totalCount,3,network.message(params, GREETING_findByType,"获取贺卡tab失败",response.body().asString()));
}
// 获取539的贺卡列表
......@@ -65,11 +64,11 @@ public class GreetingCard {
params.put("pageSize", 10);
params.put("type",6);
params.put("tag1Id",tagId);
Response response = network.getResponse(params,GREETING_PAGELIST);
Response response = network.getResponse(params, GREETING_pageList);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
contentId = response.jsonPath().getString("data.list[0].id");
greetingName = response.jsonPath().getString("data.list[0].title");
Assert.assertTrue(hasList,network.message(params,GREETING_PAGELIST,"获取贺卡tab失败",response.body().asString()));
Assert.assertTrue(hasList,network.message(params, GREETING_pageList,"获取贺卡tab失败",response.body().asString()));
}
// 贺卡详情页
......
......@@ -598,16 +598,16 @@ public class BasicConfig {
// *************** 名片 ***************
public static final String SELLERCARD_TOPOFDETAIL = HOST + "/kjy/mp/sellerCardV5/topOfDetail";
public static final String SELLERCARD_EDITBASEINFO = HOST + "/kjy/mp/sellerCard/editBaseInfo";
public static final String SELLERCARD_PERSONALPROFILE = HOST + "/kjy/mp/sellerCardV5/personalProfile";
public static final String SELLERCARD_EDITMAJORGOODAUTH = HOST + "/kjy/mp/sellerCard/editMajorGoodAuth";
public static final String SELLERCARD_APPRAISELISTNEW = HOST + "/kjy/mp/sellerCardV5/appraiseListNew";
public static final String SELLERCARD_GETQUESTIONS = HOST + "/kjy/mp/sellerCardV5/getQuestions";
public static final String SELLERCARD_ISDISPLAYACTIVITY = HOST + "/kjy/mp/clue/activity/isDisplayActivity";
public static final String SELLERCARD_COMPANYLIST = HOST + "/kjy/mp/company/list";
public static final String SELLERCARD_SELLERCARDCASENEW = HOST + "/kjy/mp/sellerCardV5/sellerCardCasesList";
public static final String SELLERCARD_PRODUCTLIST = HOST + "/kjy/mp/sellerCardV5/productList";
public static final String SELLERCARD_topOfDetail = HOST + "/kjy/mp/sellerCardV5/topOfDetail";
public static final String SELLERCARD_editBaseInfo = HOST + "/kjy/mp/sellerCard/editBaseInfo";
public static final String SELLERCARD_personalProfile = HOST + "/kjy/mp/sellerCardV5/personalProfile";
public static final String SELLERCARD_editMajorGoodAuth = HOST + "/kjy/mp/sellerCard/editMajorGoodAuth";
public static final String SELLERCARD_appraiseListNew = HOST + "/kjy/mp/sellerCardV5/appraiseListNew";
public static final String SELLERCARD_getQuestions = HOST + "/kjy/mp/sellerCardV5/getQuestions";
public static final String SELLERCARD_isDisplayActivity = HOST + "/kjy/mp/clue/activity/isDisplayActivity";
public static final String SELLERCARD_companyList = HOST + "/kjy/mp/company/list";
public static final String SELLERCARD_sellerCardCasesList = HOST + "/kjy/mp/sellerCardV5/sellerCardCasesList";
public static final String SELLERCARD_productList = HOST + "/kjy/mp/sellerCardV5/productList";
public static final String SELLERCARD_GETSELLERCARDCONFIG = HOST + "/kjy/mp/sellerConfig/getSellerCardConfig";
public static final String SELLERCARD_GETSELLERCARDSTYLE = HOST + "/kjy/mp/sellerConfig/getSellerCardStyle";
public static final String SELLERCARD_TOPOFCONTENT = HOST + "/kjy/mp/sellerCardV5/topOfContent";
......@@ -724,15 +724,27 @@ public class BasicConfig {
// *************** 贺卡 ***************
public static final String GREETING_BANNER = HOST + "/kjy/mp/greeting/banner";
public static final String GREETING_ALLFORWARD = HOST + "/kjy/mp/greeting/allForward";
public static final String GREETING_FINDBYTYPE = HOST + "/kjy/mp/tag/findByType";
public static final String GREETING_PAGELIST = HOST + "/kjy/mp/greeting/pageList";
public static final String GREETING_banner = HOST + "/kjy/mp/greeting/banner";
public static final String GREETING_allForward = HOST + "/kjy/mp/greeting/allForward";
public static final String GREETING_findByType = HOST + "/kjy/mp/tag/findByType";
public static final String GREETING_pageList = HOST + "/kjy/mp/greeting/pageList";
public static final String GREETING_CONFLIST = HOST + "/kjy/mp/greeting/conf/list";
public static final String GREETING_H5SHARE = ACTIVITY_HOST + "/kjy/mp/greeting/conf/h5share";
public static final String GREETING_H5INFO = ACTIVITY_HOST + "/kjy/mp/content/h5info";
public static final String GREETING_SAVEDEFAULT = ACTIVITY_HOST + "/kjy/mp/greeting/conf/saveDefault";
public static final String GREETING_getTipsByPage = HOST + "/kjy/mp/tips/getTipsByPage";
public static final String GREETING_getMarketingToolArea = HOST + "/kjy/mp/home/getMarketingToolArea";
public static final String GREETING_answerPageList = HOST + "/kjy/mp/game/answerPageList";
public static final String GREETING_getSellerVipInfo = HOST + "/kjy/mp/seller/getSellerVipInfo";
public static final String GREETING_checkVisitor = HOST + "/kjy/mp/greeting/checkVisitor";
public static final String GREETING_oaSubscribeType = HOST + "/kjy/mp/user/oaSubscribeType";
public static final String GREETING_check = ACTIVITY_HOST + "/kjy/mp/greeting/conf/check";
public static final String GREETING_preView = ACTIVITY_HOST + "/kjy/mp/greeting/preView";
public static final String GREETING_isRedpackEnable = ACTIVITY_HOST + "/kjy/mp/greeting/packet/isRedpackEnable";
public static final String GREETING_self = ACTIVITY_HOST + "/kjy/mp/seller/self";
public static final String GREETING_getInfoByScid = ACTIVITY_HOST + "/kjy/mp/seller/getInfoByScid";
public static final String GREETING_checkLimit = ACTIVITY_HOST + "/kjy/mp/greeting/conf/checkLimit";
public static final String GREETING_more = ACTIVITY_HOST + "/kjy/mp/greeting/more";
// *************** 管理后台 ***************
......
......@@ -11,51 +11,56 @@
<!-- <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.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.card.PersonCard"/>
<class name="com.kjj.cases.assistant.card.PersonCard"/>
</classes>
</test>
<test preserve-order="true" name="文章中个人名片">
<classes>
<class name="com.kjj.cases.basics.card.ArticalPersonCard"/>
<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.RecommendMaterial"/>
<class name="com.kjj.cases.assistant.markettools.greetingCrad"/>
</classes>
</test>
<!-- <test preserve-order="true" name = "种草素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.RecommendMaterial"/>-->
<!-- </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