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.
To download the Jenkins plugin, you need to:
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:
Now Jenkins is configured for Amazon Device Farm.
Follow the given instructions to use the ADF plugin in a Jenkins job:
Now we are good to go.
Click on the “Build Now” option in the left side options menu of the selected project.
Now the build will start running.
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:
If you click the “Full Report” link, a Jenkins Test report will open in the ADF Console:
If you click any device, reports containing pass/fail information, logcat captures, device logs, screenshots, videos, and performance data are displayed.
Check out how this process works in the video below: