Commit c5ce00eb authored by 马博's avatar 马博

Merge branch 'mabo' of gitlab2.dui88.com:mabo/test-platform into mabo

parents b4744afd 0509cd12
......@@ -184,6 +184,10 @@ public class 抽奖异常测试_DuibaTest extends DuibaTestBase {
Assert.assertTrue(response.jsonPath().getString("lottery.link").contains("/activity/takePrizeNew?recordId="));
Assert.assertEquals(response.jsonPath().getString("lottery.id"), "11628", "校验id失败");
logger.info("未登录状态下有免费次数抽奖校验:title,link,id成功");
response = newActivityService.login(map,"2239.3.3.0");
Assert.assertEquals(response.jsonPath().getString("success"),"true","登录跳转接口访问失败!");
}
}
......
......@@ -100,6 +100,24 @@ public class NewActivityService {
return response;
}
public Response login(Map cookies, String dpm) throws Exception {
Map<String,String> map = new HashMap<>();
map.put("dpm",dpm);
logger.info("请求/hdtool/login接口");
logger.info("url:"+url+"/hdtool/login");
Response response = given().cookies(cookies).params(map).post(url+"/hdtool/login");
try{
Assert.assertEquals(String.valueOf(response.getStatusCode()),"200");
logger.info("/hdtool/login接口成功,返回信息:"+response.asString());
}catch(Exception e){
throw new Exception("/hdtool/login接口失败,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/hdtool/login接口失败,返回信息:"+response.asString());
}
return response;
}
public Response doJoin2( String activityId,String token) throws Exception{
Map<String,String> map = new HashMap<>();
map.put("activityId",activityId);
......
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