【问题标题】:TestNG annotations getting ignored in AWS Device farmTestNG 注释在 AWS 设备场中被忽略
【发布时间】:2019-02-17 01:32:28
【问题描述】:

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

【问题讨论】:

    标签: amazon-web-services testng appium aws-device-farm


    【解决方案1】:

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

    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

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

    -詹姆斯

    【讨论】:

      猜你喜欢
      • 2016-04-08
      • 2021-11-01
      • 2019-07-14
      • 2018-03-08
      • 2012-09-09
      • 1970-01-01
      • 2012-05-19
      • 1970-01-01
      • 2015-01-09
      相关资源
      最近更新 更多