Commit 48c63f71 authored by 吕雯燕's avatar 吕雯燕

Merge branch 'master' into duiba_wenyan

parents c07c1684 6f9210c5
......@@ -37,9 +37,9 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
Object[][] result = null;
if(method.getName().equals("新建自有积分商城活动工具")) {
result = new Object[][]{
new Object[]{1, "5","everyday","3","everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】自有优惠券\",\"limit\":\"1\",\"low\":\"2\",\"remaind\":\"100\"},{\"type\":\"object\",\"title\":\"实物\",\"img\":\"//yun.duiba.com.cn/upload/1uF0l1462438316968.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":177222,\"name\":\"【自动化】自有实物\",\"limit\":\"2\",\"low\":\"3\",\"remaind\":\"90\"},{\"type\":\"virtual\",\"title\":\"虚拟商品\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":178060,\"value\":\"test\",\"limit\":\"3\",\"low\":\"4\",\"remaind\":\"80\"},{\"type\":\"alipay\",\"title\":\"支付宝\",\"img\":\"//yun.duiba.com.cn/upload/KkZMp1462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"1\",\"limit\":\"4\",\"low\":\"5\",\"remaind\":\"70\"},{\"type\":\"qb\",\"title\":\"Q币\",\"img\":\"//yun.duiba.com.cn/upload/mF3wO1462438317114.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"limit\":\"5\",\"low\":\"6\",\"remaind\":\"60\"},{\"type\":\"lucky\",\"title\":\"福袋\",\"img\":\"//yun.duiba.com.cn/webapp/img/luckynewn.png\",\"valid\":true,\"probability\":\"10\",\"show\":false,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"},{\"type\":\"again\",\"title\":\"再抽一次\",\"img\":\"//yun.duiba.com.cn/upload/aJwb11462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"}]"
new Object[]{1, "5","everyday","3","everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】zr自有优惠券\",\"limit\":\"1\",\"low\":\"2\",\"remaind\":\"100\"},{\"type\":\"object\",\"title\":\"实物\",\"img\":\"//yun.duiba.com.cn/upload/1uF0l1462438316968.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":177222,\"name\":\"【自动化】自有实物\",\"limit\":\"2\",\"low\":\"3\",\"remaind\":\"90\"},{\"type\":\"virtual\",\"title\":\"虚拟商品\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":178060,\"value\":\"test\",\"limit\":\"3\",\"low\":\"4\",\"remaind\":\"80\"},{\"type\":\"alipay\",\"title\":\"支付宝\",\"img\":\"//yun.duiba.com.cn/upload/KkZMp1462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"1\",\"limit\":\"4\",\"low\":\"5\",\"remaind\":\"70\"},{\"type\":\"qb\",\"title\":\"Q币\",\"img\":\"//yun.duiba.com.cn/upload/mF3wO1462438317114.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"limit\":\"5\",\"low\":\"6\",\"remaind\":\"60\"},{\"type\":\"lucky\",\"title\":\"福袋\",\"img\":\"//yun.duiba.com.cn/webapp/img/luckynewn.png\",\"valid\":true,\"probability\":\"10\",\"show\":false,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"},{\"type\":\"again\",\"title\":\"再抽一次\",\"img\":\"//yun.duiba.com.cn/upload/aJwb11462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"}]"
,"//yun.duiba.com.cn/upload/newHdTool/turntable_cricle/banner_750x220.png","新建自有积分商城活动工具--每日次数"}, //case1
new Object[]{2, "10", "forever", "3","forever","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":169713,\"name\":\"【勿动】兑吧优惠券扣库存\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"10\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172293,\"name\":\"【勿动】兑吧优惠券下载链接兑换记录页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券4\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174797,\"name\":\"【勿动】兑吧优惠券预分配库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券5\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174923,\"name\":\"【勿动】兑吧优惠券共享库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券6\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172292,\"name\":\"【勿动】兑吧优惠券下载链接商家落地页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券7\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":true,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":175605,\"name\":\"【勿动】兑吧优惠券地区兑换白名单不可兑\",\"remaind\":\"199\"}]"
new Object[]{2, "10", "forever", "3","forever","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】zr自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":169713,\"name\":\"【勿动】兑吧优惠券扣库存\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"10\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172293,\"name\":\"【勿动】兑吧优惠券下载链接兑换记录页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券4\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174797,\"name\":\"【勿动】兑吧优惠券预分配库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券5\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174923,\"name\":\"【勿动】兑吧优惠券共享库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券6\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172292,\"name\":\"【勿动】兑吧优惠券下载链接商家落地页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券7\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":true,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":175605,\"name\":\"【勿动】兑吧优惠券地区兑换白名单不可兑\",\"remaind\":\"199\"}]"
,"//yun.dui88.com/images/201811/2yyblucaps.jpg","新建自有积分商城活动工具--永久次数"}, //case2
};
......@@ -47,9 +47,9 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
}else
if (method.getName().equals("新建自有独立活动工具")){
result = new Object[][]{
new Object[]{1, "10","everyday","everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】自有优惠券\",\"limit\":\"1\",\"low\":\"2\",\"remaind\":\"100\"},{\"type\":\"object\",\"title\":\"实物\",\"img\":\"//yun.duiba.com.cn/upload/1uF0l1462438316968.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":177222,\"name\":\"【自动化】自有实物\",\"limit\":\"2\",\"low\":\"3\",\"remaind\":\"90\"},{\"type\":\"virtual\",\"title\":\"虚拟商品\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":178060,\"value\":\"test\",\"limit\":\"3\",\"low\":\"4\",\"remaind\":\"80\"},{\"type\":\"alipay\",\"title\":\"支付宝\",\"img\":\"//yun.duiba.com.cn/upload/KkZMp1462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"1\",\"limit\":\"4\",\"low\":\"5\",\"remaind\":\"70\"},{\"type\":\"qb\",\"title\":\"Q币\",\"img\":\"//yun.duiba.com.cn/upload/mF3wO1462438317114.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"limit\":\"5\",\"low\":\"6\",\"remaind\":\"60\"},{\"type\":\"lucky\",\"title\":\"福袋\",\"img\":\"//yun.duiba.com.cn/webapp/img/luckynewn.png\",\"valid\":true,\"probability\":\"10\",\"show\":false,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"},{\"type\":\"again\",\"title\":\"再抽一次\",\"img\":\"//yun.duiba.com.cn/upload/aJwb11462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"}]"
new Object[]{1, "10","everyday","everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】zr自有优惠券\",\"limit\":\"1\",\"low\":\"2\",\"remaind\":\"100\"},{\"type\":\"object\",\"title\":\"实物\",\"img\":\"//yun.duiba.com.cn/upload/1uF0l1462438316968.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":177222,\"name\":\"【自动化】自有实物\",\"limit\":\"2\",\"low\":\"3\",\"remaind\":\"90\"},{\"type\":\"virtual\",\"title\":\"虚拟商品\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":178060,\"value\":\"test\",\"limit\":\"3\",\"low\":\"4\",\"remaind\":\"80\"},{\"type\":\"alipay\",\"title\":\"支付宝\",\"img\":\"//yun.duiba.com.cn/upload/KkZMp1462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"1\",\"limit\":\"4\",\"low\":\"5\",\"remaind\":\"70\"},{\"type\":\"qb\",\"title\":\"Q币\",\"img\":\"//yun.duiba.com.cn/upload/mF3wO1462438317114.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"limit\":\"5\",\"low\":\"6\",\"remaind\":\"60\"},{\"type\":\"lucky\",\"title\":\"福袋\",\"img\":\"//yun.duiba.com.cn/webapp/img/luckynewn.png\",\"valid\":true,\"probability\":\"10\",\"show\":false,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"},{\"type\":\"again\",\"title\":\"再抽一次\",\"img\":\"//yun.duiba.com.cn/upload/aJwb11462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\"}]"
,"//yun.duiba.com.cn/upload/newHdTool/turntable_cricle/banner_750x220.png","新建自有独立活动工具--每日次数"}, //case1
new Object[]{2, "50", "forever", "everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":169713,\"name\":\"【勿动】兑吧优惠券扣库存\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"10\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172293,\"name\":\"【勿动】兑吧优惠券下载链接兑换记录页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券4\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174797,\"name\":\"【勿动】兑吧优惠券预分配库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券5\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174923,\"name\":\"【勿动】兑吧优惠券共享库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券6\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172292,\"name\":\"【勿动】兑吧优惠券下载链接商家落地页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券7\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":true,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":175605,\"name\":\"【勿动】兑吧优惠券地区兑换白名单不可兑\",\"remaind\":\"199\"}]"
new Object[]{2, "50", "forever", "everyday","[{\"index\":1,\"type\":\"thanks\",\"img\":\"//yun.duiba.com.cn/upload/uP99F1462438316972.png\",\"title\":\"谢谢参与\",\"valid\":true,\"show\":true},{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】zr自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":169713,\"name\":\"【勿动】兑吧优惠券扣库存\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"10\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172293,\"name\":\"【勿动】兑吧优惠券下载链接兑换记录页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券4\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174797,\"name\":\"【勿动】兑吧优惠券预分配库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券5\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":174923,\"name\":\"【勿动】兑吧优惠券共享库存测试\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券6\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":false,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172292,\"name\":\"【勿动】兑吧优惠券下载链接商家落地页\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券7\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"10\",\"show\":true,\"arealimit\":true,\"pronumber\":\"\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":175605,\"name\":\"【勿动】兑吧优惠券地区兑换白名单不可兑\",\"remaind\":\"199\"}]"
,"//yun.dui88.com/images/201811/2yyblucaps.jpg","新建自有独立活动工具--永久次数"}, //case2
};
......@@ -57,7 +57,7 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
if(method.getName().equals("新建自有单品抽奖活动")){
result = new Object[][]{
new Object[]{1,"177222","【自动化】自有实物","object","100","5","everyday","//yun.dui88.com/images/201811/hvhlu2ggta.png","0","","false","新建自有单品抽奖--每日次数"}, //case1
new Object[]{2,"159857","【自动化勿动】自有优惠券","coupon","2000","5","forever","//yun.dui88.com/images/201811/hvhlu2ggta.png","2","2","true","新建自有单品抽奖--永久次数和会员等级"}, //case1
new Object[]{2,"159857","【自动化勿动】zr自有优惠券","coupon","2000","5","forever","//yun.dui88.com/images/201811/hvhlu2ggta.png","2","2","true","新建自有单品抽奖--永久次数和会员等级"}, //case1
};
......@@ -74,7 +74,7 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
new Object[]{1,"[{\"type\":\"coupon\",\"title\":\"优惠券\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"1\",\"show\":true,\"arealimit\":false,\"pronumber\":\"1\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172178,\"name\":\"【勿动】自有优惠券审核通过测试\",\"remaind\":\"100\"},{\"type\":\"object\",\"title\":\"实物\",\"img\":\"//yun.duiba.com.cn/upload/1uF0l1462438316968.png\",\"valid\":true,\"probability\":\"2\",\"show\":true,\"arealimit\":false,\"pronumber\":\"2\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":175491,\"name\":\"【自动化】自有实物19:51:09\",\"remaind\":\"90\"},{\"type\":\"virtual\",\"title\":\"虚拟商品\",\"img\":\"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png\",\"valid\":true,\"probability\":\"3\",\"show\":true,\"arealimit\":false,\"pronumber\":\"3\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":178060,\"value\":\"test\",\"remaind\":\"80\"},{\"type\":\"phonebill\",\"title\":\"话费\",\"img\":\"//yun.duiba.com.cn/upload/AROxS1462438316966.png\",\"valid\":true,\"probability\":\"4\",\"show\":true,\"arealimit\":false,\"pronumber\":\"4\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"remaind\":\"70\"},{\"type\":\"alipay\",\"title\":\"支付宝\",\"img\":\"//yun.duiba.com.cn/upload/KkZMp1462438317113.png\",\"valid\":true,\"probability\":\"5\",\"show\":true,\"arealimit\":false,\"pronumber\":\"5\",\"alipay\":\"\",\"description\":\"\",\"value\":\"1\",\"remaind\":\"60\"},{\"type\":\"qb\",\"title\":\"Q币\",\"img\":\"//yun.duiba.com.cn/upload/mF3wO1462438317114.png\",\"valid\":true,\"probability\":\"6\",\"show\":true,\"arealimit\":false,\"pronumber\":\"6\",\"alipay\":\"\",\"description\":\"\",\"value\":\"10\",\"remaind\":\"50\"},{\"type\":\"lucky\",\"title\":\"福袋\",\"img\":\"//yun.duiba.com.cn/webapp/img/luckynewn.png\",\"valid\":true,\"probability\":\"0\",\"show\":false,\"arealimit\":false,\"pronumber\":\"0\",\"alipay\":\"\",\"description\":\"\"}]",
"[{\"index\":null,\"type\":\"text\",\"rightAnswer\":1,\"name\":\"文字题一\",\"option1\":\"文字题一A\",\"option2\":\"文字题一B\",\"option3\":\"文字题一C\",\"option4\":\"文字题一D\"},{\"index\":null,\"type\":\"text\",\"rightAnswer\":\"2\",\"name\":\"文字题二\",\"option1\":\"文字题二A\",\"option2\":\"文字题二B\",\"option3\":\"文字题二C\",\"option4\":\"文字题二D\"},{\"index\":null,\"type\":\"text\",\"rightAnswer\":\"3\",\"name\":\"文字题三\",\"option1\":\"文字题三A\",\"option2\":\"文字题三B\",\"option3\":\"文字题三C\",\"option4\":\"文字题三D\"},{\"index\":null,\"type\":\"text\",\"rightAnswer\":\"4\",\"name\":\"文字题四\",\"option1\":\"文字题四A\",\"option2\":\"文字题四B\",\"option3\":\"文字题四C\",\"option4\":\"文字题四D\"},{\"index\":null,\"type\":\"text\",\"rightAnswer\":1,\"name\":\"文字题五\",\"option1\":\"文字题五A\",\"option2\":\"文字题五B\",\"option3\":\"文字题五C\",\"option4\":\"文字题五D\"},{\"index\":null,\"type\":\"text\",\"rightAnswer\":\"2\",\"name\":\"文字题六\",\"option1\":\"文字题六A\",\"option2\":\"文字题六B\",\"option3\":\"文字题六C\",\"option4\":\"文字题六D\"}]",
"1","10","everyday","5","everyday","6","新建自有答题活动-文字题"}, //case 1
new Object[]{2,"[{\"type\":\"coupon\",\"title\":\"优惠券1\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"1\",\"show\":true,\"arealimit\":false,\"pronumber\":\"1\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"2\",\"show\":true,\"arealimit\":false,\"pronumber\":\"2\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172163,\"name\":\"【勿动】兑吧优惠券定向库存不足\",\"remaind\":\"60\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"3\",\"show\":true,\"arealimit\":false,\"pronumber\":\"3\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":185571,\"name\":\"【自动化】自有优惠券成功页跳转链接 兑换成功后页面没有跳转按钮 以及点击入口\",\"remaind\":\"30\"}]",
new Object[]{2,"[{\"type\":\"coupon\",\"title\":\"优惠券1\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"1\",\"show\":true,\"arealimit\":false,\"pronumber\":\"1\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":159857,\"name\":\"【自动化勿动】zr自有优惠券\",\"remaind\":\"100\"},{\"type\":\"coupon\",\"title\":\"优惠券2\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"2\",\"show\":true,\"arealimit\":false,\"pronumber\":\"2\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":172163,\"name\":\"【勿动】兑吧优惠券定向库存不足\",\"remaind\":\"60\"},{\"type\":\"coupon\",\"title\":\"优惠券3\",\"img\":\"//yun.duiba.com.cn/upload/bust51462438317113.png\",\"valid\":true,\"probability\":\"3\",\"show\":true,\"arealimit\":false,\"pronumber\":\"3\",\"alipay\":\"\",\"description\":\"\",\"appItemId\":185571,\"name\":\"【自动化】自有优惠券成功页跳转链接 兑换成功后页面没有跳转按钮 以及点击入口\",\"remaind\":\"30\"}]",
"[{\"index\":null,\"type\":\"image\",\"rightAnswer\":1,\"name\":\"图片题1\",\"option1\":\"//yun.dui88.com/images/201811/0tg3occ8ft.png\",\"option2\":\"//yun.dui88.com/images/201811/7avinswhbx.png\",\"option3\":\"//yun.dui88.com/images/201811/wpivlzrt5x.png\",\"option4\":\"//yun.dui88.com/images/201811/omk617xseb.png\"},{\"index\":null,\"type\":\"image\",\"rightAnswer\":1,\"name\":\"图片题2\",\"option1\":\"//yun.dui88.com/images/201811/x7ukissn3k.png\",\"option2\":\"//yun.dui88.com/images/201811/3g81rrei8x.png\",\"option3\":\"//yun.dui88.com/images/201811/m16yaakc6u.png\",\"option4\":\"//yun.dui88.com/images/201811/kodb08cqi3.png\"},{\"index\":null,\"type\":\"image\",\"rightAnswer\":1,\"name\":\"图片题3\",\"option1\":\"//yun.dui88.com/images/201811/au84gljudk.png\",\"option2\":\"//yun.dui88.com/images/201811/vt9wfrnefk.png\",\"option3\":\"//yun.dui88.com/images/201811/tzplflmd8e.png\",\"option4\":\"//yun.dui88.com/images/201811/n5odjivu2j.png\"}]",
"1","5","forever","20","forever","3","新建自有答题活动-图片题"},//case 2
};
......@@ -139,7 +139,7 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
Assert.assertEquals(editResponse.jsonPath().getString("data.limitCount"),"5","校验活动限制次数失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.limitScope"),"everyday","校验活动限制次数类型失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.bannerImgNew"),"//yun.duiba.com.cn/upload/newHdTool/turntable_cricle/banner_750x220.png","校验活动新版banner图失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].name"),"【自动化勿动】自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].name"),"【自动化勿动】zr自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].limit"),"1","校验活动奖品中奖限制失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].oldRemaind"),"100","校验活动奖品数量失败");
logger.info("校验新建自有活动工具-1内容成功");
......@@ -181,7 +181,7 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
Assert.assertEquals(editResponse.jsonPath().getString("data.credits"),"0","校验活动积分失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.limitCount"),"10","校验活动免费抽奖次数失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.limitScope"),"everyday","校验活动免费抽奖次数类型失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].name"),"【自动化勿动】自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].name"),"【自动化勿动】zr自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].limit"),"1","校验活动奖品中奖限制失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.awards[1].oldRemaind"),"100","校验活动奖品数量失败");
logger.info("校验新建自有独立活动工具-1内容成功");
......@@ -246,7 +246,7 @@ public class 新建活动测试_DuibaTest extends DuibaTestBase{
logger.info("校验新建自有单品抽奖-1内容成功");
break;
case 2:
Assert.assertEquals(editResponse.jsonPath().getString("data.appItemTitle"),"【自动化勿动】自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.appItemTitle"),"【自动化勿动】zr自有优惠券","校验活动奖品名称失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.freeDrawLimit"),"5","校验活动免费抽奖次数失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.freeDrawLimitScope"),"forever","校验活动免费抽奖类型失败");
Assert.assertEquals(editResponse.jsonPath().getString("data.mainAppItemId"),"159857","校验活动奖品id失败");
......
......@@ -173,13 +173,13 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
i--;
}
Thread.sleep(3000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
detailResponse.prettyPrint();
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换
Thread.sleep(3000);
try{
response = gawService.couponExchange(uid, appItemId,82);
response.prettyPrint();
......
......@@ -102,6 +102,7 @@ public class 自有老虚拟商品_兑换限制测试_ExchangeTest extends Check
message = response.jsonPath().getString("message");
i--;
}
Thread.sleep(3000);
Response detailResponse = mobileService.appItemDetail(authorization.dafuwengLogin(uid),appItemId);
detailResponse.prettyPrint();
......@@ -109,7 +110,6 @@ public class 自有老虚拟商品_兑换限制测试_ExchangeTest extends Check
logger.info("商品兑换按钮:" + exchangeText);
//第二次兑换
Thread.sleep(3000);
try{
response = couponExchangeService.virtualExchange(authorization.dafuwengLogin(uid), appItemId, "123456");
response.prettyPrint();
......
......@@ -222,7 +222,7 @@ public class 扣库存测试_DuibaTest extends DuibaTestBase {
@Test
public void 自有活动工具扣库存测试() throws Exception {
//获取兑换项库存
Response response = developerService.appItems("2239","【自动化勿动】自有优惠券");
Response response = developerService.appItems("2239","【自动化勿动】zr自有优惠券");
//response.prettyPrint();
String remind = response.jsonPath().getString("data.list[0].remaind");
logger.info("抽奖前兑换项库存为:"+remind);
......@@ -240,18 +240,18 @@ public class 扣库存测试_DuibaTest extends DuibaTestBase {
response = this.新活动工具接口传参("28247","abcde","iOS");
Assert.assertEquals(response.jsonPath().getString("lottery.type"),"coupon","校验type失败");
Assert.assertEquals(response.jsonPath().getString("lottery.title"),"【自动化勿动】自有优惠券","校验title失败");
Assert.assertEquals(response.jsonPath().getString("lottery.title"),"【自动化勿动】zr自有优惠券","校验title失败");
Assert.assertTrue(response.jsonPath().getString("lottery.link").contains("/crecord/recordDetailNew?orderId="));
Assert.assertEquals(response.jsonPath().getString("lottery.id"), "16405", "校验id失败");
logger.info("校验实物商品:type,title,link,id成功");
//校验兑换项库存
response = developerService.appItems("2239","【自动化勿动】自有优惠券");
response = developerService.appItems("2239","【自动化勿动】zr自有优惠券");
String Newremind = response.jsonPath().getString("data.list[0].remaind");
int i= 10;
while(i>0 && !Newremind.equals(remind)){
Thread.sleep(500);
response = developerService.appItems("2239","【自动化勿动】自有优惠券");
response = developerService.appItems("2239","【自动化勿动】zr自有优惠券");
Newremind = response.jsonPath().getString("data.list[0].remaind");
i--;
}
......
......@@ -3,6 +3,7 @@
* FileName: 瓜分积分测试_AccessTest
* Author: zhaoran
* Date: 2018/12/10 19:45
* AppId: 21827
* Description:
*/
package http.cases.PkMoudleTest;
......@@ -198,6 +199,7 @@ public class 瓜分积分_实际瓜分_AccessTest extends DuibaTestBase {
Assert.assertEquals(response.jsonPath().getString("data.prizeList[0].bonusType"),"4","中奖弹窗类型校验失败");
Assert.assertEquals(response.jsonPath().getString("data.show"),"true","展示弹窗校验失败");
Assert.assertEquals(response.jsonPath().getString("data.unitName"),"金币","积分单位校验失败");
Response response2 = pkService.popup(uid3);
response.prettyPrint();
......
......@@ -3,7 +3,7 @@
* FileName: 瓜分积分测试_AccessTest
* Author: zhaoran
* Date: 2018/12/10 19:45
* Description:
* Description: appId 21832
*/
package http.cases.PkMoudleTest;
......@@ -204,6 +204,7 @@ public class 瓜分积分_实际瓜分_主胜方_AccessTest extends DuibaTestBas
Assert.assertEquals(response.jsonPath().getString("data.prizeList[0].bonusType"),"4","中奖弹窗类型校验失败");
Assert.assertEquals(response.jsonPath().getString("data.show"),"true","展示弹窗校验失败");
Assert.assertEquals(response.jsonPath().getString("data.unitName"),"金币","积分单位校验失败");
Response response2 = pkService.popup(uid1);
response.prettyPrint();
......
......@@ -42,24 +42,24 @@ public class 插件场景测试_pluginTest extends DuibaTestBase {
public void before(){
// jdbc = MysqlUtils.mysqlDuiba("");
try {
jdbc.update("insert into `dafuweng`.`user` ( `enable`, `app_id`, `gmt_modified`, `gmt_create`, `credits`, `version`, `name`) values ( b'0', '57', '2018-05-23 16:43:44', '2018-05-23 16:43:44', '10000', '0', 'auto-test');");
} catch (Exception e) {
System.out.println("insert failed");
}
// try {
//
// jdbc.update("insert into `dafuweng`.`user` ( `enable`, `app_id`, `gmt_modified`, `gmt_create`, `credits`, `version`, `name`) values ( b'0', '57', '2018-05-23 16:43:44', '2018-05-23 16:43:44', '10000', '0', 'auto-test');");
// } catch (Exception e) {
// System.out.println("insert failed");
// }
}
@AfterClass
public void after(){
try {
jdbc.update("DELETE FROM `dafuweng`.`user` ORDER BY id DESC LIMIT 1");
jdbc.update("DELETE FROM credits_activity.tb_activity_plugin where title = '【勿动】自动化-插件活动'");
} catch (Exception e) {
System.out.println();
}
// try {
// jdbc.update("DELETE FROM `dafuweng`.`user` ORDER BY id DESC LIMIT 1");
// jdbc.update("DELETE FROM credits_activity.tb_activity_plugin where title = '【勿动】自动化-插件活动'");
// } catch (Exception e) {
// System.out.println();
// }
// jdbc.releaseConn();
......@@ -89,7 +89,7 @@ public class 插件场景测试_pluginTest extends DuibaTestBase {
}
@Test(dataProvider = "providerMethod")
// @Test(dataProvider = "providerMethod")
public void 插件应用场景测试(int caseNum,String activityId,String url,String caseName) throws Exception {
logger.info(caseName);
......@@ -145,7 +145,10 @@ public class 插件场景测试_pluginTest extends DuibaTestBase {
}
@Test(dataProvider = "providerMethod")
// @Test(dataProvider = "providerMethod")
public void 插件触发事件测试(int caseNum,String signType,String url,String caseName) throws Exception {
logger.info(caseName);
......
package http.cases.WalletTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.GlobalRewardService;
import http.service.Activity.SeedRedPacketService;
import http.service.Activity.WalletAccountService;
import http.service.Authorization;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import utils.HbaseService;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
import static io.restassured.RestAssured.given;
/**
* Created by 赵然 on 2019/04/04
* AppId: 22565
*/
public class 总帐户提现页校验_AccessTest extends DuibaTestBase{
@Value("${activity.host}")
String activityHost;
@Autowired
SeedRedPacketService seedRedPacketService;
@Autowired
WalletAccountService walletAccountService;
@Autowired
GlobalRewardService globalRewardService;
@Autowired
Authorization authorization;
@Autowired
HbaseService hbaseService;
private DuibaLog logger = DuibaLog.getLogger();
//指定用户
private static int uid = 7112;
private static String consumerId = "100145034";
@Test
public void 提现页校验() throws Exception {
Response response = globalRewardService.toWithdraw(uid);
response.print();
String expireTime = response.jsonPath().getString("data.expireTime");
String perLimitAmount = response.jsonPath().getString("data.perLimitAmount");
String periodOpen = response.jsonPath().getString("data.periodOpen");
Assert.assertEquals(expireTime,"2021/01/31 00:00:00","提现页过期时间校验失败");
Assert.assertEquals(perLimitAmount,"2000","提现页满额提现金额校验失败");
Assert.assertEquals(periodOpen,"true","总帐户状态校验失败");
logger.info("总帐户提现页校验成功!");
}
@Test
public void 后台红包周期校验() throws Exception {
Response response = globalRewardService.periodList("18157163293","22565","2");
response.print();
String bonusLimit = response.jsonPath().getString("data[0].bonusLimit");
String forConfirm = response.jsonPath().getString("data[0].forConfirm");
String periodStatus = response.jsonPath().getString("data[0].periodStatus");
String withdrawThreshold = response.jsonPath().getString("data[0].withdrawThreshold");
String relType = response.jsonPath().getString("data[0].relList[0].relType");
String relTypeName = response.jsonPath().getString("data[0].relList[0].relTypeName");
Assert.assertEquals(bonusLimit,"40000","红包预算校验失败");
Assert.assertEquals(forConfirm,"false","确认按钮校验失败");
Assert.assertEquals(periodStatus,"OPEN","总帐户状态校验失败");
Assert.assertEquals(withdrawThreshold,"2000","用户提现限制校验失败");
Assert.assertEquals(relType,"PK","关联活动类型校验失败");
Assert.assertEquals(relTypeName,"组件pk","关联活动名称校验失败");
response = globalRewardService.periodCount("18157163293","22565","2");
Assert.assertEquals(response.jsonPath().getString("data"),"1","周期个数校验失败");
}
}
......@@ -24,8 +24,9 @@ import static io.restassured.RestAssured.given;
/**
* Created by 赵然 on 2019/03/29
* AppId: 22565
*/
public class 总帐户账户正常提现 extends DuibaTestBase{
public class 总帐户账户正常提现_AccessTest extends DuibaTestBase{
@Value("${activity.host}")
String activityHost;
@Autowired
......@@ -48,7 +49,7 @@ public class 总帐户账户正常提现 extends DuibaTestBase{
public void beforeclass() {
try {
//重置账户金额2000
walletAccountService.updateConsumerAccount(consumerId,"6","2000");
walletAccountService.updateConsumerAccount(consumerId,"6","2");
//清空提现记录
jdbc.update("DELETE FROM consumer_account_log.tb_consumer_accounts_log where account_id = '"+consumerId+"_6_0'");
......@@ -89,7 +90,7 @@ public class 总帐户账户正常提现 extends DuibaTestBase{
Assert.assertEquals(success,"false","success状态失败");
Assert.assertEquals(code,"100000","错误码失败");
Assert.assertEquals(message,"最低提现金额20元","message失败");
// Assert.assertEquals(message,"最低提现金额0元","message失败");
//获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0906 where account_id = '100145034_6_0' ");
......@@ -115,7 +116,7 @@ public class 总帐户账户正常提现 extends DuibaTestBase{
//账户支付宝提现
Map cookies = authorization.dafuwengLogin(uid);
Response response = this.账户提现失败(cookies,"2000",account,username);
Response response = this.账户提现失败(cookies,"2",account,username);
response.print();
Thread.sleep(5000);
......@@ -147,11 +148,11 @@ public class 总帐户账户正常提现 extends DuibaTestBase{
Map<String, Object> selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0906 where account_id = '100145034_6_0' ");
int balance = Integer.parseInt(String.valueOf(selectResult.get("balance_amount")));
logger.info("账户原有余额为"+balance);
balance = balance - 2000;
balance = balance - 2;
//账户支付宝提现
Map cookies = authorization.dafuwengLogin(uid);
this.账户提现(cookies,"2000","peeulk6392@sandbox.com","沙箱环境");
this.账户提现(cookies,"2","peeulk6392@sandbox.com","沙箱环境");
Thread.sleep(2000);
//获取新账户余额
selectResult = jdbc.findSimpleResult("select * from consumer_accounts.tb_consumer_account_0906 where account_id = '100145034_6_0' ");
......
......@@ -23,30 +23,10 @@ public class GlobalRewardService {
Authorization authorization;
@Value("${activity.host}")
String activityHost;
@Value("${hdserver.host}")
String hdHost;
private DuibaLog logger = DuibaLog.getLogger();
/**
* 获取红包账户
* @param cookies
* @return
* @throws Exception
*/
public Response getWalletAccount(Map cookies) throws Exception {
logger.info("请求getWalletAccount");
Response response = given().cookies(cookies).get(activityHost+"/walletAccount/getWalletAccount");
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true","/walletAccount/getWalletAccount接口失败");
}catch(Exception e){
throw new Exception("/walletAccount/getWalletAccount接口失败,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/walletAccount/getWalletAccount接口失败,返回信息:"+response.asString());
}
return response;
}
/**
* 红包账户提现
* @param cookies
......@@ -77,92 +57,76 @@ public class GlobalRewardService {
}
/**
* 红包账户提现
* @param cookies
* @param orderId
* 红包账户提现页
* @param uid
* @return
* @throws Exception
*/
public Response getOrderStatus(Map cookies,String orderId) throws Exception {
logger.info("请求getOrderStatus");
Map<String,String> map = new HashMap<>();
map.put("orderId",orderId);
public Response toWithdraw(int uid) throws Exception {
logger.info("请求toWithdraw");
Response response = given().cookies(cookies).params(map).post(activityHost+"/walletAccount/getOrderStatus");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).get(activityHost+"/globalReward/toWithdraw");
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true","/walletAccount/getOrderStatus接口失败");
Assert.assertEquals(response.jsonPath().getString("success"),"true","/globalReward/toWithdraw接口失败");
}catch(Exception e){
throw new Exception("/walletAccount/getOrderStatus接口失败,返回信息:"+response.asString());
throw new Exception("/globalReward/toWithdraw接口失败,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/walletAccount/getOrderStatus接口失败,返回信息:"+response.asString());
throw new Exception("/globalReward/toWithdraw接口失败,返回信息:"+response.asString());
}
return response;
}
public Response getOrderStatus2(Map cookies,String orderId) throws Exception {
logger.info("请求getOrderStatus");
Map<String,String> map = new HashMap<>();
map.put("orderId",orderId);
Response response = given().cookies(cookies).params(map).post(activityHost+"/walletAccount/getOrderStatus");
return response;
}
/**
* 红包账户提现记录
* @param cookies
* 开发者后台红包周期列表
* @param account
* @param appId
* @param periodStatus 2:进行中
* @return
* @throws Exception
*/
public Response walletDetail(Map cookies) throws Exception {
logger.info("请求walletDetail");
public Response periodList(String account,String appId,String periodStatus) throws Exception {
logger.info("请求periodList");
Map<String,String> map = new HashMap<>();
map.put("pageNo","1");
map.put("pageSize","12");
Response response = given().cookies(cookies).params(map).get(activityHost+"/walletAccount/walletDetail");
map.put("periodStatus",periodStatus);
map.put("pageNum","1");
map.put("pageSize","10");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.hdLoginSaasNew(account,appId)).params(map).post("http://"+hdHost+"/redpackets/manageTool/periodList");
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true","/walletAccount/walletDetail接口失败");
Assert.assertEquals(response.jsonPath().getString("success"),"true","/globalReward/toWithdraw接口失败");
}catch(Exception e){
throw new Exception("/walletAccount/walletDetail接口失败,返回信息:"+response.asString());
throw new Exception("/redpackets/manageTool/periodList接口失败,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/walletAccount/walletDetail接口失败,返回信息:"+response.asString());
throw new Exception("/redpackets/manageTool/periodList接口失败,返回信息:"+response.asString());
}
return response;
}
/**
* 红包账户修改钱包账户余额后门
* @param consumerId
* @param accountType
* @param balanceAmount
* 开发者后台红包周期个数
* @param account
* @param appId
* @param periodStatus 2:进行中
* @return
* @throws Exception
*/
public void updateConsumerAccount(String consumerId,String accountType,String balanceAmount) throws Exception {
logger.info("请求修改钱包账户余额后门:updateConsumerAccount");
public Response periodCount(String account,String appId,String periodStatus) throws Exception {
logger.info("请求periodCount");
Map<String,String> map = new HashMap<>();
map.put("consumerId",consumerId);
map.put("accountType",accountType);
map.put("balanceAmount",balanceAmount);
Response response = given().params(map).get(activityHost+"/aaw/automated/updateConsumerAccount");
// try{
// Assert.assertEquals(response.jsonPath().getString("success"),"true","/walletAccount/walletDetail接口失败");
//
// }catch(Exception e){
// throw new Exception("/aaw/automated/updateConsumerAccount接口失败,返回信息:"+response.asString());
// }catch(Error er){
// throw new Exception("/aaw/automated/updateConsumerAccount接口失败,返回信息:"+response.asString());
//
// }
//return response;
map.put("periodStatus",periodStatus);
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.hdLoginSaasNew(account,appId)).params(map).post("http://"+hdHost+"/redpackets/manageTool/periodCount");
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true","/globalReward/toWithdraw接口失败");
}catch(Exception e){
throw new Exception("/redpackets/manageTool/periodCount接口失败,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/redpackets/manageTool/periodCount接口失败,返回信息:"+response.asString());
}
return response;
}
}
......@@ -144,7 +144,7 @@ public class SingleLotteryService {
//获取单品抽奖信息
public Response AdminDuibaSingleLottery(String actId) throws Exception {
String url = ManagerHost + "/AdminDuibaSingleLotteryService/edit/"+actId;
String url = ManagerHost + "/AdminDuibaSingleLottery/edit/"+actId;
logger.info("请求兑吧管理后台余额url:" + url);
Response response = given().cookies(authorization.ssoLogin()).get("http://" + url);
......@@ -161,7 +161,7 @@ public class SingleLotteryService {
//兑吧管理后台创建单品抽奖活动
public void SingleLottery_create(String title, Map<String,String> incite) throws Exception {
String saveUrl = ManagerHost+"/AdminDuibaSingleLotteryService/create";
String saveUrl = ManagerHost+"/AdminDuibaSingleLottery/create";
Map<String,String> map = new HashMap<>();
map.put("title",title);
......@@ -202,7 +202,7 @@ public class SingleLotteryService {
//兑吧管理后台单品抽奖列表页
public Response manager_index() throws Exception {
String url = ManagerHost+"/AdminDuibaSingleLotteryService/index";
String url = ManagerHost+"/AdminDuibaSingleLottery/index";
Response response=given().cookies(authorization.ssoLogin()).get("http://"+url);
//Response.prettyPrint();
......@@ -218,7 +218,7 @@ public class SingleLotteryService {
//兑吧管理后台开启单品抽奖活动 1-开启且可见
public void changeStatus(String atcId,String val) throws Exception {
String url = ManagerHost+"/AdminDuibaSingleLotteryService/changeStatus";
String url = ManagerHost+"/AdminDuibaSingleLottery/changeStatus";
Map<String,String> map = new HashMap<>();
map.put("id",atcId);
......@@ -228,7 +228,7 @@ public class SingleLotteryService {
Response response = given().cookies(authorization.ssoLogin()).params(map).post("http://" + url);
try{
Assert.assertEquals(response.jsonPath().getString("success"), "true", "/AdminDuibaSingleLotteryService/changeStatus接口失败");
Assert.assertEquals(response.jsonPath().getString("success"), "true", "/AdminDuibaSingleLottery/changeStatus接口失败");
}catch(Exception e){
throw new Exception("/AdminDuibaSingleLotteryService/changeStatus接口失败,返回信息:"+response.asString());
}catch(Error er){
......@@ -238,7 +238,7 @@ public class SingleLotteryService {
//兑吧管理后台删除活动
public void delete(String atcId) throws Exception {
String url = ManagerHost+"/AdminDuibaSingleLotteryService/delete/"+atcId;
String url = ManagerHost+"/AdminDuibaSingleLottery/delete/"+atcId;
Response response = given().cookies(authorization.ssoLogin()).post("http://" + url);
......
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