appium - 如何在 pom 文件下编写多个类
解决方案
有两种方法可以Testng
使用执行测试用例Maven
直接运行 Testng 测试用例 Pom.xml 没有任何 Testng.xml (不推荐的方式,因为你不能利用 Textng.xml 的许多设施,特别是控制序列等)
创建 testng 测试用例后,在with as中添加testng
依赖项pom.xml
scope
test
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
<scope>test</scope>
</dependency>
这是简单的示例或分步指南(直到第 5 步)
为 Pom.xml 调用 Testng.xml(推荐方式)
使用创建Testng
测试用例后,Testng.xml
我们可以调用testng.xml
usingmaven surefire plugin
如下所述
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<!-- TestNG suite XML files -->
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
这是执行此操作的分步指南。
推荐阅读
- python - 无法在 Pillow 中粘贴调整大小的图像
- javascript - 一个操作的多个获取请求
- java - 我正在尝试从我的类“Cerc”创建一个对象数组,该类具有 int 类型和 string 类型的属性
- typescript - 我可以从打字稿中的泛型类型中引用参数的类型吗?
- python - 如何在烧瓶中制作锚标签调用功能
- css - 模拟动态 CRM 页面
- haskell - 定义 Hask 的目的是什么?
- java - Kotlin:getFusedLocationProviderClient 崩溃
- c# - EF Core 设置连接字符串
- java - 使用 JdbcPagingItemReader Spring Batch 读取第 0 页的问题