Continuous Testing Using AWS Device Farm

In my previous post, we learned how to conduct Automated Mobile App Testing in Amazon Device Farm using the Appium Java TestNG framework. In this post, we will learn about continuous integration using the Amazon Device Farm.

Automated tests can be scheduled in Jenkins to perform continuous testing using the Amazon Device Farm for each new build of the application. It is useful to perform regression testing of each build with Amazon Device Farm.

There is an Amazon Device farm plugin is available for Jenkins. Here are the steps on how to configure your AWS account with Jenkins.

Download and install ADF plugin in Jenkins:

To download the Jenkins plugin, you need to:

  • Login to the Jenkins UI
  • Find the plugin by choosing Manage Jenkins > Manage Plugins > Available
  • Search for “aws-device-farm”
  • Install the AWS Device Farm plugin
  • Restart Jenkins
  • Now navigate to Manage Jenkins > Manage Plugins > Installed
  • Verify “aws-device-farm” plugin is installed
continuous_testing1

Create an AWS Identity and Access Management User for Jenkins CI Plugin:

AWS Identity and Access Management (IAM) is a web service that enables Amazon Web Services (AWS) customers to manage users and user permissions in AWS. Here we will use it to access the AWS Device Farm through Jenkins. Click here for details on IAM user permissions for accessing Device Farm and on creating and assigning access policy in IAM.

First Time Configuration Guidelines:

To use the Amazon Device Farm plugin, the system needs to be configured as given below:

  • In the Jenkins web UI, on the left-hand side of the screen, choose Manage Jenkins > Configure System
  • Scroll down to the AWS Device Farm header
  • Enter your Access Key ID and Secret Access Key into their respective boxes
  • Click on the Save button
continuous_testing2

Now Jenkins is configured for Amazon Device Farm.

How to use ADF Plugin:

Follow the given instructions to use the ADF plugin in a Jenkins job:

  • Log into Jenkins web UI
  • Click the job you want to edit
  • On the left-hand side of the screen, select Configure
  • Scroll down to the Post-build Actions header; the AWS Device Farm section should be visible in the “Post-build Actions” section of project configuration
  • Select your AWS Device Farm project from Project dropdown box
  • Select preferred device pool
  • In Application, enter the path of APK built
  • Choose test to run. I have selected “Appium Java TestNG”
  • After selecting the Test Type, the respective fields are displayed. In my case it is “Tests,” where the name of the test zip file (.zip file containing test script and all the required dependencies) needs to be entered
  • Choose Save
continuous_testing3

Now we are good to go.

Click on the “Build Now” option in the left side options menu of the selected project.

continuous_testing4

Now the build will start running.

continuous_testing5

Once the build has been successfully completed, both nice charts on the Jenkins project and links (“Full Report” link) to web reports on AWS will be displayed:

continuous_testing6

If you click the “Full Report” link, a Jenkins Test report will open in the ADF Console:

continuous_testing7

If you click any device, reports containing pass/fail information, logcat captures, device logs, screenshots, videos, and performance data are displayed.

continuous_testing8

Video

Check out how this process works in the video below:

Neha Tomar

Neha Tomar

Module Lead Quality Assurance

Neha Tomar is a Module Lead Quality Assurance Engineer at 3Pillar Global. Neha brings with her vast experience in the Healthcare, E-Learning, e-Commerce and Pharmaceutical domains. She has experience of testing web and mobile applications using Manual testing and automation test tools. Prior to joining 3Pillar Global, she had worked for United Health Group and PureTesting.

2 Responses to “Continuous Testing Using AWS Device Farm”
  1. Vinay Kumar on

    I am executing my scripts in Amazon Web Services(AWS). During Execution App is getting invoked but Keypad is not getting invoked. Do you have any idea regarding script execution across AWS pltform. If yes Please help me ought.

    Reply
  2. Madhu Golla on

    Hello Neha,

    Hope doing great.

    I saw your postings about Automation Testing using ADF. We are also doing the same kind of testing for the Web Application using ADF. We are following the Appium Java TestNG combination type. Do you have any sample code for running the same script in IOS and Android at same time rather than commenting IOS while running the Android script. Thanks in Advance. Appreciate your help.

    Thanks,
    Madhu Golla.

    Reply
Leave a Reply

Related Posts

The 3 Keys to Building Products That Drive Retention –... I had the privilege of being invited to speak at the Wearable Technology Show in Santa Clara this week, where I gave a bit of a reprisal of a talk I d...
High Availability and Automatic Failover in Hadoop Hadoop in Brief Hadoop is one of the most popular sets of big data processing technologies/frameworks in use today. From Adobe and eBay to Facebook a...
3Pillar CEO David DeWolf Quoted in Enterprise Mobility Excha... David DeWolf, Founder and CEO of 3Pillar Global, was recently quoted in a report by Enterprise Mobility Exchange on the necessity of understanding and...
How the Right Tech Stack Fuels Innovation – The Innova... On this episode of The Innovation Engine podcast, we take a look at how choosing the right tech stack can fuel innovation in your company. We'll talk ...
The Road to AWS re:Invent 2018 – Weekly Predictions, P... For the last two weeks, I’ve been making predictions of what might be announced at AWS’ upcoming re:Invent conference. In week 1, I made some guesses ...