Introduction to Running Android Automated Testing On AWS Device Farm
Here's a beginner's tutorial on running an Android application test using AWS Device Farm.
Join the DZone community and get the full member experience.Join For Free
When it comes to mobile testing, two questions come in mind: "What are devices it supports and how do we test on all these devices?" It’s quite challenging to manually test on all devices and it’s not cost-effective either. Automating test cases saves of lots of time. Another challenge is running automation on actual devices.
There are multiple solutions that run automation on cloud, such as AWS Device Farm, Firebase Lab, Xamarin Test Cloud, Kobiton, Perfecto, Sauce Labs, and Experitest.
In this article will walk through how to utilize AWS Device Farm to run our automation. For this example, we use a Java Expresso-based test automation, but the concept applies to other technologies as well.
Let’s go through how to run android automation on AWS Device Farm using the fAWS console.
- Create an AWS account (if you haven’t already, it's free).
- From Services, select the device from under Mobile as shown in the below screen
You will get 1,000 minutes of free usage during intial sign-up.
- Create Project Name (in our case, "AWSDemo")
- Select Create new run (a window will prompt you to select the application type).
- In our demo, we are using an Android application.
- It will prompt you to upload the APK file.
- After uploading, it will extract the metadata.
Configuring The Test
AWS supports multiple types of tests like Fuzz, UI Automation, Appium Junit, and Python as shown in the below.
Ours is Expresso tests, selected instrumentation tests as an option and uploaded our test APK. It will give test package info and the instrumentation runner info as below.
Select the Device
The test will automatically start after the device is available.
Once test run is completed, the results will be displayed as below:
Finally, selecting "Logs" will give you more details.
Opinions expressed by DZone contributors are their own.