Commit 327133ba authored by 吕雯燕's avatar 吕雯燕

lv

parent f349709b
......@@ -446,29 +446,66 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test(description = "新实物确认下单页面")
public void 实物确认下单测试() throws Exception{
String appItemId = "196218";
String appSkuId = "145";
Response response = gawService.confirmItemDetail(uid,appItemId,appSkuId);
response.prettyPrint();
@Test(description = "新实物用户id篡改测试")
public void 实物用户id篡改测试() throws Exception{
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.attr[0].value"),"白色","校验sku信息颜色失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.attr[1].value"),"S","校验sku信息尺寸失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.credits"),"100","校验sku商品积分失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].multiImage"),"//yun.dui88.com/images/201906/9p72lmu1qn.jpg","校验图片信息失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].title"),"【自动化勿动】自有实物sku","校验实物名称失败");
Assert.assertEquals(response.jsonPath().getString("data.orderCredits"),"100","校验订单积分失败");
Assert.assertEquals(response.jsonPath().getString("data.expressPrice"),"500","校验订单运费金额失败");
Assert.assertEquals(response.jsonPath().getString("data.consumerPayPrice"),"500","校验订单支付金额失败");
//uid: 大富翁app
//商品: lv测试应用55
int uid = 8;
String appItemId = "197040";
String itemId = "32655" ;
String message = "";
Map cookies = authorization.dafuwengLogin(uid);
logger.info("校验新实物确认下单页正确");
//实物兑换
try{
Response response = gawService.objectExchange(cookies,appItemId,itemId,"163");
response.prettyPrint();
}catch (Exception e){
message = e.toString();
}
logger.info(message);
Assert.assertTrue(message.contains("\"desc\":\"无权访问\""),"校验message失败");
Assert.assertTrue(message.contains("\"success\":false"),"校验success失败");
logger.info("校验实物用户id篡改无法兑换成功");
}
@Test(description = "新实物skuId篡改测试")
public void 实物skuId篡改测试() throws Exception{
int uid = 7289;
String appItemId = "197040";
String itemId = "32655" ;
String message = "";
Map cookies = authorization.dafuwengLogin(uid);
//实物兑换,skuId改为其它商品的
try{
Response response = gawService.objectExchange(cookies,appItemId,itemId,"36");
response.prettyPrint();
}catch (Exception e){
message = e.toString();
}
logger.info(message);
Assert.assertTrue(message.contains("\"desc\":\"无权访问\""),"校验message失败");
Assert.assertTrue(message.contains("\"success\":false"),"校验success失败");
logger.info("校验实物用户id篡改无法兑换成功");
}
......
......@@ -357,7 +357,6 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test(description = "新自有实物会员兑换限制")
public void 会员兑换限制() throws Exception{
String appItemId = "193810";
......@@ -383,6 +382,31 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test(description = "新实物确认下单页面")
public void 实物确认下单测试() throws Exception{
int uid = 7290;
String appItemId = "196218";
String appSkuId = "145";
Response response = gawService.confirmItemDetail(uid,appItemId,appSkuId);
response.prettyPrint();
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.attr[0].value"),"白色","校验sku信息颜色失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.attr[1].value"),"S","校验sku信息尺寸失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].sku.credits"),"100","校验sku商品积分失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].multiImage"),"//yun.dui88.com/images/201906/9p72lmu1qn.jpg","校验图片信息失败");
Assert.assertEquals(response.jsonPath().getString("data.items[0].title"),"【自动化勿动】自有实物sku","校验实物名称失败");
Assert.assertEquals(response.jsonPath().getString("data.orderCredits"),"100","校验订单积分失败");
Assert.assertEquals(response.jsonPath().getString("data.expressPrice"),"500","校验订单运费金额失败");
Assert.assertEquals(response.jsonPath().getString("data.consumerPayPrice"),"500","校验订单支付金额失败");
logger.info("校验新实物确认下单页正确");
}
@Test(description = "新自有实物用户id修改测试")
public void 实物用户id篡改测试() throws Exception{
......
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