Commit 089fbef0 authored by 吕雯燕's avatar 吕雯燕

Merge branch 'duiba_wenyan'

parents 1e082cc2 6f3ce47f
......@@ -86,18 +86,23 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
case 1:
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"10元话费","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"1000","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.duiba.com.cn/developer/img/phonebilldingzhi10/telephone_charge_breviary.jpg","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"支付宝充值","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"100000","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201610/txqn3qz6o9.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"【自动化勿动】兑吧新实物","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"300","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.dui88.com/images/201904/dkk6pttatj.jpg","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].title"),"【自动化勿动】兑吧卡密跳转按钮","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].customCredits"),"200","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].smallImage"),"//yun.dui88.com/images/201904/pz4d6hof6w.jpg","校验第四个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].title"),"【自动化勿动】兑吧新优惠券普通券码跳转","校验第五个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].customCredits"),"100","校验第五个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].smallImage"),"//yun.dui88.com/images/201903/ibdef09gw3.png","校验第五个商品smallImage失败");
logger.info("校验商品分组1-兑吧商品成功");
break;
......@@ -105,15 +110,19 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
case 2:
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"【自动化勿动】自有卡密","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"550","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.dui88.com/images/201904/ug1ovw21ys.jpg","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"【自动化勿动】自有充值商品","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"300","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201904/zhrc72q09p.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"【自动化勿动】自有新实物加钱购","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"150","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.dui88.com/images/201904/fzlunc5ji4.jpg","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].title"),"【自动化勿动】自有新优惠券跳转链接","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].customCredits"),"100","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].smallImage"),"//yun.dui88.com/images/201904/ic2vqnu3x0.jpg","校验第四个商品smallImage失败");
logger.info("校验商品分组2-自有商品成功");
break;
......@@ -147,18 +156,23 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
case 1:
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"【勿动】兑吧优惠券共享库存测试","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"140","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.dui88.com/images/201807/79r9bwt2my.png","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"【自动化勿动】兑吧实物日期兑换限制进行中","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"700","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201806/28m2esmi0d.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"5元话费","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"3500","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.duiba.com.cn/images/5ayvpsoncj.jpg","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].title"),"Q币充值","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].customCredits"),"700","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].smallImage"),"//yun.dui88.com/images/201610/9qawkmx7eh.jpg","校验第四个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].title"),"支付宝充值","校验第五个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].customCredits"),"1000","校验第五个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].smallImage"),"//yun.dui88.com/images/201610/txqn3qz6o9.jpg","校验第五个商品smallImage失败");
logger.info("校验商品分组1-兑吧商品成功");
break;
......@@ -166,12 +180,15 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
case 2:
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"【自动化勿动】自有虚拟商品","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"1000","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.dui88.com/images/201904/n71mi1ixwf.gif","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"【自动化勿动】自有实物","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"200","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201904/a410736wql.gif","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"【自动化勿动】自有优惠券","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"100","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.dui88.com/images/201904/5h0skt3nqp.png","校验第三个商品smallImage失败");
logger.info("校验商品分组2-自有商品成功");
break;
......@@ -205,18 +222,23 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
//手机端接口排序与前端不一致
Assert.assertEquals(response.jsonPath().getString("data.list[0].title"),"【自动化勿动】兑吧新优惠券普通券码跳转","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[0].titleDownTxt"),"100积分","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[0].smallImage"),"//yun.dui88.com/images/201903/ibdef09gw3.png","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].title"),"【自动化勿动】兑吧卡密跳转按钮","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].titleDownTxt"),"200积分","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].smallImage"),"//yun.dui88.com/images/201904/pz4d6hof6w.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].title"),"【自动化勿动】兑吧新实物","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].titleDownTxt"),"300积分","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].smallImage"),"//yun.dui88.com/images/201904/dkk6pttatj.jpg","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].title"),"支付宝充值","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].titleDownTxt"),"10万积分","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].smallImage"),"//yun.dui88.com/images/201610/txqn3qz6o9.jpg","校验第四个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[4].title"),"10元话费","校验第五个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[4].titleDownTxt"),"1000积分","校验第五个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[4].smallImage"),"//yun.duiba.com.cn/developer/img/phonebilldingzhi10/telephone_charge_breviary.jpg","校验第五个商品smallImage失败");
logger.info("校验商品分组1-兑吧新商品成功");
break;
......@@ -224,15 +246,19 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
case 2:
Assert.assertEquals(response.jsonPath().getString("data.list[0].title"),"【自动化勿动】自有新优惠券跳转链接","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[0].titleDownTxt"),"100积分","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[0].smallImage"),"//yun.dui88.com/images/201904/ic2vqnu3x0.jpg","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].title"),"【自动化勿动】自有新实物加钱购","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].titleDownTxt"),"150积分 + 10.00元","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[1].smallImage"),"//yun.dui88.com/images/201904/fzlunc5ji4.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].title"),"【自动化勿动】自有充值商品","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].titleDownTxt"),"300积分","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[2].smallImage"),"//yun.dui88.com/images/201904/zhrc72q09p.jpg","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].title"),"【自动化勿动】自有卡密","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].titleDownTxt"),"550积分","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.list[3].smallImage"),"//yun.dui88.com/images/201904/ug1ovw21ys.jpg","校验第四个商品smallImage失败");
logger.info("校验商品分组2-自有新商品成功");
break;
......@@ -318,4 +344,5 @@ public class 商品分组组件_DuibaTest extends DuibaTestBase {
}
package http.cases.VisualEditorTest;
import base.Config;
import base.DuibaLog;
import base.DuibaTestBase;
import http.cases.ExchangeTest.Database;
import http.service.hd.DevItemNewService;
import http.service.app.ChwVisualEditorService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import utils.PublicMethod;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import http.service.Authorization;
/**
* created by lvwenyan 2019/8/7
*/
public class 商品组件_DuibaTest extends DuibaTestBase{
@Autowired
DevItemNewService devItemNewService;
@Autowired
Authorization authorization;
@Test(description = "后台商品组件新商品展示")
public void 后台商品组件新商品() throws Exception{
Map cookies = authorization.hdLoginCommonNew("15855555555");
String appId = "22561";
List<Integer> itemIdList = new ArrayList<>();
itemIdList.add(195113);
itemIdList.add(195112);
itemIdList.add(194709);
itemIdList.add(195109);
itemIdList.add(195116);
itemIdList.add(195115);
itemIdList.add(194962);
itemIdList.add(196218);
Response response = devItemNewService.appItems(cookies,appId,itemIdList);
response.prettyPrint();
//校验兑吧商品
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"10元话费","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"1000","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].facePrice"),"0.0","校验第一个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.duiba.com.cn/developer/img/phonebilldingzhi10/telephone_charge_breviary.jpg","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"支付宝充值","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"100000","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].facePrice"),"0.0","校验第二个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201610/txqn3qz6o9.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"【自动化勿动】兑吧新优惠券普通券码跳转","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"100","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].facePrice"),"100.0","校验第三个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.dui88.com/images/201903/ibdef09gw3.png","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].title"),"【自动化勿动】兑吧新实物","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].customCredits"),"300","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].facePrice"),"300.0","校验第四个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].smallImage"),"//yun.dui88.com/images/201904/dkk6pttatj.jpg","校验第四个商品smallImage失败");
logger.info("校验后台商品组件兑吧商品展示成功");
//校验自有商品
Assert.assertEquals(response.jsonPath().getString("data.rows[4].title"),"【自动化勿动】自有卡密","校验第五个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].customCredits"),"550","校验第五个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].facePrice"),"200.0","校验第五个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].smallImage"),"//yun.dui88.com/images/201904/ug1ovw21ys.jpg","校验第五个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].title"),"【自动化勿动】自有充值商品","校验第六个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].customCredits"),"300","校验第六个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].facePrice"),"50.0","校验第六个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].smallImage"),"//yun.dui88.com/images/201904/zhrc72q09p.jpg","校验第六个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].title"),"【自动化勿动】自有新优惠券跳转链接","校验第七个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].customCredits"),"100","校验第七个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].facePrice"),"100.0","校验第七个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].smallImage"),"//yun.dui88.com/images/201904/ic2vqnu3x0.jpg","校验第七个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[7].title"),"【自动化勿动】自有实物sku","校验第八个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[7].customCredits"),"100","校验第八个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[7].facePrice"),"100.0","校验第八个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[7].smallImage"),"//yun.dui88.com/images/201906/9p72lmu1qn.jpg","校验第八个商品smallImage失败");
logger.info("校验后台商品组件自有商品展示成功");
}
@Test(description = "后台商品组件老商品展示")
public void 后台商品组件老商品() throws Exception{
Map cookies = authorization.hdLoginCommonNew("15833333333");
String appId = "22542";
List<Integer> itemIdList = new ArrayList<>();
itemIdList.add(195485);
itemIdList.add(191895);
itemIdList.add(195487);
itemIdList.add(195486);
itemIdList.add(195490);
itemIdList.add(195488);
itemIdList.add(195489);
Response response = devItemNewService.appItems(cookies,appId,itemIdList);
response.prettyPrint();
//校验兑吧商品
Assert.assertEquals(response.jsonPath().getString("data.rows[0].title"),"5元话费","校验第一个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].customCredits"),"3500","校验第一个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].facePrice"),"0.0","校验第一个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[0].smallImage"),"//yun.duiba.com.cn/images/5ayvpsoncj.jpg","校验第一个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].title"),"支付宝充值","校验第二个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].customCredits"),"1000","校验第二个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].facePrice"),"0.0","校验第二个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[1].smallImage"),"//yun.dui88.com/images/201610/txqn3qz6o9.jpg","校验第二个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].title"),"【勿动】兑吧优惠券共享库存测试","校验第三个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].customCredits"),"140","校验第三个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].facePrice"),"100.0","校验第三个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[2].smallImage"),"//yun.dui88.com/images/201807/79r9bwt2my.png","校验第三个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].title"),"【自动化勿动】兑吧实物日期兑换限制进行中","校验第四个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].customCredits"),"700","校验第四个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].facePrice"),"10.0","校验第四个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[3].smallImage"),"//yun.dui88.com/images/201806/28m2esmi0d.jpg","校验第四个商品smallImage失败");
logger.info("校验后台商品组件兑吧商品展示成功");
//校验自有商品
Assert.assertEquals(response.jsonPath().getString("data.rows[4].title"),"【自动化勿动】自有虚拟商品","校验第五个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].customCredits"),"1000","校验第五个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].facePrice"),"222.0","校验第五个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[4].smallImage"),"//yun.dui88.com/images/201904/n71mi1ixwf.gif","校验第五个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].title"),"【自动化勿动】自有优惠券","校验第六个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].customCredits"),"100","校验第六个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].facePrice"),"1.0","校验第六个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[5].smallImage"),"//yun.dui88.com/images/201904/5h0skt3nqp.png","校验第六个商品smallImage失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].title"),"【自动化勿动】自有实物","校验第七个商品title失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].customCredits"),"200","校验第七个商品credits失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].facePrice"),"122.0","校验第七个商品facePrice失败");
Assert.assertEquals(response.jsonPath().getString("data.rows[6].smallImage"),"//yun.dui88.com/images/201904/a410736wql.gif","校验第七个商品smallImage失败");
logger.info("校验后台商品组件自有商品展示成功");
}
}
......@@ -127,6 +127,41 @@ public class DevItemNewService {
}
//商品组件
public Response appItems(Map cookies, String appId, List<Integer> itemIdList) throws Exception{
String url = hdserverHost + "/devItemNew/appItems";
Map<String,Object> map = new HashMap<>();
map.put("status","on");
map.put("pageSize","300");
map.put("appId",appId);
map.put("pageNo","1");
map.put("itemIdList",itemIdList);
map.put("sort","custom");
map.put("soldOutType","show");
map.put("forGoodsVisual","true");
logger.info("请求商品组件接口:"+ "/devItemNew/appItems");
Response response = given().contentType("application/json;charset=UTF-8").cookies(cookies).params(map).get("http://" + url);
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true");
}catch(Exception e){
throw new Exception("/devItemNew/appItems接口返回异常,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/devItemNew/appItems接口返回异常,返回信息:"+response.asString());
}
return response;
}
......
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