allexif
allexif

Reputation: 11

How to run uiautomator 2.0 tests on Amazon Device Farm

I've just started to create a test framework for testing a hybrid mobile app developed in Ionic. For Android, I decided to use UiAutomator 2.0, but this requires a desired capability in the code that Device Farm is removing.

I tried to upload the .apk file and the jar with the test project but I receive an error saying that I do not have a classes dex file into my root test package.

The Documentation provided by Amazon is not specifying the dex file or other specific steps to follow and it's very superficial.

Does anyone have experience testing hybrid apps using Amazon Device Farm and using UiAutomator 2?

enter image description here

Upvotes: 0

Views: 498

Answers (1)

jmp
jmp

Reputation: 2375

I found the docs on how to make a uiautomator test package https://docs.aws.amazon.com/devicefarm/latest/developerguide/troubleshooting-ui-automator.html

It needs the classes.dex file and the META-INF directory inside of a jar with the same name as the package name.

I build the aws sample android app and extracted the classes.dex file and the META-INF directory from the test apk that was generated. I then zipped them up in a jar with this name:

com.amazonaws.devicefarm.jar

I hope that helps, James

Upvotes: 1

Related Questions