随笔分类 - 测试 / testng
摘要:linux安装maven及环境配置 一、maven下载地址,安装binaries版本 https://dlcdn.apache.org/maven/maven-3/3.8.8/ 或者使用wget命令命令:wget https://dlcdn.apache.org/maven/maven-3/3.8.
阅读全文
摘要:pom文件配置 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
阅读全文
摘要:添加依赖 <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.10</version> </dependency> <dependency> <groupId>com.releva
阅读全文
摘要:https://www.jianshu.com/p/2f934240699e https://blog.csdn.net/cold___play/article/details/135416968
阅读全文
摘要:在将源代码打包为jar文件后,你可以按照以下步骤来执行TestNG的测试用例: 确保在jar包中包含了所有的测试类和相关的依赖库。 在jar包所在的目录下创建一个TestNG的XML配置文件,可以命名为testng.xml。 在配置文件中指定要执行的测试类或方法。你可以使用<classes>和<me
阅读全文
摘要:maven项目,把testng用例放在test目录下,配置pom.xml 文件如下,执行mvn test 能自动执行testng里面的用例。 pom文件配置 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://ww
阅读全文
摘要:相关依赖 <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.8.5</version> </dependency> ZTestReport.java packag
阅读全文
摘要:https://blog.csdn.net/Leoon123/article/details/125740309
阅读全文
摘要:https://www.cnblogs.com/xiaobo95/p/16204498.html
阅读全文
摘要:①只有确认按钮的弹框 WebDriver driver = new ChromeDriver(); driver.get("http://xxx"); Alert alert = driver.switchTo().alert(); alert.accept(); ②有确认和取消按钮的弹框 WebD
阅读全文
摘要:将driver声明为静态 : 如:在A类中,定义public static WebDriver driver; 在后续用例中,将driver赋值为 A.driver
阅读全文
摘要:1.安装create testng xml插件 2.全选用例class文件,右键选择create testng xml,自动生成testng.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://tes
阅读全文
摘要:suite>test>class>method 注: @BeforeMethod会在每一条@Test测试用例执行前执行 @AfterMethod会在每一条@Test测试用例执行后执行
阅读全文
摘要:环境:selenium3+chrome110版本 1.创建maven项目 代码写在test目录下 依赖: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-in
阅读全文