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

更新maven配置 13.07

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