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

浙公网安备 33010602011771号