Commit af5a2eb2 authored by 赵然's avatar 赵然

Merge branch 'master' of gitlab2.dui88.com:mabo/test-platform

parents 254aa17e 43531d78
......@@ -287,6 +287,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Map<String, String> map = authorization.dafuwengLogin(uid);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
Thread.sleep(5000);
//实物兑换
response = couponExchangeService.objectExchange(map, "161100", null, "null", "yrJRr7Cddp2YeQd", "null");
// response.prettyPrint();
......@@ -307,6 +308,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
message = response.jsonPath().getString("data.message");
i--;
}
Thread.sleep(2000);
//查询数据库,获取当前积分
mapuser = jdbc.findSimpleResult("select * from dafuweng.user where id="+uid);
String creditsNew = String.valueOf(mapuser.get("credits"));
......@@ -344,6 +346,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
String credits = String.valueOf(mapuser.get("credits"));
logger.info("兑换前积分:" + credits); //扣去100积分
credits = String.valueOf(Integer.valueOf(credits) - 1);
Thread.sleep(5000);
//优惠券兑换
Response response = couponExchangeService.couponExchange(authorization.dafuwengLogin(uid), "159857", null);
String orderId = response.jsonPath().getString("orderId");
......@@ -361,6 +364,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
i--;
}
Thread.sleep(3000);
response.prettyPrint();
//查询数据库,获取当前积分
mapuser = jdbc.findSimpleResult("select * from dafuweng.user where id="+uid);
......
......@@ -88,10 +88,11 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
String orderId = this.支付宝兑换订单(uid,"peeulk6392@sandbox.com","沙箱环境","10");
logger.info("订单号:" + orderId);
Thread.sleep(3000);
//订单审核,判断是否在待审核节点
Map<String,Object> mapOrder = jdbc.findSimpleResult("SELECT * FROM "+ Database.orders_consumer+"."+Database.orders9+" WHERE id = " + orderId);
String flowWork = String.valueOf(mapOrder.get("flowwork_stage"));
Thread.sleep(300);
logger.info("数据库订单节点:" + flowWork);
Assert.assertEquals(flowWork,"Audit-started","校验订单审核节点失败");
String orderIdmain = String.valueOf(mapOrder.get("order_num"));
......@@ -113,6 +114,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
while (j > 0 && !flowWork.equals("Success-complete")) {
Thread.sleep(1000);
auditResponse = dsOrderService.submitAudit("22542",orderId,"pass",authorization.hdLoginCommonNew("15833333333"));
auditResponse.prettyPrint();
mapOrder = jdbc.findSimpleResult("SELECT * FROM "+Database.orders_consumer+"."+Database.orders9+" WHERE id = " + orderId);
flowWork = String.valueOf(mapOrder.get("flowwork_stage"));
logger.info("数据库订单节点:" + flowWork);
......
......@@ -164,6 +164,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger.info("兑换前的积分:"+credits);
credits = String.valueOf(Integer.valueOf(credits)-10);
Thread.sleep(5000);
//优惠券兑换
this.优惠券兑换("174797","30290",uid);
......@@ -192,6 +193,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger.info("兑换前的优惠券共享库存:" + stock);
stock = String.valueOf(Integer.valueOf(stock)-1);
Thread.sleep(5000);
//优惠券兑换
this.优惠券兑换("174923","30318",uid);
......@@ -215,6 +217,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
String ftDate = ft.format(dNow);
try {
Thread.sleep(5000);
//优惠券第一次兑换
this.优惠券兑换("174928","30319",uid);
......@@ -317,6 +320,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
// logger.info("兑换前的开发者余额:" + remainMoney);
// String remainMoneyNew =String.valueOf(Integer.valueOf(remainMoney) - 1000) ;
Thread.sleep(5000);
//优惠券兑换
String orderId = this.优惠券兑换订单(appItemId,itemId,uid);
logger.info("订单号:" + orderId);
......@@ -331,7 +335,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger.info("兑吧订单号为:" + orderIdmain);
int i =10;
while (i > 0 && !flowWork.equals("Audit-started")) {
Thread.sleep(300);
Thread.sleep(3000);
mapOrder = jdbc.findSimpleResult("SELECT * FROM "+Database.orders_consumer+"."+Database.orders9+" WHERE id = " + orderId);
flowWork = String.valueOf(mapOrder.get("flowwork_stage"));
logger.info("数据库订单节点:" + flowWork);
......@@ -504,6 +508,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
map.put("token","yrJRr7Cddp2YeQd");
try{
Thread.sleep(5000);
//优惠券兑换,用户兑换限制次数1次
Response response= this.优惠券兑换("170295","29294", uid);
Assert.assertEquals(response.jsonPath().getString("status"),"success","校验兑换失败");
......
......@@ -515,6 +515,7 @@ public class 自有新虚拟商品_充值_兑换限制_ExchangeTest extends Chec
String stock = String.valueOf(mapStock.get("stock"));
logger.info("兑换前的库存:" + stock);
Thread.sleep(5000);
Response response = gawService.virtualExchange(cookies, appItemId,skuId);
String orderId = response.jsonPath().getString("data.orderId");
//获取兑换结果
......
......@@ -395,10 +395,12 @@ public class 秒杀商品_自有新优惠券_兑换限制_SeckillTest extends Du
//第一次秒杀
Response response = seckillNewService.exchange(itemId,appItemId,uid,skuId,actId);
response.prettyPrint();
String orderId = response.jsonPath().getString("data.orderId");
Thread.sleep(1000);
//获取兑换结果
response = seckillNewService.orderStatus(orderId,uid);
response.prettyPrint();
String status = response.jsonPath().getString("data.status");
int i = 10;
//异步接口,直到兑换成功
......
......@@ -74,6 +74,7 @@ public class 秒杀商品_自有新商家充值_兑换限制_SeckillTest extends
//秒杀
Response response = seckillNewService.exchange(itemId,appItemId,uid,skuId,actId);
response.prettyPrint();
String orderId = response.jsonPath().getString("data.orderId");
Thread.sleep(1000);
response = seckillNewService.orderStatus(orderId,uid);
......
......@@ -503,7 +503,7 @@ public class ContractSign_signTest extends DuibaTestBase {
map.put("skinId","46");
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(map));
Response response = given().contentType("application/json;charset=UTF-8").cookies(authorization.ssoLogin()).body(jsonObject).post("https://mng.duibatest.com.cn/newmanager/signContract/save");
//response.prettyPrint();
response.prettyPrint();
try {
Assert.assertEquals(response.jsonPath().getString("success"), "true", "/signContract/save接口失败");
} catch (Exception e) {
......
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