Appium Blog Series 4 – Automated Device Certification Testing On Cloud AWS Device Farm with Appium

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

  1. 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
  2. Create a new Maven project in Eclipse of type: maven-archetype-quickstart.
  3. Copy the Appium TestNG class created in step 1 to Maven project under src/test/java.
  4. 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.
  5. 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.

Appium Java

Log in to AWS Device Farm with your IAM user account, and go to AWS Device Farm console under Mobile Services category.

Mobile Hub

Create a new project, which will serve as a logical work space foryour test runs.

AWS Services

After the above project is created, click on the project and create a new run.

AWS

Upload .APK file of your app, and go to the next step.

Android Application

Upload zip-with-dependencies zip file present in the “target” folder of the Maven project in Eclipse as shown.

Java Testing

Choose devices which are compatible with the app to test.

Create a new run

Specify settings to simulate real-world scenarios and device configurations in the next step.

Application

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.

Android

Android Applications

Appium Java

Appium Applications

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!

Appium – A Good Open Source Mobile App Testing Framework

Author

  • Jagannath S

    Jagannath is Senior Test Leader in Trigent with more than 15 years of experience. He holds B.E (CSE) from Bangalore university and is PMI certified PMP holder. He has global experience in areas of Test Architecture, Test Strategy, Test Delivery, Leadership for varied business domains like BFSI, Retail, Telecom, News & Media, Supply Chain Management, Consumer Electronics, and has extensive project experience in areas of Performance testing, Automation testing, Functional testing, ETL Data warehouse testing.