Commit 3512cea2 authored by 马博's avatar 马博

Merge remote-tracking branch 'origin/master'

parents 3a542930 cef0e30b
...@@ -37,6 +37,10 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -37,6 +37,10 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
gawService gawService; gawService gawService;
@Autowired @Autowired
tawService tawService; tawService tawService;
@Autowired
MobileService mobileService;
@Autowired
Authorization authorization;
int uid = 6866; int uid = 6866;
...@@ -44,9 +48,10 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -44,9 +48,10 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
@Test(description = "兑吧新实物每人限购每日限制") @Test(description = "兑吧新实物每人限购每日限制")
public void 每人限购每日限制测试() throws Exception { public void 每人限购每日限制测试() throws Exception {
int appItemId = 192950; String appItemId = "192950";
int itemId = 32439; String itemId = "32439";
// try{ String message = "";
try{
//第一次兑换 //第一次兑换
Response response = gawService.objectExchange(uid,appItemId,itemId); Response response = gawService.objectExchange(uid,appItemId,itemId);
...@@ -54,37 +59,38 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -54,37 +59,38 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
//获取兑换结果 //获取兑换结果
response = tawService.orderStatus(orderId,uid); response = tawService.orderStatus(orderId,uid);
response.prettyPrint(); response.prettyPrint();
String status = response.jsonPath().getString("data.status");
Assert.assertEquals(status,"wait_delivery");
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),itemId);
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换
Thread.sleep(3000);
try{
response = gawService.objectExchange(uid,appItemId,itemId);
response.prettyPrint();
}catch (Exception e){
message = e.toString();
}
logger.info(message);
Assert.assertTrue(message.contains("今日已达兑换上限"),"校验message失败");
Assert.assertTrue(message.contains("\"success\":false"),"校验success失败");
Assert.assertEquals(exchangeText,"今日已达兑换上限","校验兑换按钮失败");
logger.info("校验实物用户每日限制消费成功");
}catch (Exception e){
throw new Exception("异常信息打印:" + e);
}finally {
jdbc.update("DELETE FROM credits_dev.consumer_limit_record WHERE item_id = '"+itemId+"'");
// }
// Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),itemId);
// String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
// logger.info("商品兑换按钮:" + exchangeText);
//
// //第二次兑换
// Thread.sleep(3000);
// try{
// response = couponExchangeService.objectExchange(authorization.dafuwengLogin(uid), appItemId, itemId, "null", "yrJRr7Cddp2YeQd", "null");
// response.prettyPrint();
//
// }catch (Exception e){
// message = e.toString();
// }
// logger.info(message);
//
// Assert.assertTrue(message.contains("今日已达兑换上限"),"校验message失败");
// Assert.assertTrue(message.contains("\"success\":false"),"校验success失败");
//
// Assert.assertEquals(exchangeText,"今日已达兑换上限","校验兑换按钮失败");
// logger.info("校验实物用户每日限制消费成功");
//
// }catch (Exception e){
//
// throw new Exception("异常信息打印:" + e);
//
// }finally {
// jdbc.update("DELETE FROM credits_dev.consumer_limit_record WHERE item_id = '"+itemId+"'");
//
// }
} }
......
...@@ -114,16 +114,17 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase ...@@ -114,16 +114,17 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase
@Test
// @Test
public void 集卡开奖_单接口调试() throws Exception { public void 集卡开奖_单接口调试() throws Exception {
//手动开奖——开 //手动开奖——开
String activityId = "2741"; String activityId = "2741";
String collectRuleId = "5182"; String collectRuleId = "5182";
Integer uid = 6921; Integer uid = 6922;
String consumerId = "100091476"; String consumerId = "100091476";
String count = "1"; String count = "1";
String afterCount = "0"; String afterCount = "0";
String prizeLevel = "4"; String prizeLevel = "5";
String afterPrizeLevel = "0"; String afterPrizeLevel = "0";
String clickFlag = "true"; String clickFlag = "true";
String afterClickFlag = "false"; String afterClickFlag = "false";
...@@ -131,7 +132,7 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase ...@@ -131,7 +132,7 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase
String openResult = "2"; String openResult = "2";
this.playPlugin("3610","5182",6921); this.playPlugin("3612","5182",6922);
consumerId = "100143586"; consumerId = "100143586";
Response collectGoodsInfo = newCollectActivityService.getCollectGoodsInfo(collectRuleId,uid); Response collectGoodsInfo = newCollectActivityService.getCollectGoodsInfo(collectRuleId,uid);
...@@ -145,8 +146,8 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase ...@@ -145,8 +146,8 @@ public class 新集卡_插件开奖异常返卡_DuibaTest extends DuibaTestBase
//开奖 //开奖
Response openPrizeResponse = this.openPrize(collectRuleId,uid,"nomal"); Response openPrizeResponse = this.openPrize(collectRuleId,uid,"nomal");
openPrizeResponse.prettyPrint(); openPrizeResponse.prettyPrint();
// Assert.assertEquals(openPrizeResponse.jsonPath().getString("result"),"1","校验开奖接口失败"); Assert.assertEquals(openPrizeResponse.jsonPath().getString("result"),"1","校验开奖接口失败");
// Assert.assertEquals(openPrizeResponse.jsonPath().getString("lottery.type"),prizeType,"校验开奖类型object失败"); Assert.assertEquals(openPrizeResponse.jsonPath().getString("lottery.type"),prizeType,"校验开奖类型object失败");
logger.info("校验开奖成功,开奖的奖项类型为:"+openPrizeResponse.jsonPath().getString("lottery.type")); logger.info("校验开奖成功,开奖的奖项类型为:"+openPrizeResponse.jsonPath().getString("lottery.type"));
Response afterCollectGoodsInfo = newCollectActivityService.getCollectGoodsInfo(collectRuleId,uid); Response afterCollectGoodsInfo = newCollectActivityService.getCollectGoodsInfo(collectRuleId,uid);
afterCollectGoodsInfo.prettyPrint(); afterCollectGoodsInfo.prettyPrint();
......
...@@ -77,6 +77,17 @@ public class pk_押注测试_AccessTest extends DuibaTestBase { ...@@ -77,6 +77,17 @@ public class pk_押注测试_AccessTest extends DuibaTestBase {
Boolean result2 = jdbc.update("delete from activity_order_con.tb_trade_center_activity_order_0735 where activity_type = 'bet' and duiba_activity_id = '124'\n"); Boolean result2 = jdbc.update("delete from activity_order_con.tb_trade_center_activity_order_0735 where activity_type = 'bet' and duiba_activity_id = '124'\n");
Boolean result3 = jdbc.update("delete from act_record.tb_bet_record where bet_id = '82' and partner_user_id = '5244'\n");
Boolean result6 = jdbc.update("delete from activity_order_con.tb_trade_center_activity_order_0522 where activity_type = 'bet' and duiba_activity_id = '82'\n");
Boolean result4 = jdbc.update("delete from act_record.tb_bet_record where bet_id = '122' and partner_user_id = '5247'\n");
Boolean result7 = jdbc.update("delete from activity_order_con.tb_trade_center_activity_order_0525 where activity_type = 'bet' and duiba_activity_id = '122'\n");
Boolean result5 = jdbc.update("delete from act_record.tb_bet_record where bet_id = '83' and partner_user_id = '5248'\n");
Boolean result8 = jdbc.update("delete from activity_order_con.tb_trade_center_activity_order_0526 where activity_type = 'bet' and duiba_activity_id = '83'\n");
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -25,7 +25,7 @@ import static io.restassured.RestAssured.given; ...@@ -25,7 +25,7 @@ import static io.restassured.RestAssured.given;
/** /**
* Created by 赵然 on 2018/11/06 * Created by 赵然 on 2018/11/06
*/ */
public class 账户正常提现_AccessTest extends DuibaTestBase{ public class 账户正常提现 extends DuibaTestBase{
@Value("${activity.host}") @Value("${activity.host}")
String activityHost; String activityHost;
@Autowired @Autowired
......
...@@ -30,7 +30,7 @@ public class gawService { ...@@ -30,7 +30,7 @@ public class gawService {
//普通实物兑换接口 //普通实物兑换接口
public Response objectExchange(int uid, int appItemId,int itemId) throws Exception { public Response objectExchange(int uid, String appItemId,String itemId) throws Exception {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
Map<String,Object> mapList = new HashMap<>(); Map<String,Object> mapList = new HashMap<>();
...@@ -60,7 +60,7 @@ public class gawService { ...@@ -60,7 +60,7 @@ public class gawService {
// Response saveResponse = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).params(map).post("http://"+goodsHost+"/gaw/objectExchange/create"); // Response saveResponse = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).params(map).post("http://"+goodsHost+"/gaw/objectExchange/create");
response.prettyPrint(); // response.prettyPrint();
try{ try{
Assert.assertEquals(response.jsonPath().getString("success"),"true"); Assert.assertEquals(response.jsonPath().getString("success"),"true");
......
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