14

I have to regularly test the availability and functioning of a movie rental website. I wrote a Windows program which is able to automate a web browser according to a script, so this task is basically solved. Now I have to automate the mobile version of this web application: a native iOS app and a native Android app.

These apps are closed source, so cannot be modified in any way. I think the test app should be deployed on the test devices (iPhone, iPad, Galaxy Tab, Galaxy S II), but I must be able to remote control it. I mean, I would like create a connection between the test devices and a PC, upload test scripts from the PC to the devices, run them, and download the test results to the PC. The test script should start the app to be tested, manipulate its GUI (fill editboxes, push buttons etc.), and follow its response somehow, for example by analyzing the GUI (the existence of some GUI elements, their caption, etc.), analyzing screenshots, and/or inspecting IP packets.

I wrote lots of similar test programs for Windows: I used ShellExecute, PostMessage, FindWindow, the WinPcap library etc., so I know how such a program should work. But since I never wrote applications for mobile OS's, I don't even know whether there are similar APIs and libraries for iOS and Android.

I would like to know where to start, I mean, which SDKs and developer tools could be used to write such an application. I'm also interested in commercial solutions. I would really appreciate any help.

kol
  • 27,881
  • 12
  • 83
  • 120
  • 1
    "The test script should start the app to be tested, manipulate its GUI (fill editboxes, push buttons etc.)" not possible for iOS (may be possible with jailbreak), not sure about Android – msk Aug 30 '12 at 17:29
  • @MSK Thanks. This is bad news :( Is it possible to run an iOS app on Mac OS X, from an emulator, and automate it like it were a desktop app? – kol Aug 30 '12 at 17:31
  • 1
    If you use a mouse/keyboard macro i don't see why not, for android you can check out monkeyrunner http://developer.android.com/tools/help/monkeyrunner_concepts.html – Mario Aug 30 '12 at 18:17

5 Answers5

12

I like "Calabash-iOS/Calabash-Android" by LessPainful. That is the best for me.

  • free
  • available on iPhone and Android
  • record and playback
  • test on native and simulator

They doesn't have a GUI IDE. They are Ruby-based solutions and it is very easy to write test case script, like this:

Then I swipe left
And I wait until I don't see "Please swipe left"
And take picture

Also it can be

Then I touch the "login" button

to tap a button, or

Then I fill in "placeholder" with "text to write"

to write something to a textbox.

And the script can be shared by Calabash-iOS and Calabash-Android. That feature is convenient for developers who make both iPhoneApp and Android App.

I thought MonkeyTalk was nice but actually unstable, at least in my environment.
Sometimes MonkeyIDE crashed, so we have to do debug of MonkeyTalk...

I hope this helps you.

Yuji Kaneko
  • 421
  • 2
  • 7
4

MonkeyTalk looks promising. Features from the Gorilla Logic website:

  • Free & Open Source
  • Automated testing of iOS, Android, HTML5 and Adobe Flex applications
  • Cross-platform recording and playback
  • Test native, web, or hybrid apps, on iOS simulators, Android emulators or real devices (no jailbreaking required)
  • Everything from simple "smoke tests" to sophisticated data-driven test suites

Packet tracing: iOS, Android, Android

Community
  • 1
  • 1
kol
  • 27,881
  • 12
  • 83
  • 120
4

Selenium offers drivers for mobile devices and emulators. It is a Google project. They have good documentation. It has an IDE for rapid prototyping of testing suites and support for many languages like ruby, PHP, c#, etc.,

Sinthia V
  • 2,103
  • 2
  • 18
  • 36
3

If scripting is your preffered solution on android you can easily import and run scripts after you install the Scripting Layer for Android. Just download the latest apk file, import the script and run it. This isn't available on iOS but half of your problem may be solved with this.

KDEx
  • 3,505
  • 4
  • 31
  • 39
-1

I know this is an old post but any one reading in 2016 first choice for automation should be Appium ( works on both IOS /Android). All the tools mentioned above have to be built with the App. Appium does require any build up with App code. Its hugely popular with variety of programming language support ( PHP/JAVA/RUBY/PYTHON). [Link]: appium.io and [Link]: https://github.com/appium/appium

vishal
  • 640
  • 1
  • 5
  • 21