Commit 46ad2095 authored by 赵然's avatar 赵然

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

parents d34c1b8e 0c7c470f
...@@ -139,7 +139,7 @@ public class 游戏_开大奖测试_AccessTest extends DuibaTestBase { ...@@ -139,7 +139,7 @@ public class 游戏_开大奖测试_AccessTest extends DuibaTestBase {
Response openWinnResponse = newGameService.openWinning(gameId); Response openWinnResponse = newGameService.openWinning(gameId);
openWinnResponse.prettyPrint(); openWinnResponse.prettyPrint();
Thread.sleep(6000); Thread.sleep(8000);
List<Map<String,Object>> orders = jdbc.findModeResult("select * from ngame.ngame_orders where duiba_ngame_id = ?\n",gameId); List<Map<String,Object>> orders = jdbc.findModeResult("select * from ngame.ngame_orders where duiba_ngame_id = ?\n",gameId);
logger.info("orders信息为"+JSONObject.toJSONString(orders)); logger.info("orders信息为"+JSONObject.toJSONString(orders));
for(int i=0;i<orders.size();i++){ for(int i=0;i<orders.size();i++){
......
...@@ -99,7 +99,7 @@ public class 游戏_新建无大奖游戏_AccessTest extends DuibaTestBase { ...@@ -99,7 +99,7 @@ public class 游戏_新建无大奖游戏_AccessTest extends DuibaTestBase {
"[{\"type\":\"phonebill\",\"title\":\"小奖1\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/shake/phone.png\",\"show\":true,\"description\":\"\",\"guarantee\":true,\"scoreArea\":\"0,100\",\"optionLimitCount\":\"\",\"limitDays\":\"\",\"limitTimeType\":\"\",\"rate\":5000,\"appItemId\":1,\"value\":\"1\",\"limit\":null,\"low\":null,\"remaind\":\"10000\",\"oldRemaind\":null,\"isMutliPrizeLimit\":false,\"autoOpen\":true}," + "[{\"type\":\"phonebill\",\"title\":\"小奖1\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/shake/phone.png\",\"show\":true,\"description\":\"\",\"guarantee\":true,\"scoreArea\":\"0,100\",\"optionLimitCount\":\"\",\"limitDays\":\"\",\"limitTimeType\":\"\",\"rate\":5000,\"appItemId\":1,\"value\":\"1\",\"limit\":null,\"low\":null,\"remaind\":\"10000\",\"oldRemaind\":null,\"isMutliPrizeLimit\":false,\"autoOpen\":true}," +
"{\"type\":\"phonebill\",\"title\":\"小奖2\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/shake/phone.png\",\"show\":true,\"description\":\"\",\"guarantee\":true,\"scoreArea\":\"101,200\",\"optionLimitCount\":\"\",\"limitDays\":\"\",\"limitTimeType\":\"\",\"rate\":8000,\"appItemId\":1,\"value\":\"2\",\"limit\":null,\"low\":null,\"remaind\":\"1000\",\"oldRemaind\":null,\"isMutliPrizeLimit\":false,\"autoOpen\":true}]"); "{\"type\":\"phonebill\",\"title\":\"小奖2\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/shake/phone.png\",\"show\":true,\"description\":\"\",\"guarantee\":true,\"scoreArea\":\"101,200\",\"optionLimitCount\":\"\",\"limitDays\":\"\",\"limitTimeType\":\"\",\"rate\":8000,\"appItemId\":1,\"value\":\"2\",\"limit\":null,\"low\":null,\"remaind\":\"1000\",\"oldRemaind\":null,\"isMutliPrizeLimit\":false,\"autoOpen\":true}]");
Response response = given().contentType("application/x-www-form-urlencoded; charset=UTF-8").cookies(authorization.ssoLogin()).params(params).post("https://"+ url); Response response = given().contentType("application/x-www-form-urlencoded; charset=UTF-8").cookies(authorization.ssoLogin()).params(params).post("http://"+ url);
response.prettyPrint(); response.prettyPrint();
Thread.sleep(3000); Thread.sleep(3000);
...@@ -133,7 +133,7 @@ public class 游戏_新建无大奖游戏_AccessTest extends DuibaTestBase { ...@@ -133,7 +133,7 @@ public class 游戏_新建无大奖游戏_AccessTest extends DuibaTestBase {
map1.put("id",gameIds.get(z)); map1.put("id",gameIds.get(z));
map1.put("status","1"); map1.put("status","1");
Response response1 = given().cookies(authorization.ssoLogin()).contentType("application/x-www-form-urlencoded; charset=UTF-8").params(map1).post("https://"+url); Response response1 = given().cookies(authorization.ssoLogin()).contentType("application/x-www-form-urlencoded; charset=UTF-8").params(map1).post("http://"+url);
Map<String,Object> result = jdbc.findSimpleResult("select * from ngame.duiba_ngame where id = ?\n",gameIds.get(z)); Map<String,Object> result = jdbc.findSimpleResult("select * from ngame.duiba_ngame where id = ?\n",gameIds.get(z));
Assert.assertEquals(result.get("game_status").toString(),"1","校验状态修改失败"); Assert.assertEquals(result.get("game_status").toString(),"1","校验状态修改失败");
}else if (z==1){ }else if (z==1){
......
...@@ -11,6 +11,7 @@ package http.cases.PkTest; ...@@ -11,6 +11,7 @@ package http.cases.PkTest;
import base.DuibaLog; import base.DuibaLog;
import base.DuibaTestBase; import base.DuibaTestBase;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import http.model.BetMobileVo; import http.model.BetMobileVo;
import http.service.Activity.PkService; import http.service.Activity.PkService;
import io.restassured.response.Response; import io.restassured.response.Response;
...@@ -61,8 +62,11 @@ public class pk_列表测试_AccessTest extends DuibaTestBase { ...@@ -61,8 +62,11 @@ public class pk_列表测试_AccessTest extends DuibaTestBase {
logger.info("未参加过押注用户的列表数据校验成功,unbetList的信息为"+ JSON.toJSONString(unbetList)); logger.info("未参加过押注用户的列表数据校验成功,unbetList的信息为"+ JSON.toJSONString(unbetList));
Response response_uid_18816 = pkService.getBetList(uid_18816); Response response_uid_18816 = pkService.getBetList(uid_18816);
logger.info("response_uid_18816"+ JSONObject.toJSONString(response_uid_18816.prettyPrint()));
List<BetMobileVo> betedList_uid_18816 = response_uid_18816.jsonPath().getList("data.betedList",BetMobileVo.class); List<BetMobileVo> betedList_uid_18816 = response_uid_18816.jsonPath().getList("data.betedList",BetMobileVo.class);
logger.info("betedList_uid_18816的信息为"+ JSONObject.toJSONString(betedList_uid_18816));
List<BetMobileVo> unbetList_uid_18816 = response_uid_18816.jsonPath().getList("data.unbetList",BetMobileVo.class); List<BetMobileVo> unbetList_uid_18816 = response_uid_18816.jsonPath().getList("data.unbetList",BetMobileVo.class);
logger.info("unbetList_uid_188166的信息为"+ JSONObject.toJSONString(unbetList_uid_18816));
Assert.assertEquals(String.valueOf(unbetList_uid_18816.size()),"0","已投注的活动为0校验失败"); Assert.assertEquals(String.valueOf(unbetList_uid_18816.size()),"0","已投注的活动为0校验失败");
Assert.assertEquals(String.valueOf(betedList_uid_18816.size()),"0","未投注的活动为0校验失败"); Assert.assertEquals(String.valueOf(betedList_uid_18816.size()),"0","未投注的活动为0校验失败");
logger.info("没有添加pk楼层,用户的列表数据校验成功,均为空,betedList_uid_18816="+ JSON.toJSONString(betedList_uid_18816)+"\nunbetList_uid_18816="+ JSON.toJSONString(unbetList_uid_18816)); logger.info("没有添加pk楼层,用户的列表数据校验成功,均为空,betedList_uid_18816="+ JSON.toJSONString(betedList_uid_18816)+"\nunbetList_uid_18816="+ JSON.toJSONString(unbetList_uid_18816));
......
...@@ -85,8 +85,8 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends ...@@ -85,8 +85,8 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends
@Test @Test
public void 瓜分红包_两个选项_押注人数不同_开奖测试(){ public void 瓜分红包_两个选项_押注人数不同_开奖测试() throws Exception{
try {
List<Map<String,Object>> pks = jdbc.findModeResult("select * from act_com_conf.tb_bet_option where bet_id = ?",newBetId); List<Map<String,Object>> pks = jdbc.findModeResult("select * from act_com_conf.tb_bet_option where bet_id = ?",newBetId);
logger.info("pk活动信息为"+JSONObject.toJSONString(pks)); logger.info("pk活动信息为"+JSONObject.toJSONString(pks));
...@@ -171,11 +171,6 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends ...@@ -171,11 +171,6 @@ public class pk_开奖_瓜分红包_押注人数不同测试_AccessTest extends
Assert.assertEquals(use4_Acc2.toString(),String.valueOf(use4_Acc1+10),"用户4入账校验失败"); Assert.assertEquals(use4_Acc2.toString(),String.valueOf(use4_Acc1+10),"用户4入账校验失败");
}catch (Exception e){
e.printStackTrace();
}
} }
......
...@@ -50,10 +50,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -50,10 +50,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
private String groupId = "7"; private String groupId = "7";
private Integer user01 = 4782; private Integer user01 = 4784;
private String consumerId01 = "100107000";//activity_order_con.tb_trade_center_activity_order_0760 private String consumerId01 = "100108068";//activity_order_con.tb_trade_center_activity_order_0804
private Integer user02 = 4783; private Integer user02 = 4785;
private String consumerId02 = "100107001";//activity_order_con.tb_trade_center_activity_order_0761 private String consumerId02 = "100108069";//activity_order_con.tb_trade_center_activity_order_0805
private String newBetId = ""; private String newBetId = "";
...@@ -84,9 +84,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -84,9 +84,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
} }
logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString()); logger.info("pk活动id为:"+newBetId+",选项id为:"+ optionsIds.toString());
Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0760 where consumer_id = '100107000' and account_type = '6'\n"); Map<String,Object> user01_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0804 where consumer_id = '100108068' and account_type = '6'\n");
Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString()); Long use1_Acc1 = Long.valueOf(user01_account1.get("balance_amount").toString());
Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0761 where consumer_id = '100107001' and account_type = '6'\n"); Map<String,Object> user02_account1 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0805 where consumer_id = '100108069' and account_type = '6'\n");
Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString()); Long use2_Acc1 = Long.valueOf(user02_account1.get("balance_amount").toString());
...@@ -121,9 +121,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -121,9 +121,9 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
} }
} }
Map<String,Object> user01_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0760 where consumer_id = '100107000' and duiba_activity_id = ?\n",newBetId); Map<String,Object> user01_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0804 where consumer_id = '100108068' and duiba_activity_id = ?\n",newBetId);
Assert.assertEquals(user01_order.get("add_credits").toString(),"10","开奖后发奖值校验失败"); Assert.assertEquals(user01_order.get("add_credits").toString(),"10","开奖后发奖值校验失败");
Map<String,Object> user02_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0761 where consumer_id = '100107001' and duiba_activity_id = ?\n",newBetId); Map<String,Object> user02_order = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0805 where consumer_id = '100108069' and duiba_activity_id = ?\n",newBetId);
Assert.assertEquals(user02_order.get("add_credits").toString(),"","开奖后发奖值校验失败"); Assert.assertEquals(user02_order.get("add_credits").toString(),"","开奖后发奖值校验失败");
logger.info("用户01获取的红包值为:"+user01_order.get("add_credits").toString()+",用户02获取的红包值为:"+user02_order.get("add_credits").toString()); logger.info("用户01获取的红包值为:"+user01_order.get("add_credits").toString()+",用户02获取的红包值为:"+user02_order.get("add_credits").toString());
...@@ -136,10 +136,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends ...@@ -136,10 +136,10 @@ public class pk_开奖_瓜分红包_押注人数相同测试_AccessTest extends
Assert.assertTrue(bet1Times>bet2Times,"活动获胜人数比失败人数多校验失败"); Assert.assertTrue(bet1Times>bet2Times,"活动获胜人数比失败人数多校验失败");
logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString()); logger.info("选项1的押注人数为:"+bet1Result.get("bet_times").toString()+",选项2的押注人数为:"+bet2Result.get("bet_times").toString());
Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0760 where consumer_id = '100107000' and account_type = '6'\n"); Map<String,Object> user01_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0804 where consumer_id = '100108068' and account_type = '6'\n");
Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString()); Long use1_Acc2 = Long.valueOf(user01_account2.get("balance_amount").toString());
Assert.assertEquals(use1_Acc2.toString(),String.valueOf(use1_Acc1+10),"用户2入账校验失败"); Assert.assertEquals(use1_Acc2.toString(),String.valueOf(use1_Acc1+10),"用户2入账校验失败");
Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0761 where consumer_id = '100107001' and account_type = '6'\n"); Map<String,Object> user02_account2 = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0805 where consumer_id = '100108069' and account_type = '6'\n");
Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString()); Long use2_Acc2 = Long.valueOf(user02_account2.get("balance_amount").toString());
Assert.assertEquals(use2_Acc2,use2_Acc1,"用户2入账校验失败"); Assert.assertEquals(use2_Acc2,use2_Acc1,"用户2入账校验失败");
......
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