Home

Awesome

DEPRECATED - Calabash Sample Tests for AWS Device Farm Sample App

Note: This sample is now deprecated and may not work as marking in the documentation below.

This is a collection of example Calabash test suites written for the AWS Device Farm Android sample app. Please use these tests as a reference for your own AWS Device Farm Calabash tests.

Note

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

Android

Getting Started

  1. If you're just getting started with Calabash, first read the Official Calabash Documentation.

    We currently support calabash version 0.9.0. Be sure to have this installed when you test locally. Later versions of Calabash might cause unexpected results when running Calabash tests on AWS Device Farm.

  2. Run the command to install the proper version of the calabash-android gem:

    gem install calabash-android –v 0.9.0
    
  3. Verify that you have calabash-android installed with this command:

    calabash-android version
    

    You should get "0.9.0" as the result

Running Your Tests Locally

Follow the official Calabash guide to run your tests locally

Running Your Tests on AWS Device Farm

Read the Device Farm documentation to run your tests in the AWS Cloud

Examples For Android

Examples for Testing Specific Scenarios

ComponentAndroid ImplementationTests
Alerts: Toasts and Dialogssource codesource code
Fixturessource codesource code
Static Page: TextViewsource codesource code
Login Pagesource codesource code
Nested Views: Back and Up Navigationsource codesource code
Web Views<ul><li><a href ="https://github.com/awslabs/aws-device-farm-sample-app-for-android/blob/master/app/src/main/java/com/amazonaws/devicefarm/android/referenceapp/Fragments/LocalWebView.java">Hybrid Web Views</a></li><li><a href="https://github.com/awslabs/aws-device-farm-sample-app-for-android/blob/master/app/src/main/java/com/amazonaws/devicefarm/android/referenceapp/Fragments/WebViewFragment.java">Web View</a></li></ul><ul><li><a href ="https://github.com/awslabs/aws-device-farm-calabash-tests-for-sample-app/blob/master/features/step_definitions/steps/hybrid_web_view.rb">Hybrid Web Views</a></li><li><a href="https://github.com/awslabs/aws-device-farm-calabash-tests-for-sample-app/blob/master/features/step_definitions/steps/webview_page.rb">Web View</a></li></ul>
An Expected Crashsource codeNot implemented

Examples for Native Features

FeatureAndroid ImplementationTests
Camerasource codesource code
Image Collection Gridsource codesource code
Scroll Viewsource codesource code
Out of View Contentsource codesource code
Videosource codesource code

Examples for Inputs

ComponentAndroid ImplementationTests
Checkboxsource codesource code
DatePickersource codesource code
EditTextsource codesource code
Gestures Inputsource codesource code
Pull to Refreshsource codesource code
Radio Buttonssource codesource code
TimePickersource codesource code
Toggle Buttonsource codesource code
Spinner Inputsource codesource code
Buttonssource codesource code

Examples for Navigation

ComponentAndroid ImplementationTests
Navigation Drawersource codesource code
ViewPagersource codesource code