kol
kol

Reputation: 28708

How can I automatically test the functionality of iOS and Android applications?

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.

Upvotes: 14

Views: 5527

Answers (5)

vishal
vishal

Reputation: 640

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

Upvotes: -1

Sinthia V
Sinthia V

Reputation: 2093

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.,

Upvotes: 4

KDEx
KDEx

Reputation: 3657

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.

Upvotes: 3

Yuji Kaneko
Yuji Kaneko

Reputation: 421

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.

Upvotes: 12

kol
kol

Reputation: 28708

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

Upvotes: 4

Related Questions