Commit 59a41de3 authored by 钱雯君's avatar 钱雯君

add

parent b3c64c71
/**
* Copyright (C), 2015-2018
* FileName: 集卡_出奖方式测试_DuibaTest
* Author: qianwenjun
* Date: 2018/3/6 20:29
* Description:
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* 〈〉
*
* @author qianwenjun
* @create 2018/3/6
* @since 1.0.0
*/
public class 集卡_出奖方式测试_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
@Test
public void 集卡_直接出奖_中奖() throws Exception {
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("239");
String data = awardResponse.jsonPath().getString("data.config.rewards[0]");
String awardsName = awardResponse.jsonPath().getString("data.config.rewards[0].rlName");
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");
//自定义活动游戏 结果
Response response = playNewActivityResult("19929", "r3oq9gqkf", "239",2720);
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖类型成功,自定义活动游戏中奖奖品类型为" + response.jsonPath().getString("lottery.type"));
//集卡获取信息
// Response collectGoodsInfo = newActivityService.getCollectGoodsInfo("239");
// logger.info("收集的中奖卡的信息如下:");
// collectGoodsInfo.prettyPrint();
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("239", "19929",2720);
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"));
}
@Test
public void 集卡_直接出奖_库存不足_不中奖() throws Exception {
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("242");
String data = awardResponse.jsonPath().getString("data.config.rewards[0]");
String awardsName = awardResponse.jsonPath().getString("data.config.rewards[0].name");
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");
//自定义活动游戏 结果
Response response = playNewActivityResult("19932", "r3oq9gqkf", "4",2720);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品信息成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = newActivityService.openCollectGoodsPrize2("242", "19932","服务器异常 请稍后再次领奖");
logger.info("集卡奖品缺货,开奖失败,校验错误信息成功,错误信息为" + openResponse.jsonPath().getString("message"));
}
@Test
public void 集卡_插件出奖_中奖() throws Exception {
//获取集卡活动配置的奖品信息--插件235的奖品信息
Response awardResponse = getManagerInfoService.getPluginInfo("235");
String data = awardResponse.jsonPath().getString("prizes");
String awardsDescription = awardResponse.jsonPath().getString("prizes[1].description");
String awardsType = awardResponse.jsonPath().getString("prizes[1].type");
//自定义活动游戏 结果
Response response = this.playNewActivityResult("19930", "r3oq9gqkf", "240",2720);
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
Response openResponse = this.playCollectResult("240", "19930",2720);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), awardsDescription, "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
Assert.assertTrue(openResponse.jsonPath().getString("lottery.link").contains("/activity/takePrizeNew?recordId"));
logger.info("集卡开奖奖品类型校验成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
}
@Test
public void 集卡_插件出奖_缺货_不中奖() throws Exception {
//获取集卡活动配置的奖品信息--插件235的奖品信息
Response awardResponse = getManagerInfoService.getPluginInfo("240");
String data = awardResponse.jsonPath().getString("prizes");
String awardsDescription = awardResponse.jsonPath().getString("prizes[0].description");
String awardsType = awardResponse.jsonPath().getString("prizes[0].type");
//自定义活动游戏 结果
Response response = this.playNewActivityResult("19931", "r3oq9gqkf", "241",2720);
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
Response openResponse = this.playCollectResult("241", "19931",2720);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
logger.info("校验奖品信息type成功, 奖品信息为:" + openResponse.jsonPath().getString("lottery.type"));
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId,Integer uid) throws Exception {
Response response = newActivityService.doJoin4(activityId, token, collectRuleId, uid);
Response playResponse = response;
//playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus21(orderId,uid);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus21(orderId,uid);
// statusResponse.prettyPrint();
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId,Integer uid) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize3(collectRuleId, activityId,uid);
// openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus31(orderId,uid);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 8;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus31(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
}
\ No newline at end of file
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.ManagerService;
import http.service.Activity.NewActivityService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import java.lang.reflect.Method;
/**
* 〈集卡助力抽奖〉
*
* @author zhaoran
* @create 2018/07/04
* @since 1.0.0
*/
public class 集卡_助力集卡测试_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
ManagerService managerService;
private static DuibaLog logger = DuibaLog.getLogger();
// private MysqlUtils jdbc;
private static String shareCode;
@BeforeMethod
//获取2720用户书旗活动邀请码
public void before() throws Exception {
shareCode=null;
Response response = newActivityService.getShareCode("25902","hdtool");
shareCode = String.valueOf(response.jsonPath().getString("shareCode"));
logger.info("2720用户书旗活动邀请码为:"+shareCode);
// jdbc = MysqlUtils.mysqlDuiba("act_com_conf");
try {
jdbc.update("delete from act_com_conf.tb_share_code_record where invited_consumer_id = '100028002' and share_code = '11nknk8'", null);
} catch (Exception e) {
e.printStackTrace();
}
}
// @AfterClass
// public void after(){
// jdbc.releaseConn();
// }
@DataProvider
public Object[][] providerMethod(Method method){
Object[][] result = null;
if(method.getName().equals("助力集卡抽奖")) {
result = new Object[][]{
new Object[]{1, 2720, "自己为自己助力"},
new Object[]{2, 2721, "他人为自己重复助力"},
new Object[]{3, 2721, "分享码无效"},
new Object[]{4, 2722, "分享助力成功抽卡"}
};
}
return result;
}
@Test(dataProvider = "providerMethod")
public void 助力集卡抽奖(int casenum,int userId,String casename) throws Exception {
logger.info("-------------------------------------"+casename+"-------------------------------------");
logger.info("2720用户书旗活动邀请码为:"+shareCode);
Assert.assertEquals(shareCode, "11nknk8", "校验shareCode失败");
//获取2720用户集卡信息
Response response = newActivityService.getCollectGoodsInfo("2364");
String count = String.valueOf(response.jsonPath().getString("collectGoods[3].count"));
logger.info("助力前2720用户修仙卡数量为:"+count);
count = String.valueOf(Integer.valueOf(count)+1);
//根据case选择对应的校验项
switch(casenum){
case 1:
response = newActivityService.helpShareCodeV2(userId,"780","25902","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("errorCode"),"100005","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("message"),"不能为自己助力,请输入他人的分享码!","校验message失败");
logger.info("校验项:errorCode,message,success成功");
break;
case 2:
response = newActivityService.helpShareCodeV2(userId,"780","25902","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("errorCode"),"100007","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("message"),"不能重复助力!","校验message失败");
logger.info("校验项:errorCode,message,success成功");
break;
case 3:
response = newActivityService.helpShareCodeV2(userId,"780","25902","hdtool","asdasfsadsad");
Assert.assertEquals(response.jsonPath().getString("errorCode"),"100006","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("message"),"分享码无效,请输入正确的分享码!","校验message失败");
logger.info("校验项:errorCode,message,success成功");
break;
case 4:
response = newActivityService.helpShareCodeV2(userId,"780","25902","hdtool",shareCode);
//logger.info("XXXXXXXXX"+response.asString());
Assert.assertEquals(response.jsonPath().getString("itmeId"),"29085","校验itmeId失败");
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验success失败");
Assert.assertEquals(response.jsonPath().getString("message"),"请求成功","校验message失败");
logger.info("校验项:itmeId,message,success成功,助力出卡成功");
//获取2720用户集卡信息
response = newActivityService.getCollectGoodsInfo("2364");
String countNew = String.valueOf(response.jsonPath().getString("collectGoods[3].count"));
logger.info("助力后2720用户修仙卡数量为:"+countNew);
Assert.assertEquals(countNew,count,"分享助力出卡未加上分享者账号");
break;
}
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 集卡_单奖项_用户中奖限制测试_DuibaTest
* Author: qianwenjun
* Date: 2018/3/9 15:39
* Description: 集卡-用户中奖限制测试
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import cn.com.duiba.activity.center.api.dto.activity.CLRewardDto;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
/**
* 〈集卡-用户中奖限制测试〉
*
* @author qianwenjun
* @create 2018/3/9
* @since 1.0.0
*/
public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
@BeforeMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void clearDb() {
try {
//清除用户参与活动次数(活动id:19127)
Boolean clearResult8 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19933'",null);
Boolean clearResult9 = jdbc.update("delete from ckvtable.tb_kvtable_0656 where consumer_id = 100026000 and vkey = 'activity-centerjoinNum_100026000_19933'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
public void clearGrade1Db() {
try {
//清除自定义活动-中奖奖品数量信息(12851)
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerwinOptionNum_100025007_19933_hdtool14153'",null);
//清除集卡规则n等级奖项-中奖次数(集卡规则id:9_1)
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'cl_good_cid_Crule_grade_100025007_243_1'",null);
//清除收集的集卡商品数量(集卡商品id:27160)
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'cl_good_cid_itemId_100025007_27217'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test(description = "单奖项限制1次")
public void 集卡_奖项1限制中奖1() throws Exception {
//清除以前的中奖纪录
this.clearGrade1Db();
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("243");
List<CLRewardDto> cLRewards = awardResponse.jsonPath().getJsonObject("data.config.rewards");
CLRewardDto cLReward = JSONObject.parseObject(JSON.toJSONString(cLRewards.get(0)),CLRewardDto.class);
//限制次数为1次,第一次活动可以中奖得集卡商品A-2次,并开奖得到奖项1的奖品;第二次不允许中集卡商品A-2次,第二次中奖得到谢谢参与
for(int i=0;i<2;i++) {
if(i==0){
for (int j=0;j<2;j++){
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",2720);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验自定义中奖奖项信息成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
}
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("243", "19933",2720);
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"));
}else if(i==1){
for (int j=0;j<2;j++){
if (j==0){
Response response = playNewActivityResult("19933", "r3oq9gqkf", "243",2720);
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);
String type = String.valueOf(response.jsonPath().getString("lottery.type"));
Assert.assertTrue((type.contains("thanks"))||(type.contains("lucky")));
logger.info("校验中奖谢谢参与成功,奖项类型为" + response.jsonPath().getString("lottery.type"));
}
}
Response openResponse = newActivityService.openCollectGoodsPrize2("243", "19933","未满足 中奖条件");
}
}
}
@Test(description = "限制关闭,可以无限中奖")
public void 集卡_单奖项限制关闭() throws Exception {
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("239");
String data = awardResponse.jsonPath().getString("data.config.rewards[0]");
String awardsName = awardResponse.jsonPath().getString("data.config.rewards[0].rlName");
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");
for (int i=0;i<2;i++){
Response response = playNewActivityResult1("19929", "r3oq9gqkf", "239",2720);
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖类型成功,自定义活动游戏中奖奖品类型为" + response.jsonPath().getString("lottery.type"));
Response openResponse = playCollectResult("239", "19929",2720);
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"));
}
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId,Integer uid) throws Exception {
Response response = newActivityService.doJoin5(activityId, token, collectRuleId, uid);
Response playResponse = response;
playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus21(orderId,uid);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus21(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playNewActivityResult1(String activityId, String token, String collectRuleId,Integer uid) throws Exception {
Response response = newActivityService.doJoin4(activityId, token, collectRuleId, uid);
Response playResponse = response;
playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus21(orderId,uid);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus21(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId,Integer uid) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize3(collectRuleId, activityId,uid);
openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus31(orderId,uid);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus31(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
@AfterMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void tearDb() {
clearDb();
clearGrade1Db();
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 集卡_多奖项_用户中奖限制测试_DuibaTest
* Author: qianwenjun
* Date: 2018/3/14 21:01
* Description: 多奖项-中奖限制测试
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import cn.com.duiba.activity.center.api.dto.activity.CLRewardDto;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import http.model.CollectGoodsInfo;
import http.service.Activity.ManagerService;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
import java.util.List;
/**
* 〈多奖项-中奖限制测试〉
*
* @author qianwenjun
* @create 2018/3/14
* @since 1.0.0
*/
public class 集卡_多奖项_用户中奖限制测试 extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
ManagerService managerService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
// @BeforeMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void clearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19934_hdtool%'",null);
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_244%'",null);
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27218','cl_good_cid_itemId_100025007_27219')",null);
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19934'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
//规则id=244,设置多奖项开关-打开
//奖项:1-集卡6;2-集卡7
//用例设计:
//第一次游戏中奖-奖项1
//校验点:1、奖项2不能中奖,7卡不能收集,只能中谢谢参与
@Test
public void 集卡_多奖项_中奖限制测试() throws Exception{
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("244");
List<CLRewardDto> cLRewards = awardResponse.jsonPath().getJsonObject("data.config.rewards");
CLRewardDto cLReward0 = JSONObject.parseObject(JSON.toJSONString(cLRewards.get(1)),CLRewardDto.class);
logger.info("奖品信息"+cLReward0);
Response response = playNewActivityResult("19934", "r3oq9gqkf", "244",2720);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("中奖卡片id为"+response.jsonPath().getString("lottery.itemId"));
Response myCollectInfoResponse = newActivityService.getCollectGoodsInfo2("244",2720);
List<CollectGoodsInfo> myCollectInfos = myCollectInfoResponse.jsonPath().getList("collectGoods",CollectGoodsInfo.class);
logger.info("myCollectInfo的信息为"+JSON.toJSONString(myCollectInfos));
Response openResponse = playCollectResult("244", "19934",2720);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), cLReward0.getName(), "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), cLReward0.getRlType(), "校验奖项失败");
//
// for(int i=0;i<2;i++){
// if (i==0){
// //第一次中集卡商品A,开奖得到奖项1的奖品
// Response response = playNewActivityResult("19934", "r3oq9gqkf", "244",2721);
// Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
// //集卡获取信息
// Response collectGoodsInfo = newActivityService.getCollectGoodsInfo("244");
// logger.info("收集的中奖卡的信息如下:");
// collectGoodsInfo.prettyPrint();
//// 集卡结束后开奖--开奖类型:直接开奖
// Response openResponse = playCollectResult("244", "19934",2721);
// Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), cLReward0.getRlName(), "校验奖项失败");
// Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), cLReward0.getRlType(), "校验奖项失败");
//
// logger.info("校验集卡活动中奖项1信息成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
// }else if (i==1){
// Response setResponse = editManagerInfoService.
// saveCustomHdtool3("3949", "【勿动】自动化-集卡-多奖项限制测试", "129","14154",
// "27218_0_A6_【勿动】自动化-集卡商品-A6_14155",
// "27219_100_A7_【勿动】自动化-集卡商品-A7_14156");
// Thread.sleep(60000);
// Response response = playNewActivityResult("19934", "r3oq9gqkf", "244",2721);
// String type = String.valueOf(response.jsonPath().getString("lottery.type"));
// Assert.assertTrue((type.contains("thanks"))||(type.contains("lucky")));
// logger.info("校验多奖项限制,第二次抽奖奖品为谢谢参与成功,奖品类型为" + response.jsonPath().getString("lottery.type"));
// }
//
// }
// //为第二次循环执行准备
// Response setResponse = editManagerInfoService.
// saveCustomHdtool3("3949", "【勿动】自动化-集卡-多奖项限制测试", "129","14154",
// "27218_100_A6_【勿动】自动化-集卡商品-A6_14155",
// "27219_0_A7_【勿动】自动化-集卡商品-A7_14156");
// Thread.sleep(60000);
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId,Integer uid) throws Exception {
Response response = newActivityService.doJoin4(activityId, token, collectRuleId, uid);
Response playResponse = response;
// playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus21(orderId,uid);
statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 8;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus21(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId,Integer uid) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize3(collectRuleId, activityId,uid);
openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus31(orderId,uid);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 8;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus31(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
@AfterMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void tearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19934_hdtool%'",null);
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_244%'",null);
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27218','cl_good_cid_itemId_100025007_27219')",null);
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19934'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 集卡_奖品限制测试_DuibaTest
* Author: qianwenjun
* Date: 2018/3/26 17:10
* Description: 集卡-奖品限制测试
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import cn.com.duiba.activity.center.api.dto.activity.CLRewardDto;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import http.service.Activity.ManagerService;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
/**
* 〈集卡-奖品限制测试〉
*
* @author qianwenjun
* @create 2018/3/26
* @since 1.0.0
*/
public class 集卡_奖品限制测试_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
ManagerService managerService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
@BeforeMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void clearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19935_hdtool%'",null);
Boolean clearResult6 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_245%'",null);
Boolean clearResult7 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27175')",null);
Boolean clearResult8 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19935'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
public void insert2() {
try {
Boolean insertStockResult = jdbc.update("update stock.tb_stock set stock = '2' where stock_id = '632130534524920245'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
public void insert1() {
try {
Boolean insertStockResult = jdbc.update("update stock.tb_stock set stock = '1' where stock_id = '632130534524920245'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
// @Test
public void 集卡_奖品限制1个并发请求() throws Exception{
//更新库存记录
this.insert1();
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("12");
List<CLRewardDto> cLRewards = awardResponse.jsonPath().getJsonObject("data.config.rewards");
logger.info("cLRewards的信息为"+cLRewards);
CLRewardDto cLReward = JSONObject.parseObject(JSON.toJSONString(cLRewards.get(0)),CLRewardDto.class);
//集卡-直接出奖的中奖条件:(集卡商品)C(1个),设置独立活动设置奖项的中奖概率
//奖品信息拼接:appItemId_probability_title_name_id(例如:27149_100_A_【勿动】自动化-A_12801)
Response setResponse = editManagerInfoService.
saveCustomHdtool2("3482", "【勿动】自动化-集卡-奖品库存限制测试", "120","13300",
"27175_100_A5_【勿动】自动化-A5_13301",
"27176_0_B5_【勿动】自动化-B5_13302",
"27177_0_C5_【勿动】自动化-C5_13303",
"27178_0_D5_【勿动】自动化-D5_13304",
"27179_0_E5_【勿动】自动化-E5_13305");
Thread.sleep(60000);
for (int i=0;i<2;i++){
if (i==0) {
//第一次中集卡商品A,开奖得到奖项1的奖品
Response response = playNewActivityResult("19338", "r3oq9gqkf", "12",2720,true);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("12", "19338",2720);
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"));
}else if (i==1) {
Response response = playNewActivityResult("19338", "r3oq9gqkf", "12",2720,true);
String type = String.valueOf(response.jsonPath().getString("lottery.type"));
Assert.assertTrue((type.contains("thanks"))||(type.contains("lucky")));
}
}
}
@Test
public void 集卡_奖品限制关闭() throws Exception{
Response awardResponse = getManagerInfoService.getPluginInfo("235");
String data = awardResponse.jsonPath().getString("prizes");
String awardsDescription = awardResponse.jsonPath().getString("prizes[1].description");
String awardsType = awardResponse.jsonPath().getString("prizes[1].type");
for (int i=0;i<2;i++){
Response response = this.playNewActivityResult("19930", "r3oq9gqkf", "240",2720,true);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
Response openResponse = this.playCollectResult("240", "19930",2720);
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), awardsDescription, "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
Assert.assertTrue(openResponse.jsonPath().getString("lottery.link").contains("/activity/takePrizeNew?recordId"));
logger.info("集卡开奖奖品类型校验成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
}
}
@Test
//第一次卡片可以集齐,中奖品
public void 集卡_奖品限制2() throws Exception{
//更新库存记录
this.insert2();
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("245");
List<CLRewardDto> cLRewards = awardResponse.jsonPath().getJsonObject("data.config.rewards");
logger.info("cLRewards的信息为"+cLRewards);
CLRewardDto cLReward = JSONObject.parseObject(JSON.toJSONString(cLRewards.get(0)),CLRewardDto.class);
for (int i=0;i<3;i++){
if ((i==0)||(i==1)){
Response response = playNewActivityResult("19935", "r3oq9gqkf", "245",2720,false);
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("245", "19935",2720);
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"));
}else if (i==2){
Response response = playNewActivityResult("19935", "r3oq9gqkf", "245",2720,false);
String type = String.valueOf(response.jsonPath().getString("lottery.type"));
Assert.assertTrue((type.contains("thanks"))||(type.contains("lucky")));
}
}
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId,Integer uid,Boolean flag) throws Exception {
Response response;
if (flag){
//不含collectRuleId字段
response = newActivityService.doJoin4(activityId, token, collectRuleId, uid);
}else {
//含collectRuleId字段
response = newActivityService.doJoin5(activityId, token, collectRuleId, uid);
}
Response playResponse = response;
// playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus21(orderId,uid);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus21(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId,Integer uid) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize3(collectRuleId, activityId,uid);
openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus31(orderId,uid);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus31(orderId,uid);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
@AfterMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void tearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19935_hdtool%'",null);
Boolean clearResult6 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_245%'",null);
Boolean clearResult7 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27175')",null);
Boolean clearResult8 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19935'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 集卡_指定卡片_不同奖项中奖条件测试
* Author: qianwenjun
* Date: 2018/3/13 17:06
* Description: 设置不同条件-中奖
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
* 〈设置不同条件-中奖〉
*
* @author qianwenjun
* @create 2018/3/13
* @since 1.0.0
*/
public class 集卡_指定卡片_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
@BeforeMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void clearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19936_hdtool%'",null);
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_246%'",null);
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27221')",null);
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19936'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void 集卡_中奖条件集卡A_3() throws Exception {
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("246");
String data = awardResponse.jsonPath().getString("data.config.rewards[0]");
String awardsName = awardResponse.jsonPath().getString("data.config.rewards[0].rlName");//"【勿动】自动化测试虚拟商品"
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");//virtual
//自定义活动游戏 结果
for(int i=0;i<3;i++) {
Response response = playNewActivityResult("19936", "r3oq9gqkf", "246");
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
}
// Thread.sleep(8000);
Response collectGoodsInfoResponse = newActivityService.getCollectGoodsInfo2("246",2720);
collectGoodsInfoResponse.prettyPrint();
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("246", "19936");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), awardsName, "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
logger.info("校验集卡抽奖奖项type、name成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
}
@Test
public void 集卡_不满足开奖条件() throws Exception{
for(int i=0;i<1;i++){
Response response = playNewActivityResult("19936", "r3oq9gqkf", "246");
//校验中奖结果类型
Assert.assertEquals(String.valueOf(response.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + response.jsonPath().getString("lottery.type"));
}
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = newActivityService.openCollectGoodsPrize2("246", "19936","未满足 中奖条件");
openResponse.prettyPrint();
logger.info("开奖结果是:" + openResponse.jsonPath().getString("lottery.message"));
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId) throws Exception {
Response playResponse = newActivityService.doJoin3(activityId, token, collectRuleId);
playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus2(orderId);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus2(orderId);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize(collectRuleId, activityId);
openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus3(orderId);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 30;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus3(orderId);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
// @AfterMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void tearDb() {
try {
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19936_hdtool%'",null);
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_246%'",null);
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27221')",null);
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19936'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.ManagerService;
import http.service.Activity.NewActivityService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import utils.MatcherString;
import java.lang.reflect.Method;
/**
* 〈集卡助力抽奖〉
*
* @author zhaoran
* @create 2018/07/04
* @since 1.0.0
*/
public class 集卡_邀请码测试_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
ManagerService managerService;
private static DuibaLog logger = DuibaLog.getLogger();
// private MysqlUtils jdbc;
private static String shareCode;
@BeforeMethod
//获取2720用户书旗活动邀请码
public void before() throws Exception {
shareCode=null;
Response response = newActivityService.getShareCode("31315","hdtool");
shareCode = String.valueOf(response.jsonPath().getString("shareCode"));
logger.info("2720用户每日优鲜邀请码为:"+shareCode);
// jdbc = MysqlUtils.mysqlDuiba("act_com_conf");
try {
jdbc.update("delete from act_com_conf.tb_share_code_record where invited_consumer_id = '100028002' and share_code = '11nktqh'", null);
jdbc.update("delete from act_com_conf.tb_share_code_record where invited_consumer_id = '100028002' and share_code = '11nktqk'", null);
} catch (Exception e) {
e.printStackTrace();
}
}
// @AfterClass
// public void after(){
// jdbc.releaseConn();
// }
@DataProvider
public Object[][] providerMethod(Method method){
Object[][] result = null;
if(method.getName().equals("邀请码抽奖")) {
result = new Object[][]{
new Object[]{1, 2720, "自己为自己助力"},
new Object[]{2, 2914, "他人为自己重复助力"},
new Object[]{3, 2914, "分享码无效"},
new Object[]{4, 2722, "分享助力成功抽卡"}
};
}
return result;
}
@Test(dataProvider = "providerMethod")
public void 邀请码抽奖(int casenum,int userId,String casename) throws Exception {
logger.info("-------------------------------------"+casename+"-------------------------------------");
logger.info("2720用户每日优鲜邀请码为:"+shareCode);
Assert.assertEquals(shareCode, "11nktqh", "校验shareCode失败");
//获取分享者2720用户集卡信息
Response response = newActivityService.getCollectGoodsInfo("3901");
String count = String.valueOf(response.jsonPath().getString("collectGoods[11].count"));
logger.info("助力前分享者2720用户双鱼座卡数量为:"+count);
count = String.valueOf(Integer.valueOf(count)+1);
//根据case选择对应的校验项
switch(casenum){
case 1:
response = newActivityService.doHelp(userId,"31315","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("code"),"2002002016","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("desc"),"不能邀请自己","校验message失败");
logger.info("校验项:code,desc,success成功");
break;
case 2:
response = newActivityService.doHelp(userId,"31315","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("code"),"2002002036","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("desc"),"单个好友助力上限","校验message失败");
logger.info("校验项:code,desc,success成功");
break;
case 3:
response = newActivityService.doHelp(userId,"31315","hdtool","11nktqhXXX");
Assert.assertEquals(response.jsonPath().getString("code"),"2002002015","校验errorCode失败");
Assert.assertEquals(response.jsonPath().getString("success"),"false","校验success失败");
Assert.assertEquals(response.jsonPath().getString("desc"),"分享码不存在","校验message失败");
logger.info("校验项:code,desc,success成功");
break;
case 4:
//获取助力者2722用户集卡信息
Response response_h = newActivityService.getCollectGoodsInfo2("3901",userId);
String count_h = String.valueOf(response_h.jsonPath().getString("collectGoods[11].count"));
logger.info("助力前分享者2722用户双鱼座卡数量为:"+count_h);
count_h = String.valueOf(Integer.valueOf(count_h)+1);
response = newActivityService.doHelp(userId,"31315","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验success失败");
String data = response.jsonPath().getString("data");
response = newActivityService.inviteBonusRecord(data,userId);
String recordStatus = response.jsonPath().getString("data.recordStatus");
int i= 10;
while(i>0&&(recordStatus.equals("0"))){
Thread.sleep(1000);
response = newActivityService.inviteBonusRecord(data,userId);
recordStatus = response.jsonPath().getString("data.recordStatus");
i--;
response.prettyPrint();
}
Assert.assertEquals(response.jsonPath().getString("data.activityId"),"31315","校验activityId失败");
Assert.assertEquals(response.jsonPath().getString("data.bizId"),data,"校验bizId失败");
Assert.assertTrue(response.jsonPath().getString("data.bonusDetail").contains("30702"),"校验bonusDetail失败");
Assert.assertTrue(response.jsonPath().getString("data.ruleConfig").contains("1299"),"校验ruleConfig失败");
Assert.assertEquals(response.jsonPath().getString("data.shareCode"),shareCode,"校验shareCode失败");
logger.info("助力成功!");
//助力后获取2722用户集卡信息
response_h = newActivityService.getCollectGoodsInfo2("3901",userId);
String countNew_h = String.valueOf(response_h.jsonPath().getString("collectGoods[11].count"));
logger.info("助力后2722用户双鱼座卡数量为:"+countNew_h);
Assert.assertEquals(countNew_h,count_h,"助力者未按照邀请码规则加上卡片");
//获取2720用户集卡信息
response = newActivityService.getCollectGoodsInfo("3901");
String countNew = String.valueOf(response.jsonPath().getString("collectGoods[11].count"));
logger.info("助力后2720用户双鱼座卡数量为:"+countNew);
Assert.assertEquals(countNew,count,"分享者未按照邀请码规则加上卡片");
break;
}
}
@Test
public void 邀请码抽奖_加次数() throws Exception {
String shareCode = "11nktqk";
logger.info("2720用户每日优鲜_规则2邀请码为:"+shareCode);
//获取分享者2720用户抽奖次数
Response response = newActivityService.ajaxElement("duiba","8946","31351","false");
String count = String.valueOf(response.jsonPath().getString("element.freeLimit"));
logger.info("助力前分享者2720用户抽奖次数为:"+count);
count = String.valueOf(Integer.valueOf(count)+1);
//获取助力者2722用户抽奖次数
Response response_h = newActivityService.ajaxElement(2722,"8946","31351");
String count_h = String.valueOf(response_h.jsonPath().getString("element.freeLimit"));
logger.info("助力前助力者2722用户抽奖次数为:"+count_h);
count_h = String.valueOf(Integer.valueOf(count_h)+1);
response = newActivityService.doHelp(2722,"31351","hdtool",shareCode);
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验success失败");
String data = response.jsonPath().getString("data");
response = newActivityService.inviteBonusRecord(data,2722);
String recordStatus = response.jsonPath().getString("data.recordStatus");
int i= 10;
while(i>0&&(recordStatus.equals("0"))){
Thread.sleep(1000);
response = newActivityService.inviteBonusRecord(data,2722);
recordStatus = response.jsonPath().getString("data.recordStatus");
i--;
//response.prettyPrint();
}
logger.info("doHelp接口返回:"+response.asString());
Assert.assertEquals(response.jsonPath().getString("data.activityId"),"31351","校验activityId失败");
Assert.assertEquals(response.jsonPath().getString("data.bizId"),data,"校验bizId失败");
String recordErrMsg = MatcherString.getString(response.asString(), "recordErrMsg\":(.*?),", 1);
if(recordErrMsg.equals("null")) {
Assert.assertTrue(response.jsonPath().getString("data.bonusDetail").contains("{\"times\":\"1\"}"), "校验bonusDetail失败");
Assert.assertTrue(response.jsonPath().getString("data.ruleConfig").contains("{\"times\":\"1\"}"), "校验ruleConfig失败");
Assert.assertEquals(response.jsonPath().getString("data.shareCode"), shareCode, "校验shareCode失败");
logger.info("助力成功!");
//助力后获取2722用户抽奖次数
response_h = newActivityService.ajaxElement(2722, "8946", "31351");
String countNew_h = String.valueOf(response_h.jsonPath().getString("element.freeLimit"));
logger.info("助力后2722用户抽卡次数为:" + countNew_h);
Assert.assertEquals(countNew_h, count_h, "助力者未按照邀请码规则加上抽奖次数");
//获取2720用户抽奖次数
response = newActivityService.ajaxElement("duiba", "8946", "31351", "false");
String countNew = String.valueOf(response.jsonPath().getString("element.freeLimit"));
logger.info("助力后2720用户抽奖次数为:" + countNew);
Assert.assertEquals(countNew, count, "分享者未按照邀请码规则加上抽奖次数");
}else{
logger.info("活动当日增加次数达到上限12次");
}
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 集卡_指定卡片_不同奖项中奖条件测试
* Author: qianwenjun
* Date: 2018/3/13 17:06
* Description: 设置不同条件-中奖
*/
package http.cases.CollectActivityTest;
import base.DuibaLog;
import base.DuibaTestBase;
import com.alibaba.fastjson.JSON;
import http.model.CollectGoodsInfo;
import http.service.Activity.NewActivityService;
import http.service.Manager.EditManagerInfoService;
import http.service.Manager.GetManagerInfoService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
/**
* 〈设置不同条件-中奖〉
*
* @author qianwenjun
* @create 2018/3/13
* @since 1.0.0
*/
public class 集卡_随机卡片_DuibaTest extends DuibaTestBase {
@Autowired
NewActivityService newActivityService;
@Autowired
GetManagerInfoService getManagerInfoService;
@Autowired
EditManagerInfoService editManagerInfoService;
private static DuibaLog logger = DuibaLog.getLogger();
@BeforeMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void clearDb() {
try {
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_247%'",null);
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27222','cl_good_cid_itemId_100025007_27223')",null);
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19937'",null);
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27226')",null);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void 集卡_中奖条件随机卡_2() throws Exception {
//获取集卡活动配置的奖品信息
Response awardResponse = getManagerInfoService.getCollectAwardsInfo("247");
String data = awardResponse.jsonPath().getString("data.config.rewards[0]");
String awardsName = awardResponse.jsonPath().getString("data.config.rewards[0].rlName");//"【勿动】自动化测试虚拟商品"
String awardsType = awardResponse.jsonPath().getString("data.config.rewards[0].rlType");//virtual
//自定义活动游戏 结果
Response playResponse = playNewActivityResult("19937", "r3oq9gqkf", "247");
playResponse.prettyPrint();
//校验中奖结果类型
String itemId= playResponse.jsonPath().getString("lottery.itemId");
Assert.assertEquals(String.valueOf(playResponse.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + playResponse.jsonPath().getString("lottery.type"));
logger.info("中奖卡片id为" + itemId);
Response myCollectInfoResponse = newActivityService.getCollectGoodsInfo2("247",2720);
List<CollectGoodsInfo> myCollectInfos = myCollectInfoResponse.jsonPath().getList("collectGoods",CollectGoodsInfo.class);
logger.info("myCollectInfo的信息为"+JSON.toJSONString(myCollectInfos));
for (CollectGoodsInfo info:myCollectInfos){
if (info.getId().equals(itemId)){
Assert.assertEquals(info.getCount(),"1","校验卡片数量失败");
}else {
break;
}
}
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = playCollectResult("247", "19937");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.title"), awardsName, "校验奖项失败");
Assert.assertEquals(openResponse.jsonPath().getString("lottery.type"), awardsType, "校验奖项失败");
logger.info("校验集卡抽奖奖项type、name成功,奖品信息为:" + openResponse.jsonPath().getString("lottery.title"));
Response myCollectInfoResponse2 = newActivityService.getCollectGoodsInfo2("247",2720);
List<CollectGoodsInfo> myCollectInfos2 = myCollectInfoResponse2.jsonPath().getList("collectGoods",CollectGoodsInfo.class);
logger.info("开奖之后,myCollectInfo的信息为"+JSON.toJSONString(myCollectInfos2));
for (CollectGoodsInfo info:myCollectInfos2){
if (info.getId().equals(itemId)){
Assert.assertEquals(info.getCount(),"0","校验开奖后卡片数量减少失败");
}else {
break;
}
}
}
@Test
public void 集卡_随机卡_不满足开奖条件() throws Exception{
String itemId = null;
for(int i=0;i<2;i++){
Response playResponse = playNewActivityResult("19938", "r3oq9gqkf", "248");
//校验中奖结果类型
itemId= playResponse.jsonPath().getString("lottery.itemId");
Assert.assertEquals(String.valueOf(playResponse.jsonPath().getString("lottery.type")), "collectGoods", "校验中奖类型失败");
logger.info("校验中奖奖品类型成功,自定义活动游戏中奖奖品类型" + playResponse.jsonPath().getString("lottery.type"));
logger.info("中奖卡片id为" + itemId);
}
Response myCollectInfoResponse = newActivityService.getCollectGoodsInfo2("248",2720);
List<CollectGoodsInfo> myCollectInfos = myCollectInfoResponse.jsonPath().getList("collectGoods",CollectGoodsInfo.class);
logger.info("myCollectInfo的信息为"+JSON.toJSONString(myCollectInfos));
for (CollectGoodsInfo info:myCollectInfos){
if (info.getId().equals(itemId)){
Assert.assertEquals(info.getCount(),"2","校验卡片数量失败");
}else {
break;
}
}
//集卡结束后开奖--开奖类型:直接开奖
Response openResponse = newActivityService.openCollectGoodsPrize2("248", "19938","未满足 中奖条件");
openResponse.prettyPrint();
logger.info("开奖结果是:" + openResponse.jsonPath().getString("lottery.message"));
}
public Response playNewActivityResult(String activityId, String token, String collectRuleId) throws Exception {
Response playResponse = newActivityService.doJoin3(activityId, token, collectRuleId);
playResponse.prettyPrint();
String orderId = playResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus2(orderId);
// statusResponse.prettyPrint();
String playResult = statusResponse.jsonPath().getString("result");
int i = 8;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus2(orderId);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// statusResponse.prettyPrint();
}
return statusResponse;
}
public Response playCollectResult(String collectRuleId, String activityId) throws Exception {
Response openResponse = newActivityService.openCollectGoodsPrize(collectRuleId, activityId);
openResponse.prettyPrint();
String orderId = openResponse.jsonPath().getString("orderId");
Response statusResponse = newActivityService.getOrderStatus3(orderId);
// logger.info("开奖结果如下1:");
// statusResponse.prettyPrint();
String playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
int i = 8;
while (i > 0 && (playResult.equals("0"))) {
Thread.sleep(1000);
statusResponse = newActivityService.getOrderStatus3(orderId);
playResult = String.valueOf(statusResponse.jsonPath().getString("result"));
i--;
// logger.info("开奖结果如下2:");
// statusResponse.prettyPrint();
}
return statusResponse;
}
// @AfterMethod
//每个方法之前清理数据库数据,保证无脏数据影响测试结果
public void tearDb() {
try {
//清除自定义活动-中奖奖品数量信息(5种)
Boolean clearResult1 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%activity-centerwinOptionNum_100025007_19123_hdtool%'",null);
//清除集卡规则n等级奖项-中奖次数(集卡规则id:8)
Boolean clearResult2 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey like '%cl_good_cid_Crule_grade_100025007_8%'",null);
//清除收集的集卡商品数量(集卡商品id:27148,27147,27146,27145,27144)
Boolean clearResult3 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey in ('cl_good_cid_itemId_100025007_27154','cl_good_cid_itemId_100025007_27155','cl_good_cid_itemId_100025007_27156','cl_good_cid_itemId_100025007_27157','cl_good_cid_itemId_100025007_27158')",null);
//清除用户参与活动次数(活动id:19009)
Boolean clearResult4 = jdbc.update("delete from ckvtable.tb_kvtable_0687 where consumer_id = 100025007 and vkey = 'activity-centerjoinNum_100025007_19123'",null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 兑吧_优惠券秒杀商品兑换测试_AccessTest extends DuibaTestBase {
public class 兑吧_优惠券秒杀商品兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 兑吧_实物秒杀商品兑换测试_AccessTest extends DuibaTestBase {
public class 兑吧_实物秒杀商品兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 天天秒杀_秒杀活动兑换测试_AccessTest
* FileName: 天天秒杀_秒杀活动兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/6/20 20:38
* Description:
......@@ -37,7 +37,7 @@ import static io.restassured.RestAssured.given;
* @create 2018/6/20
* @since 1.0.0
*/
public class 天天秒杀_秒杀活动兑换测试_AccessTest extends DuibaTestBase {
public class 天天秒杀_秒杀活动兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
SeckillService seckillService;
......
/**
* Copyright (C), 2015-2018
* FileName: 天天秒杀_秒杀详情测试_AccessTest
* FileName: 天天秒杀_秒杀详情测试_ScekillTest
* Author: qianwenjun
* Date: 2018/6/20 11:46
* Description:
......@@ -36,7 +36,7 @@ import static io.restassured.RestAssured.given;
* @create 2018/6/20
* @since 1.0.0
*/
public class 天天秒杀_秒杀详情测试_AccessTest extends DuibaTestBase {
public class 天天秒杀_秒杀详情测试_ScekillTest extends DuibaTestBase {
@Autowired
SeckillService seckillService;
......
/**
* Copyright (C), 2015-2018
* FileName: 秒杀_秒杀商品详情测试_AccessTest
* FileName: 秒杀_秒杀商品详情测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 19:19
* Description:
......@@ -27,7 +27,7 @@ import utils.MatcherString;
* @create 2018/5/31
* @since 1.0.0
*/
public class 秒杀_秒杀商品详情测试_AccessTest extends DuibaTestBase {
public class 秒杀_秒杀商品详情测试_ScekillTest extends DuibaTestBase {
@Autowired
SeckillService seckillService;
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 秒杀商品_兑换异常库存不足测试_AccessTest extends DuibaTestBase {
public class 秒杀商品_兑换异常库存不足测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -27,7 +27,7 @@ import utils.MatcherString;
* @create 2018/5/31
* @since 1.0.0
*/
public class 秒杀商品_地址限制兑换异常测试_AccessTest extends DuibaTestBase {
public class 秒杀商品_地址限制兑换异常测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 秒杀商品_达到兑换限制异常测试_AccessTest extends DuibaTestBase {
public class 秒杀商品_达到兑换限制异常测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 自有_优惠券秒杀商品兑换测试_AccessTest extends DuibaTestBase {
public class 自有_优惠券秒杀商品兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -29,7 +29,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 自有_实物秒杀商品兑换测试_AccessTest extends DuibaTestBase {
public class 自有_实物秒杀商品兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
......
/**
* Copyright (C), 2015-2018
* FileName: 兑吧_优惠券秒杀商品兑换测试_AccessTest
* FileName: 兑吧_优惠券秒杀商品兑换测试_ScekillTest
* Author: qianwenjun
* Date: 2018/5/31 17:57
* Description: 开发者自有秒杀商品测试
......@@ -30,7 +30,7 @@ import java.util.Map;
* @create 2018/5/31
* @since 1.0.0
*/
public class 自有_虚拟商品秒杀商品兑换测试_AccessTest extends DuibaTestBase {
public class 自有_虚拟商品秒杀商品兑换测试_ScekillTest extends DuibaTestBase {
@Autowired
......
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