#Instagram Appium Test
Sample test of Instagram using Appium and AWS Device Farm
This Repo contains sample test files to be packaged and run on the AWS Device Farm. Instructions for installing Appium can be found in the Getting Started Guide. The analysis of this test and more information about Device Farm can be found in the blog post Mobile Testing on AWS Device Farm in less than 60 minutes.
You will need to have Eclipse, Appium, the Android SDK, and Maven installed to run this test. Also, install a TestNG plugin in Eclipse so you can run the test. Before you start make sure an emulator is running or a device in developer mode is connected to the computer.
- Download and import the project into Eclipse.
- Right click on the project and click Maven > Update.
- CD into the project and start the Appium server by running the command ./start-appium-android.sh
- Open the file HomeActivity.java, right click > Run As > TestNG Test
If the tests do not run you may have to update the start-appium-android.sh file to work in your environment.
Packaging and Running
To run the tests on Device Farm they must first be packaged.
- Cd into the project and run the command mvn clean package -DskipTests=true
- Open the folder target and verify the zip-with-dependencies.zip file exists.
- Login to Device Farm and create a new Project and Run.
- Upload the Instagram.apk file found in the /lib folder.
- Select the TestNG type and upload the zip-with-dependencies.zip.
If the tests upload successfully but do not run then verify that the *-tests.jar contains all the test files. To inspect the jar enter the following in the projects folder:
jar tf target/InstagramAppiumTest-0.0.1-SNAPSHOT-tests.jar