Commit 34cd3713 authored by 马博's avatar 马博

test

parent db5e5601
......@@ -29,6 +29,7 @@ import static io.restassured.config.RestAssuredConfig.newConfig;
*/
public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemplet {
/**
* 15968831723 duibaduiba123
* 查询库存 SELECT stock_id,id from tb_goods_batch where gtype = 6 and gid = 50 //gtype=6 表示卡密类型,gid 是卡密的id,查到的id是goods_batch_id
* 修改卡密为未使用状态:UPDATE tb_goods_coupon_0014 set status = 0 where goods_batch_id = 145835 //goods_batch_id为tb_goods_batch表中查到的id,tb_goods_coupon_0014 1024分表 卡密的id%1024
*/
......@@ -56,6 +57,7 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
jdbc.update("DELETE FROM credits_dev.consumer_limit_record_only where consumer_id = ?",consumerId);
jdbc.update("DELETE FROM goods.tb_everyday_limit where app_item_id=194594");
} catch (SQLException e) {
e.printStackTrace();
}
......@@ -390,6 +392,7 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
logger.info(message);
//会员等级可兑换,vip=5
Thread.sleep(3000);
Response response = gawService.couponExchange(authorization.generateSignAutoLogin("3tzVcss7SnAvA5ppT1m1rMPhaBcD",7083,1),appItemId,86);
response.prettyPrint();
......@@ -403,9 +406,10 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
throw new Exception("异常信息打印:" + e);
}finally {
Thread.sleep(2000);
jdbc.update("UPDATE goods_coupon.tb_goods_coupon_0044 set status = 0 where id = 185");
jdbc.update("UPDATE stock.tb_stock set stock=6 where stock_id =947339907522670044");
jdbc.update("UPDATE goods_coupon.tb_goods_coupon_0056 set status = 0 where gtype=6 and gid=56");
jdbc.update("UPDATE stock.tb_stock set stock=6 where stock_id =951829433813920056");
}
......
......@@ -161,13 +161,14 @@ public class 自有老虚拟商品_兑换限制测试_ExchangeTest extends Check
i--;
}
Thread.sleep(3000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
detailResponse.prettyPrint();
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换
Thread.sleep(3000);
try{
response = couponExchangeService.virtualExchange(authorization.dafuwengLogin(uid), appItemId, "123456");
response.prettyPrint();
......
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