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

AWS Device Farm Appium tests
Apache License 2.0
91 stars 77 forks source link

Test doesn't run on aws devices farm #18

Closed YaroslavHavrylovych closed 6 years ago

YaroslavHavrylovych commented 6 years ago

I did pull the appium-tests-for-sample-app project, and generated zip-with-dependencies.zip (i.e. typed mvn clean package -DskipTests=true).

I generated apk for sample-app and checked it worked on my device.

Add the apk to aws-farm, added tests as testng and run. Always same results: setup suite and teardown suite are done, the rest - failed. On the video from device farm I can see that the app didn't start at all. I tried even an empty test and same.

I can't find anything usefull in the logs.

Locally appium works fine. I had a lot of tests to run, but can't make it work in cloud.

I'm searching for the help or for any new idea (I spent the whole day on trying to run it).

Test results:

screen shot 2018-05-09 at 10 35 28
floorra commented 6 years ago

Hi,

Can you share your failed run url with us, so we can help you debug it.

jamesknowsbest commented 6 years ago

Did you check your desired capabilities. What may have happened is that they're set for the local execution. We shouldn't need to set these for device farm as it will do that on our behalf if that is the case. Let me know either way when you get the chance.

YaroslavHavrylovych commented 6 years ago

I used empty capabilities (as here):

DesiredCapabilities capabilities = new DesiredCapabilities();
driver = new AndroidDriver<MobileElement>("http://127.0.0.1:4723/wd/hub", capabilities);

and once tried with device set capabilities.setCapability("deviceName", "Android"); Is that what you're asking @jamesknowsbest ?

YaroslavHavrylovych commented 6 years ago

Sorry, @floorra but how can I share a url with you? I doubt you access a link even if I would post it here. Or maybe you meant something else?

jamesknowsbest commented 6 years ago

@YaroslavHavrylovych yes, which device are you using? I want to try and reproduce the issue. Also @floorra I assume works for the device farm team or some derivative of. I believe they can use the GUIDs in the URL to look up the logs and see what the issues was.

YaroslavHavrylovych commented 6 years ago

So device is "amazon fire 2015".

The simplest test link is here.

Thanks for your time.

jamesknowsbest commented 6 years ago

Okay,

I cloned the and built the sample project using these commands:

git clone https://github.com/awslabs/aws-device-farm-sample-app-for-android.git
    cd aws-device-farm-sample-app-for-android/
    ./gradlew cC

Then I build the sample project here using these commands:

git clone https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app.git
cd aws-device-farm-appium-tests-for-sample-app/
mvn clean package -DskipTests=true

Then I scheduled a run with appium 1.7.2 and the amazon file 2015 image

image

image

and I can reproduce the issue.

image

It looks like there is an issue with that device from the logs

image

Here is my URL

https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-east-1#/projects/3141c0a7-8f38-4099-a679-00e7a9a5e46c/runs/d1111cb3-9549-4343-96fd-585f068beb95/jobs/00000/suites/00001

I parsed the logs and keep seeing this error from the logs:

2018-05-24T21:09:31.378895Z Failed to register system service "com.amazon.client.metrics.AndroidMetricsFactoryImpl". The class was not found for the provided classloader.
2018-05-24T21:09:39.225895Z Failed to register system service "com.amazon.client.metrics.AndroidMetricsFactoryImpl". The class was not found for the provided classloader.

I'm running the same test on the google pixel 7.1.2 to see if they work there.

floorra commented 6 years ago

Hi,

This is a known issue only with amazon fire 2015 device. We are working on fix for this issue. Please try other devices. You should be able to run your tests.

Thanks

jamesknowsbest commented 6 years ago

can confirm, the test s work on a google pixel

image