In the following blog, I will demonstrate how to conduct a`Device Certification’ testing of an Android app manually on Cloud AWS Device Farm using Appium.
Introduction to AWS Device Farm
AWS Device Farm is an app testing service hosted on cloud infrastructure by Amazon Web Services. It allows users to test and interact with Android, iOS, and Web apps on real, physical phones and tablets of there choice.
Device Farm usage
Running Automated tests of apps with Appium and TestNG framework.
Manually running tests with real time interactions on physical devices hosted remotely on AWS.
Prerequisites to run device certification test’s on AWS Device Farm
- Java/JDK is installed
- Eclipse IDE is installed. TestNG is installed.
- m2e Maven Integration for Eclipse.
- Apache Maven latest version.
- AWS Account and IAM User are created.
- .APK file of android app to be tested.
Preparing Appium Java TestNG Package
- To create Appium Java TestNG test suite for a android app please visit my earlier blog How to Automate Testing for Android Native Apps Using Appium
- Create a new Maven project in Eclipse of type: maven-archetype-quickstart.
- Copy the Appium TestNG class created in step 1 to Maven project under src/test/java.
- Above Maven project with all test dependencies should be packaged in a .zip file before uploading to AWS Device Farm, and instructions for this is given in this AWS post Maven Build Process.
- Build and package above Maven project using the following command. mvn clean package –DskipTests=true
Maven project structure should look as below, zip-with-dependencies file should contain our test code with all dependencies.
Log in to AWS Device Farm with your IAM user account, and go to AWS Device Farm console under Mobile Services category.
Create a new project, which will serve as a logical work space foryour test runs.
After the above project is created, click on the project and create a new run.
Upload .APK file of your app, and go to the next step.
Upload zip-with-dependencies zip file present in the “target” folder of the Maven project in Eclipse as shown.
Choose devices which are compatible with the app to test.
Specify settings to simulate real-world scenarios and device configurations in the next step.
Click on “Review and start run.” In `Review and start run’ page, click “Confirm and start run”. After test run is complete, test results are shown as below.
Read Other Appium related blogs
How to Automate Testing for Android Native Apps Using Appium
Don’t miss my next blog on – Running Appium Automation Script on Android Emulators
Using Appium automation script to Check SQLite DB Content of a Device!