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:
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
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
The popular ones in the market are as below:
- Developed by Thoughtworks
- Can only be used on iOS applications
- Can only be used by Android applications
- 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
- Most flexible. Can be used on both iOS and Android applications
- Hardest to set up among all
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