Commit 39fcf9fa authored by 赵然's avatar 赵然

Merge branch 'master' into develop

parents 800b94a7 986e4c44
...@@ -62,7 +62,7 @@ public class TestListener implements ITestListener { ...@@ -62,7 +62,7 @@ public class TestListener implements ITestListener {
serviceDoctor(); serviceDoctor();
}catch (SkipException e){ }catch (SkipException e){
SFExpress.skip = context.getAllTestMethods().length; SFExpress.skip = context.getAllTestMethods().length;
throw e; // throw e;
} }
} }
......
...@@ -44,6 +44,10 @@ public class ActiveGroup_FloorTest extends DuibaTestBase { ...@@ -44,6 +44,10 @@ public class ActiveGroup_FloorTest extends DuibaTestBase {
DevItemService devItemService; DevItemService devItemService;
@Autowired @Autowired
ActivityService activityService; ActivityService activityService;
private int uid = 4642;
private String appId = "21465";
private Map hdCookies;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private String skinId=null; private String skinId=null;
...@@ -51,11 +55,12 @@ public class ActiveGroup_FloorTest extends DuibaTestBase { ...@@ -51,11 +55,12 @@ public class ActiveGroup_FloorTest extends DuibaTestBase {
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354006");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤ActiveGroup"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤ActiveGroup");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboActiveGroup"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboActiveGroup");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -387,11 +392,11 @@ public class ActiveGroup_FloorTest extends DuibaTestBase { ...@@ -387,11 +392,11 @@ public class ActiveGroup_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -403,15 +408,15 @@ public class ActiveGroup_FloorTest extends DuibaTestBase { ...@@ -403,15 +408,15 @@ public class ActiveGroup_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
List<Map> list = jsonPath.getList("list",Map.class); List<Map> list = jsonPath.getList("list",Map.class);
// response = devItemService.appItems(authorization.hdLoginmabo(),"18740"); // response = devItemService.appItems(hdCookies,appId);
response = activityService.list2(authorization.hdLoginmabo(),"18740"); response = activityService.list2(hdCookies,appId);
response.prettyPrint(); response.prettyPrint();
List<Map> maplist = response.jsonPath().getList("data.list",Map.class); List<Map> maplist = response.jsonPath().getList("data.list",Map.class);
int size = maplist.size(); int size = maplist.size();
...@@ -445,7 +450,7 @@ public class ActiveGroup_FloorTest extends DuibaTestBase { ...@@ -445,7 +450,7 @@ public class ActiveGroup_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
try{ try{
Assert.assertEquals(response.jsonPath().getString("success"),"true"); Assert.assertEquals(response.jsonPath().getString("success"),"true");
}catch(Exception e){ }catch(Exception e){
......
...@@ -42,23 +42,28 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -42,23 +42,28 @@ public class Banner_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4643;
private String appId = "21466";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
List<Map> list = devFloorBannerService.selectedList(authorization.hdLoginmabo(),"18740"); hdCookies = authorization.hdLoginCommonNew("13193354007");
List<Map> list = devFloorBannerService.selectedList(hdCookies,appId);
for(int i=0;i<list.size();i++){ for(int i=0;i<list.size();i++){
Map map = list.get(i); Map map = list.get(i);
String bannerId = String.valueOf(map.get("bannerId")); String bannerId = String.valueOf(map.get("bannerId"));
devFloorBannerService.delBanner(authorization.hdLoginmabo(),"18740",bannerId); devFloorBannerService.delBanner(hdCookies,appId,bannerId);
} }
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤banner"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤banner");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboTest楼层banner"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboTest楼层banner");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -154,21 +159,21 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -154,21 +159,21 @@ public class Banner_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
response = devFloorBannerService.activityList(authorization.hdLoginmabo(),"18740",""); response = devFloorBannerService.activityList(hdCookies,appId,"");
response.prettyPrint(); response.prettyPrint();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.putAll(getByName(response.jsonPath().getList("data"),"【自动化】出奖虚拟商品")); json.putAll(getByName(response.jsonPath().getList("data"),"【自动化】出奖虚拟商品"));
json.put("appId", 18740); json.put("appId", appId);
json.put("new", false); json.put("new", false);
json.put("selected", false); json.put("selected", false);
json.put("show", true); json.put("show", true);
devFloorBannerService.saveActivityBanner(authorization.hdLoginmabo(),json.toJSONString()).prettyPrint(); devFloorBannerService.saveActivityBanner(hdCookies,json.toJSONString()).prettyPrint();
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -180,7 +185,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -180,7 +185,7 @@ public class Banner_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
...@@ -201,7 +206,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -201,7 +206,7 @@ public class Banner_FloorTest extends DuibaTestBase {
// Assert.assertEquals(link,"//activity.m.duibatest.com.cn/newtools/index?id=21344&dbnewopen&dpm=18740.5.231.3&dcm=202.21344.0.0",""); // Assert.assertEquals(link,"//activity.m.duibatest.com.cn/newtools/index?id=21344&dbnewopen&dpm=18740.5.231.3&dcm=202.21344.0.0","");
Assert.assertEquals(title,"【自动化】出奖虚拟商品",""); Assert.assertEquals(title,"【自动化】出奖虚拟商品","");
Assert.assertEquals(sourceType,"13",""); Assert.assertEquals(sourceType,"13","");
Assert.assertEquals(activityId,"21344",""); Assert.assertEquals(activityId,"36114","");
...@@ -212,18 +217,18 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -212,18 +217,18 @@ public class Banner_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devFloorBannerService.itemList(authorization.hdLoginmabo(),"18740",""); Response response = devFloorBannerService.itemList(hdCookies,appId,"");
response.prettyPrint(); response.prettyPrint();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.putAll(getByName(response.jsonPath().getList("data"),"mabo自动化实物")); json.putAll(getByName(response.jsonPath().getList("data"),"mabo自动化实物"));
json.put("appId", 18740); json.put("appId", appId);
json.put("new", false); json.put("new", false);
json.put("selected", false); json.put("selected", false);
json.put("show", true); json.put("show", true);
devFloorBannerService.saveItemBanner(authorization.hdLoginmabo(),json.toJSONString()).prettyPrint(); devFloorBannerService.saveItemBanner(hdCookies,json.toJSONString()).prettyPrint();
Thread.sleep(62000); Thread.sleep(62000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -235,7 +240,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -235,7 +240,7 @@ public class Banner_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
response.prettyPrint(); response.prettyPrint();
String s = response.asString(); String s = response.asString();
...@@ -251,11 +256,11 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -251,11 +256,11 @@ public class Banner_FloorTest extends DuibaTestBase {
String sourceType = String.valueOf(map.get("sourceType")); String sourceType = String.valueOf(map.get("sourceType"));
Assert.assertEquals(image,"//yun.dui88.com/images/201805/7mwt22vdfu.jpg",""); Assert.assertEquals(image,"//yun.dui88.com/images/201811/tkuykkb8s2.jpg","");
// Assert.assertEquals(link,"//goods.m.duibatest.com.cn/mobile/appItemDetail?appItemId=163948&dbnewopen&dpm=18740.5.231.2&dcm=102.163948.0.0",""); // Assert.assertEquals(link,"//goods.m.duibatest.com.cn/mobile/appItemDetail?appItemId=163948&dbnewopen&dpm=18740.5.231.2&dcm=102.163948.0.0","");
Assert.assertEquals(title,"mabo自动化实物",""); Assert.assertEquals(title,"mabo自动化实物","");
Assert.assertEquals(sourceType,"0",""); Assert.assertEquals(sourceType,"0","");
Assert.assertEquals(appItemId,"163948",""); Assert.assertEquals(appItemId,"186478","");
...@@ -264,7 +269,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -264,7 +269,7 @@ public class Banner_FloorTest extends DuibaTestBase {
public void D_banner自定义外链接() throws Exception { public void D_banner自定义外链接() throws Exception {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
String appId = "18740"; // String appId = "18740";
String bannerImgNew = ""; String bannerImgNew = "";
String img = "//yun.dui88.com/images/201805/hdgasav66e.jpg"; String img = "//yun.dui88.com/images/201805/hdgasav66e.jpg";
String title = "banner上传自动化测试"; String title = "banner上传自动化测试";
...@@ -278,10 +283,10 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -278,10 +283,10 @@ public class Banner_FloorTest extends DuibaTestBase {
json.put("url",url); json.put("url",url);
devFloorBannerService.uploadBanner(authorization.hdLoginmabo(),json.toJSONString()).prettyPrint(); devFloorBannerService.uploadBanner(hdCookies,json.toJSONString()).prettyPrint();
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -293,7 +298,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -293,7 +298,7 @@ public class Banner_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
Response response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); Response response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
...@@ -330,15 +335,15 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -330,15 +335,15 @@ public class Banner_FloorTest extends DuibaTestBase {
public void E_删除banner皮肤和楼层() throws Exception { public void E_删除banner皮肤和楼层() throws Exception {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
List<Map> list = devFloorBannerService.selectedList(authorization.hdLoginmabo(),"18740"); List<Map> list = devFloorBannerService.selectedList(hdCookies,appId);
for(int i=0;i<list.size();i++){ for(int i=0;i<list.size();i++){
Map map = list.get(i); Map map = list.get(i);
String bannerId = String.valueOf(map.get("bannerId")); String bannerId = String.valueOf(map.get("bannerId"));
devFloorBannerService.delBanner(authorization.hdLoginmabo(),"18740",bannerId); devFloorBannerService.delBanner(hdCookies,appId,bannerId);
} }
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
...@@ -366,7 +371,7 @@ public class Banner_FloorTest extends DuibaTestBase { ...@@ -366,7 +371,7 @@ public class Banner_FloorTest extends DuibaTestBase {
//@Test //@Test
public void test1(){ public void test1(){
Response response = homeService.index(2753); Response response = homeService.index(uid);
String html = response.asString(); String html = response.asString();
// System.out.println(html); // System.out.println(html);
String find = "var CfG={(.*?)"; String find = "var CfG={(.*?)";
......
...@@ -47,14 +47,19 @@ public class Coupon_FloorTest extends DuibaTestBase { ...@@ -47,14 +47,19 @@ public class Coupon_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4644;
private String appId = "21467";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354008");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤conpon"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤conpon");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboConpon"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboConpon");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -342,11 +347,11 @@ public class Coupon_FloorTest extends DuibaTestBase { ...@@ -342,11 +347,11 @@ public class Coupon_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
int showNum = 5; int showNum = 3;
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
json.put("floorId",floorId); json.put("floorId",floorId);
json.put("floorTitle","优惠券"); json.put("floorTitle","优惠券");
json.put("showNum",String.valueOf(showNum)); json.put("showNum",String.valueOf(showNum));
...@@ -354,14 +359,14 @@ public class Coupon_FloorTest extends DuibaTestBase { ...@@ -354,14 +359,14 @@ public class Coupon_FloorTest extends DuibaTestBase {
response = devFloorChildPageService.couponPageConfig(authorization.hdLoginmabo(),json.toJSONString()); response = devFloorChildPageService.couponPageConfig(hdCookies,json.toJSONString());
Thread.sleep(70000); Thread.sleep(70000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -373,7 +378,7 @@ public class Coupon_FloorTest extends DuibaTestBase { ...@@ -373,7 +378,7 @@ public class Coupon_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
...@@ -393,7 +398,7 @@ public class Coupon_FloorTest extends DuibaTestBase { ...@@ -393,7 +398,7 @@ public class Coupon_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -42,14 +42,19 @@ public class Game_FloorTest extends DuibaTestBase { ...@@ -42,14 +42,19 @@ public class Game_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4648;
private String appId = "21468";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354009");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Game"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Game");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboGame"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboGame");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -230,11 +235,11 @@ public class Game_FloorTest extends DuibaTestBase { ...@@ -230,11 +235,11 @@ public class Game_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -246,7 +251,7 @@ public class Game_FloorTest extends DuibaTestBase { ...@@ -246,7 +251,7 @@ public class Game_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
response.prettyPrint(); response.prettyPrint();
...@@ -273,7 +278,7 @@ public class Game_FloorTest extends DuibaTestBase { ...@@ -273,7 +278,7 @@ public class Game_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -47,28 +47,33 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -47,28 +47,33 @@ public class Icon_FloorTest extends DuibaTestBase {
private String skinId=null; private String skinId=null;
private String floorId=null; private String floorId=null;
private String bannerId = null; private String bannerId = null;
private int uid = 4650;
private String appId = "21469";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354010");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤icon"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤icon");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboicon"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboicon");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devFloorIconService.selectedList(authorization.hdLoginmabo(),"18740"); Response response = devFloorIconService.selectedList(hdCookies,appId);
List<Map> list = response.jsonPath().getList("data",Map.class); List<Map> list = response.jsonPath().getList("data",Map.class);
map = getByName(list,"今日必抢"); map = getByName(list,"今日必抢");
if(map!=null){ if(map!=null){
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
json.put("bannerId",map.get("bannerId").toString()); json.put("bannerId",map.get("bannerId").toString());
response = devFloorIconService.delIcon(authorization.hdLoginmabo(),json.toJSONString()); response = devFloorIconService.delIcon(hdCookies,json.toJSONString());
} }
response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -223,10 +228,10 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -223,10 +228,10 @@ public class Icon_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
//应用皮肤 //应用皮肤
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
json.put("classifySwitch","false"); json.put("classifySwitch","false");
json.put("iconType","list"); json.put("iconType","list");
json.put("img","//yun.dui88.com/duibaManagerWeb/dnb7ivbsjr.png"); json.put("img","//yun.dui88.com/duibaManagerWeb/dnb7ivbsjr.png");
...@@ -243,12 +248,12 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -243,12 +248,12 @@ public class Icon_FloorTest extends DuibaTestBase {
json.put("payload","null"); json.put("payload","null");
response = devFloorIconService.saveIcon(authorization.hdLoginmabo(),json.toJSONString()); response = devFloorIconService.saveIcon(hdCookies,json.toJSONString());
response.prettyPrint(); response.prettyPrint();
Thread.sleep(70000); Thread.sleep(70000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -261,7 +266,7 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -261,7 +266,7 @@ public class Icon_FloorTest extends DuibaTestBase {
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
response.prettyPrint(); response.prettyPrint();
String s = response.asString(); String s = response.asString();
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
...@@ -296,7 +301,7 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -296,7 +301,7 @@ public class Icon_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devFloorIconService.selectedList(authorization.hdLoginmabo(),"18740"); Response response = devFloorIconService.selectedList(hdCookies,appId);
List<Map> list = response.jsonPath().getList("data",Map.class); List<Map> list = response.jsonPath().getList("data",Map.class);
Map map = getByTitle(list,"今日必抢"); Map map = getByTitle(list,"今日必抢");
...@@ -306,7 +311,7 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -306,7 +311,7 @@ public class Icon_FloorTest extends DuibaTestBase {
bannerId = map.get("bannerId").toString(); bannerId = map.get("bannerId").toString();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
json.put("bannerId",bannerId); json.put("bannerId",bannerId);
json.put("classifyImage","null"); json.put("classifyImage","null");
json.put("classifySwitch","false"); json.put("classifySwitch","false");
...@@ -316,11 +321,11 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -316,11 +321,11 @@ public class Icon_FloorTest extends DuibaTestBase {
json.put("sourceRelationId","2"); json.put("sourceRelationId","2");
json.put("title","今日必抢1"); json.put("title","今日必抢1");
response = devFloorIconService.updateIcon(authorization.hdLoginmabo(),json.toJSONString()); response = devFloorIconService.updateIcon(hdCookies,json.toJSONString());
response.prettyPrint(); response.prettyPrint();
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -333,7 +338,7 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -333,7 +338,7 @@ public class Icon_FloorTest extends DuibaTestBase {
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
response.prettyPrint(); response.prettyPrint();
String s = response.asString(); String s = response.asString();
...@@ -353,13 +358,13 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -353,13 +358,13 @@ public class Icon_FloorTest extends DuibaTestBase {
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
json.put("bannerId",bannerId); json.put("bannerId",bannerId);
Response response = devFloorIconService.delIcon(authorization.hdLoginmabo(),json.toJSONString()); Response response = devFloorIconService.delIcon(hdCookies,json.toJSONString());
response.prettyPrint(); response.prettyPrint();
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -389,7 +394,7 @@ public class Icon_FloorTest extends DuibaTestBase { ...@@ -389,7 +394,7 @@ public class Icon_FloorTest extends DuibaTestBase {
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -47,15 +47,20 @@ public class Item_FloorTest extends DuibaTestBase { ...@@ -47,15 +47,20 @@ public class Item_FloorTest extends DuibaTestBase {
private String skinId=null; private String skinId=null;
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4658;
private String appId = "21470";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354011");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Item"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Item");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboItem"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboItem");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -362,11 +367,11 @@ public class Item_FloorTest extends DuibaTestBase { ...@@ -362,11 +367,11 @@ public class Item_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(70000); Thread.sleep(70000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -378,11 +383,11 @@ public class Item_FloorTest extends DuibaTestBase { ...@@ -378,11 +383,11 @@ public class Item_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
response = devFloorService.itemSelectedList("18740"); response = devFloorService.itemSelectedList(appId);
List<Map> listDev = response.jsonPath().getList("data",Map.class); List<Map> listDev = response.jsonPath().getList("data",Map.class);
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
...@@ -405,7 +410,7 @@ public class Item_FloorTest extends DuibaTestBase { ...@@ -405,7 +410,7 @@ public class Item_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -43,14 +43,20 @@ public class Seckill_FloorTest extends DuibaTestBase { ...@@ -43,14 +43,20 @@ public class Seckill_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4654;
private String appId = "21471";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354012");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Sckill"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Sckill");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboSckill"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboSckill");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -805,11 +811,11 @@ public class Seckill_FloorTest extends DuibaTestBase { ...@@ -805,11 +811,11 @@ public class Seckill_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -821,7 +827,7 @@ public class Seckill_FloorTest extends DuibaTestBase { ...@@ -821,7 +827,7 @@ public class Seckill_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
String source = s.substring(s.indexOf("{"),s.length()-1); String source = s.substring(s.indexOf("{"),s.length()-1);
...@@ -837,9 +843,9 @@ public class Seckill_FloorTest extends DuibaTestBase { ...@@ -837,9 +843,9 @@ public class Seckill_FloorTest extends DuibaTestBase {
url = getMatcher(url,source,1); url = getMatcher(url,source,1);
Assert.assertEquals(activityId,"820",""); Assert.assertEquals(activityId,"820","");
Assert.assertEquals(image,"//yun.dui88.com/images/201801/7de9zo957y.png",""); Assert.assertEquals(image,"//yun.dui88.com/images/201801/7de9zo957y.png","");
Assert.assertEquals(operatingActivityId,"25550",""); Assert.assertEquals(operatingActivityId,"36116","");
Assert.assertTrue(url.contains("//activity.m.duibatest.com.cn/SecondsKillActivity/index?id=25550")); Assert.assertTrue(url.contains("//activity.m.duibatest.com.cn/SecondsKillActivity/index?id=36116"));
} }
...@@ -849,7 +855,7 @@ public class Seckill_FloorTest extends DuibaTestBase { ...@@ -849,7 +855,7 @@ public class Seckill_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -47,14 +47,19 @@ public class Showcase_FloorTest extends DuibaTestBase { ...@@ -47,14 +47,19 @@ public class Showcase_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4634;
private String appId = "21464";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354005");
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Showcase"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Showcase");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboShowcase"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboShowcase");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -244,11 +249,11 @@ public class Showcase_FloorTest extends DuibaTestBase { ...@@ -244,11 +249,11 @@ public class Showcase_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -260,14 +265,14 @@ public class Showcase_FloorTest extends DuibaTestBase { ...@@ -260,14 +265,14 @@ public class Showcase_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1)); JsonPath jsonPath=from(s.substring(s.indexOf("{"),s.length()-1));
List<Map> list = jsonPath.getList("list",Map.class); List<Map> list = jsonPath.getList("list",Map.class);
response = devFloorShowcaseService.getShowcaseContent(authorization.hdLoginmabo(),"18740"); response = devFloorShowcaseService.getShowcaseContent(hdCookies,appId);
List<Map> listDev = response.jsonPath().getList("data",Map.class); List<Map> listDev = response.jsonPath().getList("data",Map.class);
//开发者配置和手机端配置校验 //开发者配置和手机端配置校验
...@@ -290,7 +295,7 @@ public class Showcase_FloorTest extends DuibaTestBase { ...@@ -290,7 +295,7 @@ public class Showcase_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -43,16 +43,21 @@ public class Sign_FloorTest extends DuibaTestBase { ...@@ -43,16 +43,21 @@ public class Sign_FloorTest extends DuibaTestBase {
private String floorId=null; private String floorId=null;
private DuibaLog logger = DuibaLog.getLogger(); private DuibaLog logger = DuibaLog.getLogger();
private int uid = 4572;
private String appId = "21446";
private Map hdCookies;
@BeforeClass @BeforeClass
public void beforeClass(){ public void beforeClass(){
try{ try{
hdCookies = authorization.hdLoginCommonNew("13193354004");//authorization.hdLoginmabo();
Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Sign"); Map map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_skin where skin_name = ?","mabo楼层皮肤Sign");
skinId = String.valueOf(map.get("id")); skinId = String.valueOf(map.get("id"));
map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboSign"); map = jdbc.findSimpleResult("select * from credits_dev.tb_credits_floor_code WHERE floor_name= ?","maboSign");
floorId = String.valueOf(map.get("id")); floorId = String.valueOf(map.get("id"));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response = floorService.deleteFloor(authorization.ssoLogin(),floorId); response = floorService.deleteFloor(authorization.ssoLogin(),floorId);
...@@ -510,11 +515,11 @@ public class Sign_FloorTest extends DuibaTestBase { ...@@ -510,11 +515,11 @@ public class Sign_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740",skinId); Response response = devSkinService.saveSkin(hdCookies,appId,skinId);
Thread.sleep(60000); Thread.sleep(60000);
JsonPath jsonCfg = homeService.getCFG(2753); JsonPath jsonCfg = homeService.getCFG(uid);
Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符"); Assert.assertEquals(jsonCfg.getList("").size(),1,"banner展示数量和配置不符");
...@@ -526,7 +531,7 @@ public class Sign_FloorTest extends DuibaTestBase { ...@@ -526,7 +531,7 @@ public class Sign_FloorTest extends DuibaTestBase {
String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1); String floorType = MatcherString.getString(jsonCfg.getList("").get(0).toString(),"floorType=(.*?),",1);
response = homeService.floor(authorization.dafuwengLogin(2753),floorType,dataType,"3",floorId); response = homeService.floor(authorization.dafuwengLogin(uid),floorType,dataType,"3",floorId);
String s = response.asString(); String s = response.asString();
...@@ -546,7 +551,7 @@ public class Sign_FloorTest extends DuibaTestBase { ...@@ -546,7 +551,7 @@ public class Sign_FloorTest extends DuibaTestBase {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");//设置日期格式
logger.info(df.format(new Date())); logger.info(df.format(new Date()));
Response response = devSkinService.saveSkin(authorization.hdLoginmabo(),"18740","198"); Response response = devSkinService.saveSkin(hdCookies,appId,"106");
response.prettyPrint(); response.prettyPrint();
response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1"); response = floorService.deleteSkin(authorization.ssoLogin(),skinId,"1");
response.prettyPrint(); response.prettyPrint();
......
...@@ -284,6 +284,36 @@ public class Authorization { ...@@ -284,6 +284,36 @@ public class Authorization {
} }
//取消安全校验 //取消安全校验
// logger.info(hdCookies);
return hdCookies;
}
//密码为duibaduiba123
public Map hdLoginCommonNew(String account){
String path = "/doLoginNew";
int i=10;
Map<String,String> hdCookies = hdCookiesCommon.get(account);
while((hdCookies==null||hdCookies.size()==0)&&i>0) {
Response token=this.hdGetToken();
String url = PROTOCOL + hdHost + path;
Map<String,String> cookies=token.getCookies();
Map<String, String> paras = new HashMap<>();
paras.put("account", account);
paras.put("password", SecurityUtils.getMD5("Dct7xTdGPvbUL1eOtSWoB9ySZNY="+from(token.asString()).getString("data.loginsToken")));
paras.put("redirect", "/redirectApp");
paras.put("isAutoLogin", "true");
paras.put("validate","22");
Response response = given().cookies(cookies).params(paras).post(url);
response.prettyPrint();
hdCookies=new HashMap<>(response.getCookies());
if(hdCookies==null||hdCookies.size()==0){
hdCookies.remove("csrf_token");
hdCookiesCommon.put(account,hdCookies);
}
i--;
}
//取消安全校验
// logger.info(hdCookies); // logger.info(hdCookies);
return hdCookies; return hdCookies;
} }
......
...@@ -61,7 +61,7 @@ public class DevFloorIconService { ...@@ -61,7 +61,7 @@ public class DevFloorIconService {
public Response selectedList(Map cookies, String appId) throws Exception { public Response selectedList(Map cookies, String appId) throws Exception {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("appId","18740"); json.put("appId",appId);
Response response = given().cookies(cookies).contentType(ContentType.JSON).body(json.toJSONString()).post("http://"+hdserverHost+"/devFloorIcon/selectedList"); Response response = given().cookies(cookies).contentType(ContentType.JSON).body(json.toJSONString()).post("http://"+hdserverHost+"/devFloorIcon/selectedList");
try{ try{
Assert.assertEquals(response.jsonPath().getString("success"),"true"); Assert.assertEquals(response.jsonPath().getString("success"),"true");
......
...@@ -25,7 +25,7 @@ trade.host = activity.m.duibatest.com.cn ...@@ -25,7 +25,7 @@ trade.host = activity.m.duibatest.com.cn
db.name = duiba_test db.name = duiba_test
db.password= svbP3KUw2PurAnBb2rbs3vohF db.password= svbP3KUw2PurAnBb2rbs3vohF
db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/ db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/
db.driver= com.mysql.jdbc.Driver db.driver= com.mysql.cj.jdbc.Driver
db.maxtotal = 6 db.maxtotal = 6
//\u9489\u9489\u62A5\u544A\u914D\u7F6E //\u9489\u9489\u62A5\u544A\u914D\u7F6E
...@@ -39,9 +39,9 @@ signTest.names=zhousongbo ...@@ -39,9 +39,9 @@ signTest.names=zhousongbo
signTest.group=\u7B7E\u5230-\u63A5\u53E3\u81EA\u52A8\u5316 signTest.group=\u7B7E\u5230-\u63A5\u53E3\u81EA\u52A8\u5316
signTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html signTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html
FloorTest.project=\u697C\u5C42 FloorTest.project=楼层
FloorTest.names=zhaoran,qianwenjun FloorTest.names=zhaoran,qianwenjun
FloorTest.group=\u697C\u5C42-\u63A5\u53E3\u81EA\u52A8\u5316 FloorTest.group=楼层-接口自动化
FloorTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html FloorTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html
DuibaTest.project=\u6D3B\u52A8\u5DE5\u5177 DuibaTest.project=\u6D3B\u52A8\u5DE5\u5177
......
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