AWS Device Farm上的Appium测试未按指定顺序执行

问题描述 投票:0回答:1

当我在appium上本地运行时,我的测试工作正常。但是当我在AWS Device Farm上运行测试时,不遵循所需的执行顺序。我使用过@Tests(优先级= 1)等。但测试没有按顺序执行。为亚马逊设备场中的每个@Test方法创建新会话。

所需的执行顺序是 - BeforeGroup BeforeMethod1 AfterMethod1 BeforeMethod2 AfterMethod2 BeforeMethod3 AfterMethod3 AfterGroup

但是在AWS Device Farm上,订单是 - BeforeGroup BeforeMethod1 AfterMethod1 AfterGroup(之后发生拆解)

任何人都可以告诉我一种方法来克服这一点。提前致谢。

automated-tests appium appium-android aws-device-farm
1个回答
1
投票

这在Device Farm的标准环境中是预期的。但是我在这里开发了一种解决方法。

https://github.com/aws-samples/aws-device-farm-appium-tests-for-sample-app/issues/15#issuecomment-397845385

或者,项目可能会受益于Device Farm中的自定义环境

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

这应该允许设备农场优先考虑。

Hth -James

© www.soinside.com 2019 - 2024. All rights reserved.