aws-samples / aws-device-farm-appium-tests-for-sample-app

AWS Device Farm Appium tests
Apache License 2.0
90 stars 80 forks source link

How to use priority in test cases? #12

Open sapins opened 6 years ago

sapins commented 6 years ago

Can we use priority in our test cases? I am executing test cases on AWS device farm, in my local system it’s working fine. However, on device farm it’s not working as per given priority.

Can we handle test case execution using testng.xml file on AWS device farm?

jamesknowsbest commented 6 years ago

Hi, I just submitted a pull request showing how to include a testng.xml file. https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/pull/13

Hope that helps

sapins commented 6 years ago

Hi James,

We can can control the text class order from testng.xml as you described in #13. However, how can we control the @Test methods execution order inside class?

Ex: If we automate facebook app, do we need to login into application for each test case as AWS Device Farm executes each @Test method individually, each one using a fresh instance of the Appium server.

pathikb commented 6 years ago

Does anyone know the answer to this? AWS Device Farm seems to ignore the "priority" set for the test methods within a class and executes them randomly.

jamesknowsbest commented 6 years ago

@pathikb I just made a comment on this other issue where I explain how to run a test from other tests. Executing the tests this way it appears that priority works.

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

However, you need to record the test results yourself and there will only be one video for all the tests.

HTH James