Chuan Chuan Law

DevOps | Software Automation | Continuous Integration

Tag: Mobile

Mobile Automation For Android

If you have a native Android application, I would recommend you to use Robotium. Due to the fact that the project that I am working on is not, I have chosen Selenium.

Below are the details about the framework that I am using:

  • Follow the instructions as mentioned in http://code.google.com/p/selenium/wiki/AndroidDriver
  • The method that I chose is Android WebDriver using Android Test Framework
  • Therefore, the main thing you need is Android SDK, Eclipse, Android phone, and a USB cable
Below are the stuff that I have learnt in the process of setting up this framework:
  • Would be best to test on actual device instead of emulator because Android emulator is too slow and consumes a lot of computer resources
  • The test only works for Android version 4.0 or above

Mobile Automation For iPhone & iPad Using Selenium WebDriver

If your mobile application is not a native mobile application, you might need to use some language independent testing framework such as Selenium.

Below shows how to set up this framework:

          – Right click on the test folder you created
          – Go to Build Path -> Configure Build Path
          – Click on the Libraries tab and click on Add External JARs
          – Select the selenium-server-standalone.jar file
  • The code for my project can be found in https://github.com/ChuanChuanLaw
  • Run the iPhone web driver and run the test via clicking on the Run button in Eclipse
  • Select iPad emulator if you want to run tests in iPad

Open Source Mobile Test Automation Framework

The popular ones in the market are as below:

Frank

  • Developed by Thoughtworks
  • Can only be used on iOS applications
Robotium

 

  • Can only be used by Android applications
Sikuli
  • Easiest to use among all because no scripting is needed
  • It works based on screen capture
  • Need to have separate tests for iOS and Android applications because of the different UI
Selenium
  • Most flexible. Can be used on both iOS and Android applications
  • Hardest to set up among all

Frank – Mobile Automation Testing Framework

Frank is an open source mobile automated acceptance testing framework developed by ThoughtWorks. It uses Cucumber. Instead of driving browser, it drives iPhone or IPad simulators.


It can be downloaded via http://github.com/moredip/Frank. The official website for Frank is http://www.testingwithfrank.com/index.html.


The installation guide is comprehensive, apart from the following steps which need to taken care of:

  • Remember to do a gem update to enable everything to work properly. Otherwise  http://localhost:37265 will not be responding.
  • Set in the command line export e.g.: export APP_BUNDLE_PATH=/Users/chuan/Library/Developer/Xcode/DerivedData/TopSongs-firzpluxqrfpthdcoezcyirxkdgr/Build/Products/Debug-iphonesimulator/TopSongs copy.app

© 2019 Chuan Chuan Law

Theme by Anders NorenUp ↑