Test Amazon Shopping App with Aws DeviceFarm and Appium

AWS Device Farm is App Service Testing hosted by Amazon. This provides platform to test and interact with iOS, Android and web applications on real mobile devices and tablets. AWS Device farm can be used for :

1. Automated testing of apps and

2. Remote access of devices for real time interaction.

There are many reasons for this, like support for parallel execution. Availability of multiple mobile and tablet devices and also it helps us to identify

Ensure that packaging type is Jar in POM.xml file. This jar file will be used in AWS device farm to execute our tests.

Add the below plugin in POM file, this will allow to package our test classes as a jar file using “test-jar” goal.

Step 3:

Add maven-dependency-plugin to build dependencies as JAR files using “copy-dependencies” goal. This takes the list of project dependencies and copies them to a specified location, stripping the version if desired.

We need to copy zip.XML assembly file from AWS to our project directory. This zip file will copy all dependencies jar directory and the jar file that contains all the test scripts. It will bundle everything and finally create a zip file. This xml file should be placed inside “src/main/assembly/zip.xml” folder.

Use maven-assembly-plugin to package tests and all dependencies into a single zip file.

Build, package and verify

Upload the package on Device Farm Console.

We need to upload all the artifacts highlights from above screenshot in the AWS device farm, as Device Farm will be using them. Below are the steps for this.

Follow the steps as in above diagram, after login to AWS, create a new run, upload zip file of the application, select devices to execute tests and start run.

Once the execution is completed, you will see report, screenshots and execution video. You can also explore logs. Just to let you know AWS device farm gives initial 250 minutes of test execution fee of cost.

Hope this was useful! If you ever need my help, you can write in comments sections. Also, you can contact me through my LinkedIn Profile.

https://github.com/raghwendra-sonu/AWSDeviceFarm

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store