随笔分类 -  测试 / 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. 阅读全文
posted @ 2024-11-14 10:53 iTao0128 阅读(15) 评论(0) 推荐(0) 编辑
摘要: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" 阅读全文
posted @ 2024-11-12 22:18 iTao0128 阅读(4) 评论(0) 推荐(0) 编辑
摘要:添加依赖 <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.10</version> </dependency> <dependency> <groupId>com.releva 阅读全文
posted @ 2024-11-09 22:35 iTao0128 阅读(19) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/2f934240699e https://blog.csdn.net/cold___play/article/details/135416968 阅读全文
posted @ 2024-09-15 22:15 iTao0128 阅读(5) 评论(0) 推荐(0) 编辑
摘要:在将源代码打包为jar文件后,你可以按照以下步骤来执行TestNG的测试用例: 确保在jar包中包含了所有的测试类和相关的依赖库。 在jar包所在的目录下创建一个TestNG的XML配置文件,可以命名为testng.xml。 在配置文件中指定要执行的测试类或方法。你可以使用<classes>和<me 阅读全文
posted @ 2024-08-24 16:41 iTao0128 阅读(141) 评论(0) 推荐(0) 编辑
摘要:maven项目,把testng用例放在test目录下,配置pom.xml 文件如下,执行mvn test 能自动执行testng里面的用例。 pom文件配置 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://ww 阅读全文
posted @ 2023-09-03 23:00 iTao0128 阅读(289) 评论(0) 推荐(0) 编辑
摘要:相关依赖 <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.8.5</version> </dependency> ZTestReport.java packag 阅读全文
posted @ 2023-04-09 21:03 iTao0128 阅读(18) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/Leoon123/article/details/125740309 阅读全文
posted @ 2023-04-05 21:03 iTao0128 阅读(5) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/xiaobo95/p/16204498.html 阅读全文
posted @ 2023-04-05 20:36 iTao0128 阅读(36) 评论(0) 推荐(0) 编辑
摘要:①只有确认按钮的弹框 WebDriver driver = new ChromeDriver(); driver.get("http://xxx"); Alert alert = driver.switchTo().alert(); alert.accept(); ②有确认和取消按钮的弹框 WebD 阅读全文
posted @ 2023-04-05 20:36 iTao0128 阅读(125) 评论(0) 推荐(0) 编辑
摘要:将driver声明为静态 : 如:在A类中,定义public static WebDriver driver; 在后续用例中,将driver赋值为 A.driver 阅读全文
posted @ 2023-04-05 20:31 iTao0128 阅读(9) 评论(0) 推荐(0) 编辑
摘要:Page Object模式 阅读全文
posted @ 2023-04-05 18:48 iTao0128 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1.安装create testng xml插件 2.全选用例class文件,右键选择create testng xml,自动生成testng.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://tes 阅读全文
posted @ 2023-04-05 18:05 iTao0128 阅读(21) 评论(0) 推荐(0) 编辑
摘要:勾选 阅读全文
posted @ 2023-04-03 22:04 iTao0128 阅读(5) 评论(0) 推荐(0) 编辑
摘要:suite>test>class>method 注: @BeforeMethod会在每一条@Test测试用例执行前执行 @AfterMethod会在每一条@Test测试用例执行后执行 阅读全文
posted @ 2023-04-03 21:18 iTao0128 阅读(15) 评论(0) 推荐(0) 编辑
摘要:环境:selenium3+chrome110版本 1.创建maven项目 代码写在test目录下 依赖: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-in 阅读全文
posted @ 2023-04-03 20:54 iTao0128 阅读(17) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示