摘要: 1.pom.xml配置generator插件 <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.7</versi 阅读全文
posted @ 2022-05-25 04:43 韩伊 阅读(922) 评论(0) 推荐(0)
摘要: 1.导入ExtentReport所需要的jar包 在pom.xml文件下添加依赖 <dependency> <groupId>com.relevantcodes</groupId> <artifactId>extentreports</artifactId> <version>2.41.1</ver 阅读全文
posted @ 2021-08-19 17:08 韩伊 阅读(70) 评论(0) 推荐(0)
摘要: 通过继承LoadableComponent类,测试程序可以判断浏览器是否加载了正确的页面,只需要重写isLoaded和load二个方法,此方法有助于页面对象的页面访问操作更加稳定 1.LoginPage类 package com.gloryroad.pageobjects; import org.o 阅读全文
posted @ 2021-08-18 21:22 韩伊 阅读(352) 评论(0) 推荐(0)
摘要: 1.新建页面对象类LoginPage import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import 阅读全文
posted @ 2021-08-18 19:24 韩伊 阅读(105) 评论(0) 推荐(0)
摘要: public class fanwe_login_database { //读取数据库的方法 public static Object[][] getTestData(String tablename) throws Exception { //声明MySQL的数据驱动 String diver = 阅读全文
posted @ 2021-08-16 16:35 韩伊 阅读(96) 评论(0) 推荐(0)
摘要: import com.cxy_fanwe.common.test_fanwe_qiantai;import org.apache.http.Header;import org.apache.http.client.methods.CloseableHttpResponse;import org.ap 阅读全文
posted @ 2021-08-16 14:44 韩伊 阅读(122) 评论(0) 推荐(0)
摘要: 1.get请求 [ { "description": "模拟一个没有参数的get请求", "request": { "uri": "/getdemo", "method": "get" }, "response": { "text": "这是一个没有参数的get请求" } }, { "descrip 阅读全文
posted @ 2021-08-16 14:40 韩伊 阅读(286) 评论(0) 推荐(0)
摘要: 1.mock是什么?mock测试就是在测试过程中,对于某些不容易构造或者不容易获取的对象,用一个虚拟的对象来创建以便测试的测试方法。在具体的测试过程中,我们经常会碰到需要模拟数据或者接口的情况,因为环境问题或者系统复杂度的问题,我们需要使用 Mock 方式进行数据的模拟 2 .mock应用场景 对象 阅读全文
posted @ 2021-08-16 11:29 韩伊 阅读(822) 评论(0) 推荐(0)
摘要: public class Httpclient_post { private ResourceBundle bundle; private String url; private BasicCookieStore store; //方法执行前先读取resource文件夹下的application文件 阅读全文
posted @ 2021-08-16 11:07 韩伊 阅读(1216) 评论(0) 推荐(0)
摘要: //1.get请求无参数@Testpublic void testGet() throws IOException { String result; HttpGet get = new HttpGet("http://www.baidu.com"); HttpClient client = Http 阅读全文
posted @ 2021-08-13 10:22 韩伊 阅读(799) 评论(1) 推荐(0)