AWS 设备场中的 TestNG 注释被忽略

TestNG annotations getting ignored in AWS Device farm

如何在 AWS Device farm 中 运行 一组特定的 appium java testng 测试用例?我可以看到设备农场忽略了 testNG 的所有注释,包括组和启用。有什么办法吗?

为了仅 运行 个测试子集,项目需要在 *-tests.jar 的根目录中包含 testng.xml 文件。这是我撰写的 GitHub post 展示如何做到这一点。

https://github.com/aws-samples/aws-device-farm-appium-tests-for-sample-app/pull/14

在标准环境中,测试是单独解析和执行的。结果,某些 testng 功能(如优先级和嵌套组)没有得到尊重。此外,测试执行速度较慢,因为 Appium 服务器将在测试之间重新启动。

https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-environments.html#test-environments-standard

如果需要这些功能,项目将需要使用 Device Farm 中的自定义环境。

https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html

这会生成一组所有测试的日志和视频,因为测试包未被解析。

Hth

-詹姆斯