|
@@ -16,26 +16,26 @@ import static org.testng.Assert.*;
|
|
public class HomePageTest {
|
|
public class HomePageTest {
|
|
HomePage homePage=new HomePage();
|
|
HomePage homePage=new HomePage();
|
|
|
|
|
|
- @Test
|
|
|
|
- @Description("正常测试用例:查询所有政策专题")
|
|
|
|
- @Story("首页")
|
|
|
|
- public void getPolicyTopic(){
|
|
|
|
- try{
|
|
|
|
- List<Object[]> sql= JDBCUtils.queryMulti("select xcx_img,name,content from back_sys_topic where is_delete='0' and status='0' order by sort;");
|
|
|
|
- Response response= homePage.getPolicyTopic();
|
|
|
|
- assertEquals((int)response.path("code"),200);
|
|
|
|
- assertEquals(response.path("message"),"操作成功");
|
|
|
|
- ArrayList<HashMap<String,String>> result=response.path("data");
|
|
|
|
- for (int i=0;i<result.size();i++){
|
|
|
|
- assertEquals(result.get(i).get("cover"),sql.get(i)[0]);
|
|
|
|
- assertEquals(result.get(i).get("name"),sql.get(i)[1]);
|
|
|
|
- assertEquals(result.get(i).get("describe"),sql.get(i)[2]);
|
|
|
|
- }
|
|
|
|
- }catch (AssertionError e){
|
|
|
|
- Reporter.log("HomePageTest.getPolicyTopic:查询所有政策专题,断言失败!");
|
|
|
|
- throw e;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// @Test
|
|
|
|
+// @Description("正常测试用例:查询所有政策专题")
|
|
|
|
+// @Story("首页")
|
|
|
|
+// public void getPolicyTopic(){
|
|
|
|
+// try{
|
|
|
|
+// List<Object[]> sql= JDBCUtils.queryMulti("select xcx_img,name,content from back_sys_topic where is_delete='0' and status='0' order by sort;");
|
|
|
|
+// Response response= homePage.getPolicyTopic();
|
|
|
|
+// assertEquals((int)response.path("code"),200);
|
|
|
|
+// assertEquals(response.path("message"),"操作成功");
|
|
|
|
+// ArrayList<HashMap<String,String>> result=response.path("data");
|
|
|
|
+// for (int i=0;i<result.size();i++){
|
|
|
|
+// assertEquals(result.get(i).get("cover"),sql.get(i)[0]);
|
|
|
|
+// assertEquals(result.get(i).get("name"),sql.get(i)[1]);
|
|
|
|
+// assertEquals(result.get(i).get("describe"),sql.get(i)[2]);
|
|
|
|
+// }
|
|
|
|
+// }catch (AssertionError e){
|
|
|
|
+// Reporter.log("HomePageTest.getPolicyTopic:查询所有政策专题,断言失败!");
|
|
|
|
+// throw e;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@Description("正常测试用例:查询专题关联的项目")
|
|
@Description("正常测试用例:查询专题关联的项目")
|