AWS Device Farm Sample App for iOS

This is a sample native iOS app that contains many of the stock iOS components and elements. It also contains multiple Calabash tests to get you started. You can also use this app with the AWS Device Farm Built-in Fuzz Test.

You can use this app and example test suite as a reference for your own Device Farm tests.

Notes

All of the views are programatically created within the app. Storyboard or XIB files are not used. This is to prevent merge conflicts in the future.

Explicit delays are occasionally added to the tests to allow the page to fully render, they are commented as such in the code.

Getting Started

In order to run this app within Device Farm you will need to create a local copy of this repository and build the application from source.

Building Project with Xcode

  1. Select the Calabash target (if built with Calabash) and select an iOS Device
  2. Use the Product/Build for Running option

Packing and Creating IPA

  1. Go into your build directory: ~/Library/Developer/Xcode/DerivedData/ProjectName/Build/Products/Debug-iphoneos
  2. Create a new directory named "Payload"
  3. Move the appName.app folder into the "Payload" folder
  4. Zip the "Payload" folder and give it a .ipa extension

Testing on Device Farm

Follow the steps in the official AWS Device Farm documentation for:

  1. Built-in Fuzz Testing
  2. Calabash Testing

Examples of Specific Scenarios

Component App Implementation
Alerts: Modal View, Alerts, Pop Overs (only works on iPads) source code - Calabash Test
Static Page source code - Calabash Test
Login Page source code - Calabash Test
Navigation Controllers source code - Calabash Test
Expected Crash source code
Web View source code - Calabash Test

Examples of Native Features

Feature App Implementation
Camera source code
Image Gallery source code
Scroll View source code
Out of View Content source code
Video source code
Table of Elements source code

Examples of Inputs

Component App Implementation
DatePicker source code
ContactAddButton source code
TextView source code
Labels source code
Text Input source code
Gestures Input source code
Refresh Control source code
Button source code
Data Picker source code
Switch View source code

Examples of Navigation

Component App Implementation
Tab Bar source code
Page Viewer source code