Commit 63e50d30 authored by 赵然's avatar 赵然

zr

parent 75927390
......@@ -90,12 +90,12 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
for(int i=0;i<2;i++) {
if(i==0){
for (int j=0;j<2;j++){
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",2720);
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",7504);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验自定义中奖奖项信息成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
}
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("243", "19933",2720);
Response openResponse = playCollectResult("243", "19933",7504);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), cLReward.getRlName(), "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), cLReward.getRlType(), "校验奖项失败");
logger.info("校验集卡活动开奖奖项信息成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
......@@ -103,13 +103,13 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
}else if(i==1){
for (int j=0;j<2;j++){
if (j==0){
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",2720);
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",7504);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验自定义中奖奖项信息成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
}else if (j==1){
//第二次中谢谢参与,开奖不满足中奖条件
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",2720);
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",7504);
String type = String.valueOf(response.jsonPath().getString("lottery.type"));
Assert.assertTrue((type.contains("thanks"))||(type.contains("lucky")));
logger.info("校验中奖谢谢参与成功,奖项类型为" + response.jsonPath().getString("lottery.type"));
......@@ -130,12 +130,12 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");
for (int i=0;i<2;i++){
Response response = playNewActivityResult1("19929", "r3oq9gqkf", "239",2720);
Response response = playNewActivityResult1("19929", "r3oq9gqkf", "239",7504);
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖类型成功,自定义活动游戏中奖奖品类型为" + response.jsonPath().getString("lottery.type"));
Response openResponse = playCollectResult("239", "19929",2720);
Response openResponse = playCollectResult("239", "19929",7504);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), awardsName, "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
logger.info("校验活动中奖信息name和type成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
......
......@@ -43,10 +43,10 @@ public class 奖品发放限制_DuibaTest extends DuibaTestBase {
//数据库删除
try {
//case:[奖品发放限制测试_永久]数据处理:删除永久中奖记录
jdbc.update("UPDATE ckvtable.tb_kvtable_0687 SET int_value = '0' WHERE vkey = 'activity-centerwinOptionNum_100025007_35868_hdtool25884'");
jdbc.update("UPDATE ckvtable.tb_kvtable_0177 SET int_value = '0' WHERE vkey = 'activity-centerwinOptionNum_100176049_35868_hdtool25884'");
//case:[奖品发放限制测试_每日]数据处理:删除每日中奖记录
String y_m_d = getTime2(0);
String key = "k05_PRIZE_K001_"+y_m_d+"_hdtool25933_100025007";
String key = "k05_PRIZE_K001_"+y_m_d+"_hdtool25933_100176049";
hbaseService.deleteHBASEKey2(key);
} catch (Exception e) {
System.out.println(e);
......@@ -75,12 +75,12 @@ public class 奖品发放限制_DuibaTest extends DuibaTestBase {
public void 奖品发放限制测试_每日() throws Exception {
//第一次抽奖
Response response = this.新活动工具接口传参(7500,"35920","adsdas","iOS");
Response response = this.新活动工具接口传参(7499,"35920","adsdas","iOS");
Assert.assertEquals( String.valueOf(response.jsonPath().getString("lottery.type")),"phonebill","第一次抽奖出奖类型失败,请考虑是否activity-access-web发布了master分支所导致");
Assert.assertEquals( String.valueOf(response.jsonPath().getString("lottery.title")),"话费","第一次抽奖出奖title失败");
//第二次抽奖
response = this.新活动工具接口传参(7500,"35920","adsdas","iOS");
response = this.新活动工具接口传参(7499,"35920","adsdas","iOS");
Assert.assertEquals( String.valueOf(response.jsonPath().getString("lottery.type")),"lucky","第一次抽奖出奖类型失败");
Assert.assertEquals( String.valueOf(response.jsonPath().getString("lottery.useBtnText")),"马上使用","第一次抽奖出奖文案失败");
......
......@@ -273,17 +273,17 @@ public class 扣库存测试_DuibaTest extends DuibaTestBase {
}
public Response 新活动工具接口传参(String activityId,String token,String device) throws Exception {
Response response = newActivityService.doJoin2(activityId,token);
Response response = newActivityService.doJoin2(7500,activityId,token);
response.prettyPrint();
String orderId = response.jsonPath().getString("orderId");
response = newActivityService.getOrderStatus2(orderId,device);
response = newActivityService.getOrderStatus2(7500,orderId,device);
response.prettyPrint();
String result = String.valueOf(response.jsonPath().getString("result"));
int i= 30;
while(i>0&&(result.equals("0"))){
Thread.sleep(1000);
response = newActivityService.getOrderStatus2(orderId,device);
response = newActivityService.getOrderStatus2(7500,orderId,device);
result = String.valueOf(response.jsonPath().getString("result"));
i--;
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