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

自动化环境数据迁移

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