Commit 87b8e051 authored by 钱雯君's avatar 钱雯君

add

parent c5ac9209
...@@ -28,7 +28,7 @@ public class PluginDrawingtool_pluginTest extends DuibaTestBase { ...@@ -28,7 +28,7 @@ public class PluginDrawingtool_pluginTest extends DuibaTestBase {
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4309;
@DataProvider @DataProvider
public Object[][] providerMethod(Method method) { public Object[][] providerMethod(Method method) {
......
...@@ -37,7 +37,7 @@ public class 插件_优惠券测试_pluginTest extends DuibaTestBase { ...@@ -37,7 +37,7 @@ public class 插件_优惠券测试_pluginTest extends DuibaTestBase {
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4310;
@DataProvider @DataProvider
public Object[][] providerMethod(Method method){ public Object[][] providerMethod(Method method){
......
...@@ -43,7 +43,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -43,7 +43,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4308;
private Map<String,String> orderIds = new HashMap<>(); private Map<String,String> orderIds = new HashMap<>();
@Test @Test
...@@ -53,7 +53,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -53,7 +53,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
Response response = playPlugin(uid,"2158"); Response response = playPlugin(uid,"2158");
response.prettyPrint(); response.prettyPrint();
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配");
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2158&appId=2239&consumerId=100026000"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2158&appId=2239&consumerId=100092867"), "福袋url与实际url不匹配");
Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败"); Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败");
Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败"); Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败");
Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败"); Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败");
...@@ -61,7 +61,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -61,7 +61,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
String[] orderId = plugin_orderId.split("_"); String[] orderId = plugin_orderId.split("_");
logger.info("orderId="+orderId[1]); logger.info("orderId="+orderId[1]);
Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]); Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]);
Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0656 where order_num = ?\n",orderId[1]); Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0963 where order_num = ?\n",orderId[1]);
Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败"); Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败");
Assert.assertEquals(order.get("activity_option_id").toString(),"6594","校验订单奖项id失败"); Assert.assertEquals(order.get("activity_option_id").toString(),"6594","校验订单奖项id失败");
Assert.assertEquals(order_con.get("activity_option_type").toString(),"lucky","校验数据库类型失败"); Assert.assertEquals(order_con.get("activity_option_type").toString(),"lucky","校验数据库类型失败");
...@@ -80,7 +80,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -80,7 +80,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
Response response = playPlugin(uid,"2172"); Response response = playPlugin(uid,"2172");
response.prettyPrint(); response.prettyPrint();
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配");
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2172&appId=2239&consumerId=100026000"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2172&appId=2239&consumerId=100092867"), "福袋url与实际url不匹配");
Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败"); Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败");
Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败"); Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败");
Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败"); Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败");
...@@ -90,7 +90,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -90,7 +90,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
String[] orderId = plugin_orderId.split("_"); String[] orderId = plugin_orderId.split("_");
logger.info("orderId="+orderId[1]); logger.info("orderId="+orderId[1]);
Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]); Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]);
Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0656 where order_num = ?\n",orderId[1]); Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0963 where order_num = ?\n",orderId[1]);
logger.info("order="+ JSON.toJSONString(order)); logger.info("order="+ JSON.toJSONString(order));
Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败"); Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败");
Assert.assertTrue(order.get("activity_option_id").toString().isEmpty()); Assert.assertTrue(order.get("activity_option_id").toString().isEmpty());
...@@ -113,7 +113,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -113,7 +113,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
String orderId = orderIds.get("2173"); String orderId = orderIds.get("2173");
logger.info("orderId="+orderId); logger.info("orderId="+orderId);
Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId); Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId);
Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0656 where order_num = ?\n",orderId); Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0963 where order_num = ?\n",orderId);
logger.info("order="+ JSON.toJSONString(order)); logger.info("order="+ JSON.toJSONString(order));
Assert.assertEquals(order.get("activity_option_type").toString(),"thanks","校验数据库类型失败"); Assert.assertEquals(order.get("activity_option_type").toString(),"thanks","校验数据库类型失败");
Assert.assertEquals(order.get("activity_option_id").toString(),"6634","校验订单奖项id失败"); Assert.assertEquals(order.get("activity_option_id").toString(),"6634","校验订单奖项id失败");
...@@ -132,7 +132,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -132,7 +132,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
Response response = playPlugin(uid,"2174"); Response response = playPlugin(uid,"2174");
response.prettyPrint(); response.prettyPrint();
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("//activity.tuiatest.cn/activity/redirect?orderId=plugin"), "福袋url与实际url不匹配");
Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2174&appId=2239&consumerId=100026000"), "福袋url与实际url不匹配"); Assert.assertTrue(response.jsonPath().getString("lottery.iosDownloadUrl").contains("activityId=2174&appId=2239&consumerId=100092867"), "福袋url与实际url不匹配");
Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败"); Assert.assertEquals(response.jsonPath().getString("lottery.type"), "lucky", "校验type失败");
Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败"); Assert.assertEquals(response.jsonPath().getString("lottery.showUse"), "true", "校验显示按钮失败");
Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败"); Assert.assertEquals(response.jsonPath().getString("lottery.useBtnText"), "马上使用", "校验useBtnText失败");
...@@ -142,7 +142,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -142,7 +142,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
String[] orderId = plugin_orderId.split("_"); String[] orderId = plugin_orderId.split("_");
logger.info("orderId="+orderId[1]); logger.info("orderId="+orderId[1]);
Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]); Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId[1]);
Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0656 where order_num = ?\n",orderId[1]); Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0963 where order_num = ?\n",orderId[1]);
logger.info("order="+ JSON.toJSONString(order)); logger.info("order="+ JSON.toJSONString(order));
Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败"); Assert.assertEquals(order.get("activity_option_type").toString(),"lucky","校验数据库类型失败");
Assert.assertTrue(order.get("activity_option_id").toString().isEmpty()); Assert.assertTrue(order.get("activity_option_id").toString().isEmpty());
...@@ -166,7 +166,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase ...@@ -166,7 +166,7 @@ public class 插件_谢谢参与转福袋测试_pluginTest extends DuibaTestBase
String orderId = orderIds.get("2175"); String orderId = orderIds.get("2175");
logger.info("orderId="+orderId); logger.info("orderId="+orderId);
Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId); Map<String,Object> order = jdbc.findSimpleResult("select * from activity_order.tb_trade_center_activity_order where order_num = ?\n",orderId);
Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0656 where order_num = ?\n",orderId); Map<String,Object> order_con = jdbc.findSimpleResult("select * from activity_order_con.tb_trade_center_activity_order_0963 where order_num = ?\n",orderId);
logger.info("order="+ JSON.toJSONString(order)); logger.info("order="+ JSON.toJSONString(order));
Assert.assertEquals(order.get("activity_option_type").toString(),"thanks","校验数据库类型失败"); Assert.assertEquals(order.get("activity_option_type").toString(),"thanks","校验数据库类型失败");
Assert.assertTrue(order.get("activity_option_id").toString().isEmpty());//插件活动不配置谢谢参与奖项 Assert.assertTrue(order.get("activity_option_id").toString().isEmpty());//插件活动不配置谢谢参与奖项
......
...@@ -36,7 +36,7 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase { ...@@ -36,7 +36,7 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase {
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4307;
private static final Integer uid_SubCredits = 3280; private static final Integer uid_SubCredits = 3280;
...@@ -50,8 +50,8 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase { ...@@ -50,8 +50,8 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase {
Response response = playPlugin(uid,"2199"); Response response = playPlugin(uid,"2199");
response.prettyPrint(); response.prettyPrint();
} }
Map<String,Object> freeTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0656 where vkey = 'activity-centerjoinPlugdrawNum_100026000_plugdraw_2199'\n"); Map<String,Object> freeTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0962 where vkey = 'activity-centerjoinPlugdrawNum_100092866_plugdraw_2199'\n");
Map<String,Object> actcommcTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0656 where vkey = 'ACTCOMMC_K075_100026000_plugdraw_2199'\n"); Map<String,Object> actcommcTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0962 where vkey = 'ACTCOMMC_K075_100092866_plugdraw_2199'\n");
// Assert.assertEquals(freeTimes.get("int_value").toString(),"2","免费次数记录校验失败"); // Assert.assertEquals(freeTimes.get("int_value").toString(),"2","免费次数记录校验失败");
Assert.assertEquals(actcommcTimes.get("int_value").toString(),"2","限制次数记录校验失败"); Assert.assertEquals(actcommcTimes.get("int_value").toString(),"2","限制次数记录校验失败");
Response doJoinResponse = activityPlugDrawInfoService.doJoinPlugdraw_false(uid,"2199"); Response doJoinResponse = activityPlugDrawInfoService.doJoinPlugdraw_false(uid,"2199");
...@@ -73,8 +73,8 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase { ...@@ -73,8 +73,8 @@ public class 插件_限制次数测试_pluginTest extends DuibaTestBase {
tear2(); tear2();
Response response = playPlugin(uid,"2206"); Response response = playPlugin(uid,"2206");
response.prettyPrint(); response.prettyPrint();
Map<String,Object> freeTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0656 where vkey = 'activity-centerjoinPlugdrawNum_100026000_plugdraw_2206'\n"); Map<String,Object> freeTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0962 where vkey = 'activity-centerjoinPlugdrawNum_100092866_plugdraw_2206'\n");
Map<String,Object> actcommcTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0656 where vkey = 'ACTCOMMC_K075_100026000_plugdraw_2206'\n"); Map<String,Object> actcommcTimes = jdbc.findSimpleResult("select * from ckvtable.tb_kvtable_0962 where vkey = 'ACTCOMMC_K075_100092866_plugdraw_2206'\n");
Assert.assertEquals(freeTimes.get("int_value").toString(),"1","免费次数记录校验失败"); Assert.assertEquals(freeTimes.get("int_value").toString(),"1","免费次数记录校验失败");
Assert.assertEquals(actcommcTimes.get("int_value").toString(),"1","限制次数记录校验失败"); Assert.assertEquals(actcommcTimes.get("int_value").toString(),"1","限制次数记录校验失败");
Response doJoinResponse = activityPlugDrawInfoService.doJoinPlugdraw_false(uid,"2206"); Response doJoinResponse = activityPlugDrawInfoService.doJoinPlugdraw_false(uid,"2206");
......
...@@ -49,7 +49,7 @@ public class 插件出奖异常测试_pluginTest extends DuibaTestBase { ...@@ -49,7 +49,7 @@ public class 插件出奖异常测试_pluginTest extends DuibaTestBase {
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
private String url = "http://activity.m.duibatest.com.cn"; private String url = "http://activity.m.duibatest.com.cn";
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4301;
@DataProvider @DataProvider
public Iterator<Object[]> providerMethod(Method method) throws IOException { public Iterator<Object[]> providerMethod(Method method) throws IOException {
......
...@@ -44,7 +44,7 @@ public class 插件出奖成功测试_pluginTest extends DuibaTestBase { ...@@ -44,7 +44,7 @@ public class 插件出奖成功测试_pluginTest extends DuibaTestBase {
private static DuibaLog logger = DuibaLog.getLogger(); private static DuibaLog logger = DuibaLog.getLogger();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4300;
@DataProvider @DataProvider
public Iterator<Object[]> providerMethod(Method method) throws IOException { public Iterator<Object[]> providerMethod(Method method) throws IOException {
......
...@@ -37,7 +37,9 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase { ...@@ -37,7 +37,9 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase {
// private MysqlUtils jdbc; // private MysqlUtils jdbc;
private String url = "http://activity.m.duibatest.com.cn"; private String url = "http://activity.m.duibatest.com.cn";
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4299;
private static String consumerId = "100092863";
// @BeforeClass // @BeforeClass
// public void before(){ // public void before(){
...@@ -105,7 +107,7 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase { ...@@ -105,7 +107,7 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase {
String creditsNew = String.valueOf(mapUser.get("credits")); String creditsNew = String.valueOf(mapUser.get("credits"));
logger.info("抽奖后的用户表积分:" + creditsNew); logger.info("抽奖后的用户表积分:" + creditsNew);
//获取consumer表的积分 //获取consumer表的积分
Map<String,Object> mapConsumer = jdbc.findSimpleResult("SELECT * FROM new_consumer.consumer_0010 WHERE `app_id` = 2239 AND id = 100026000"); Map<String,Object> mapConsumer = jdbc.findSimpleResult("SELECT * FROM new_consumer.consumer_0010 WHERE `app_id` = 2239 AND id = ?",consumerId);
String creditsCon = String.valueOf(mapConsumer.get("credits")); String creditsCon = String.valueOf(mapConsumer.get("credits"));
logger.info("consumer表用户积分" + creditsCon); logger.info("consumer表用户积分" + creditsCon);
...@@ -130,7 +132,7 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase { ...@@ -130,7 +132,7 @@ public class 插件工具抽奖测试_pluginTest extends DuibaTestBase {
}finally { }finally {
//清除kvtable数据,可重新抽奖 //清除kvtable数据,可重新抽奖
jdbc.update("UPDATE ckvtable.tb_kvtable_0656 SET int_value = '0' WHERE id = '268'"); jdbc.update("UPDATE ckvtable.tb_kvtable_0959 SET int_value = '0' WHERE id = '268'");
} }
......
...@@ -46,7 +46,7 @@ public class 插件抽奖工具中虚拟商品测试_pluginTest extends DuibaTes ...@@ -46,7 +46,7 @@ public class 插件抽奖工具中虚拟商品测试_pluginTest extends DuibaTes
private List<Map<String,String>> virtualOrderIds = new ArrayList<>(); private List<Map<String,String>> virtualOrderIds = new ArrayList<>();
//指定用户 //指定用户
private static int uid = 2721; private static int uid = 4298;
@Test @Test
public void 插件_0积分抽奖测试() { public void 插件_0积分抽奖测试() {
......
...@@ -42,7 +42,7 @@ public class HbaseService { ...@@ -42,7 +42,7 @@ public class HbaseService {
parm.put("key",key); parm.put("key",key);
parm.put("code","DuiBaHbase"); parm.put("code","DuiBaHbase");
Response response = given().cookies(authorization.dafuwengLogin(2721)).params(parm).get(url); Response response = given().cookies(authorization.dafuwengLogin(4309)).params(parm).get(url);
// response.prettyPrint(); // response.prettyPrint();
return response; return response;
...@@ -57,7 +57,7 @@ public class HbaseService { ...@@ -57,7 +57,7 @@ public class HbaseService {
parm.put("key",key); parm.put("key",key);
parm.put("code","DuiBaHbase"); parm.put("code","DuiBaHbase");
Response response = given().cookies(authorization.dafuwengLogin(2721)).params(parm).get(url); Response response = given().cookies(authorization.dafuwengLogin(4309)).params(parm).get(url);
// response.prettyPrint(); // response.prettyPrint();
// return response; // return response;
......
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