Commit 5dc5104d authored by 马博's avatar 马博

自动化环境数据迁移

parent de650e00
......@@ -337,10 +337,10 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
//查询数据库,当前积分
Map<String, Object> mapuser = jdbc.findSimpleResult("select * from dafuweng.user where id="+uid);
//select * from goods.tb_goods_batch where gid=159857 查询库存id gid=itemid
Map<String, Object> mapStock = jdbc.findSimpleResult("select * from stock.tb_stock where stock_id = 607824566024920113");
Map<String, Object> mapStock = jdbc.findSimpleResult("select * from stock.tb_stock where stock_id = 662819483177620113");
String stock = String.valueOf(mapStock.get("stock"));
logger.info("兑换前库存:" + stock);
//扣去1
//扣去1x
stock = String.valueOf(Integer.valueOf(stock) - 1);
String credits = String.valueOf(mapuser.get("credits"));
......@@ -364,7 +364,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
i--;
}
Thread.sleep(3000);
Thread.sleep(5000);
response.prettyPrint();
//查询数据库,获取当前积分
mapuser = jdbc.findSimpleResult("select * from dafuweng.user where id="+uid);
......@@ -375,7 +375,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Assert.assertEquals(credits.trim(), creditsNew, "优惠券兑换后积分扣除异常");
logger.info("校验兑换前后积分正确");
mapStock = jdbc.findSimpleResult("select * from stock.tb_stock where stock_id = 607824566024920113");
mapStock = jdbc.findSimpleResult("select * from stock.tb_stock where stock_id = 662819483177620113");
String stockNew = String.valueOf(mapStock.get("stock"));
logger.info("兑换后库存:" + stockNew);
//校验比较,兑换前后积分
......
......@@ -136,7 +136,6 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//优惠券兑换
this.优惠券兑换("169713","29164",uid);
//查询优惠券兑换后的库存
mapStock = jdbc.findSimpleResult("SELECT * FROM stock.tb_stock WHERE stock_id ='705804724784620492'");
String stockNew = String.valueOf(mapStock.get("stock")) ;
......
......@@ -327,7 +327,7 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
//兑换
try{
Thread.sleep(4000);
Thread.sleep(10000);
response = gawService.couponExchange(authorization.dafuwengLogin(uid), appItemId, skuId,bl);
}catch (Exception e){
......
......@@ -318,8 +318,8 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
switch (caseNum){
case 1:
Assert.assertTrue(message.contains("限2020-05-02至2022-04-15日期内兑换"),"校验message失败");
Assert.assertEquals(exchangeText,"限2020-05-02至2022-04-15日期内兑换","校验马上兑换按钮状态失败");
Assert.assertTrue(message.contains("限2021-05-29至2027-04-30日期内兑换"),"校验message失败");
Assert.assertEquals(exchangeText,"限2021-05-29至2027-04-30日期内兑换","校验马上兑换按钮状态失败");
logger.info("校验实物日期兑换限制未开始成功");
break;
......
......@@ -475,14 +475,19 @@ public class Authorization {
// map.get(1);
// map.get(2);
// String url = "http://home.m.duibatest.com.cn/test/generateSign?appKey=2wGQc3MZaQsqYFWcX4gguya5PnnS&uid=3402&vip=5";
String url = "http://activity.m.duibatest.com.cn/ngame/index?id=32075&appKey=3erv8LvBxKBSyuGK5i8FSGyYoFD1&openBs=openbs";
Response response=given().get(url);
response.prettyPrint();
// url = response.jsonPath().get("url");
// System.out.println(url);
// response=given().redirects().follow(false).get(url);
System.out.println(response.getCookies());
System.out.println("Set-Cookie的信息为"+response.getHeader("Set-Cookie"));
// String url = "http://activity.m.duibatest.com.cn/ngame/index?id=32075&appKey=3erv8LvBxKBSyuGK5i8FSGyYoFD1&openBs=openbs";
// Response response=given().get(url);
// response.prettyPrint();
//// url = response.jsonPath().get("url");
//// System.out.println(url);
//// response=given().redirects().follow(false).get(url);
// System.out.println(response.getCookies());
// System.out.println("Set-Cookie的信息为"+response.getHeader("Set-Cookie"));
}
......
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