Commit 640fea81 authored by Su-Yi's avatar Su-Yi

更新maven配置 13.07

parent 5dab1de5
......@@ -121,19 +121,21 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<!-- -->
<suiteXmlFile>src/test/testNG.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<!--即使测试失败,也继续下面的测试-->
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>com.kjj.qa.config.ExtentTestNGIReporterListener</value>
</property>
</properties>
<!--即使测试失败,也继续下面的测试-->
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
......
......@@ -44,86 +44,86 @@ public class Home {
Assert.assertEquals(result,true,"获取jssdk失败");
}
@Test (description = "早中晚日报列表",priority = 2)
public void 早中晚日报列表() throws IOException {
Response response = network.getResponse("/kjy/mp/content/getInitDailyList");
int status = response.jsonPath().get("data[0].status");
Assert.assertEquals(status,2,"获取早中晚日报列表信息失败");
}
@Test (description = "精准素材库",priority = 3)
public void 精准素材库() throws IOException {
Response response = network.getResponse("/kjy/mp/accurate/usrDetail");
int result = response.jsonPath().get("data.companyId");
Assert.assertEquals(result,5,"获取精准素材成功");
// Reporter.log("用例执行失败:服务器错误!");
}
@Test (description = "今日访问",priority = 4)
public void 今日访问() throws IOException {
//获取旧的今日访问数量
Response response = network.getResponse("/kjy/mp/seller/todayVisit");
int oldTodayCount = response.jsonPath().get("data.todayCount");
//访问名片 具体啥接口得问开发
Map<String, Object> params = new HashMap<String, Object>();
params.put("contentId",79040);
params.put("scId","7703312855");
params.put("comefrom",1);
params.put("fromUserId","2477770");
Response vistorRes = network.visitorBehavior(params,"/kjy/mp/sellerCard/visit");
//获取新的今日访问数量
response = network.getResponse("/kjy/mp/seller/todayVisit");
int newTodayCOunt = response.jsonPath().get("data.todayCount");
Assert.assertEquals(oldTodayCount + 1,newTodayCOunt,"今日访问量统计有误");
}
@Test (description = "分类列表",priority = 5)
public void 分类列表() throws IOException {
Response response = network.getResponse("/kjy/mp/classify/list");
String classifyName = response.jsonPath().get("data.list[0].classifyName");
Assert.assertEquals(classifyName ,"推荐","获取列表信息失败");
// 检验是否有公司专区
}
@Test (description = "推荐分类下的内容列表",priority = 6)
//首頁-信息
public void 推荐分类下的内容列表() throws IOException {
//穿的分页参数
Map<String, Object> params = new HashMap<String, Object>();
params.put("classfiyId","1");
params.put("pageIndex","1");
params.put("pageSize","10");
Response response = network.getResponse(params,"/kjy/mp/classify/contentList");
int pageSize = response.jsonPath().get("data.pageSize");
Assert.assertEquals(pageSize,10,"获取分类下的内容列表失败");
}
@Test (description = "用户信息",priority = 7)
public void 用户信息() throws IOException {
//获取旧的今日访问数量
Response response = network.getResponse("/kjy/mp/user/info");
String wxName = response.jsonPath().get("data.wxName");
Assert.assertEquals(wxName ,"小葡萄","获取用户信息失败");
}
@Test (description = "销售员公司资料总数",priority = 8)
//首頁-信息
public void 销售员公司资料总数() throws IOException {
Response response = network.getResponse("/kjy/mp/companyDocument/count");
boolean result = response.jsonPath().getBoolean("success");
Assert.assertEquals(result, true, "获取销售员公司资料总数失败");
// Reporter.log("用例执行失败:服务器错误!");
}
@AfterSuite
public void testSuite() throws IOException {
}
// @Test (description = "早中晚日报列表",priority = 2)
// public void 早中晚日报列表() throws IOException {
// Response response = network.getResponse("/kjy/mp/content/getInitDailyList");
// int status = response.jsonPath().get("data[0].status");
// Assert.assertEquals(status,2,"获取早中晚日报列表信息失败");
// }
//
// @Test (description = "精准素材库",priority = 3)
// public void 精准素材库() throws IOException {
// Response response = network.getResponse("/kjy/mp/accurate/usrDetail");
// int result = response.jsonPath().get("data.companyId");
// Assert.assertEquals(result,5,"获取精准素材成功");
//// Reporter.log("用例执行失败:服务器错误!");
// }
//
// @Test (description = "今日访问",priority = 4)
// public void 今日访问() throws IOException {
// //获取旧的今日访问数量
// Response response = network.getResponse("/kjy/mp/seller/todayVisit");
// int oldTodayCount = response.jsonPath().get("data.todayCount");
//
// //访问名片 具体啥接口得问开发
// Map<String, Object> params = new HashMap<String, Object>();
// params.put("contentId",79040);
// params.put("scId","7703312855");
// params.put("comefrom",1);
// params.put("fromUserId","2477770");
// Response vistorRes = network.visitorBehavior(params,"/kjy/mp/sellerCard/visit");
//
// //获取新的今日访问数量
// response = network.getResponse("/kjy/mp/seller/todayVisit");
// int newTodayCOunt = response.jsonPath().get("data.todayCount");
//
// Assert.assertEquals(oldTodayCount + 1,newTodayCOunt,"今日访问量统计有误");
// }
//
// @Test (description = "分类列表",priority = 5)
// public void 分类列表() throws IOException {
// Response response = network.getResponse("/kjy/mp/classify/list");
// String classifyName = response.jsonPath().get("data.list[0].classifyName");
// Assert.assertEquals(classifyName ,"推荐","获取列表信息失败");
//
// // 检验是否有公司专区
// }
//
// @Test (description = "推荐分类下的内容列表",priority = 6)
// //首頁-信息
// public void 推荐分类下的内容列表() throws IOException {
// //穿的分页参数
// Map<String, Object> params = new HashMap<String, Object>();
// params.put("classfiyId","1");
// params.put("pageIndex","1");
// params.put("pageSize","10");
//
// Response response = network.getResponse(params,"/kjy/mp/classify/contentList");
// int pageSize = response.jsonPath().get("data.pageSize");
// Assert.assertEquals(pageSize,10,"获取分类下的内容列表失败");
// }
//
// @Test (description = "用户信息",priority = 7)
// public void 用户信息() throws IOException {
// //获取旧的今日访问数量
// Response response = network.getResponse("/kjy/mp/user/info");
// String wxName = response.jsonPath().get("data.wxName");
// Assert.assertEquals(wxName ,"小葡萄","获取用户信息失败");
// }
//
// @Test (description = "销售员公司资料总数",priority = 8)
// //首頁-信息
// public void 销售员公司资料总数() throws IOException {
// Response response = network.getResponse("/kjy/mp/companyDocument/count");
// boolean result = response.jsonPath().getBoolean("success");
// Assert.assertEquals(result, true, "获取销售员公司资料总数失败");
//// Reporter.log("用例执行失败:服务器错误!");
// }
//
// @AfterSuite
// public void testSuite() throws IOException {
//
// }
}
This source diff could not be displayed because it is too large. You can view the blob instead.
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