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.
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.
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
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.,
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.
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
Related
I have an iPhone application (with an android counterpart), developed in Xcode and written in Objective-C. It is a classical native iOS app, already working and uploaded in the App Store. Similarly, the android version is built with Java and linked with the android SDKs. It's uploaded to the market place.
I was asked to port the app to Windows Phone. Is this possible without modifying the code?
I am not familiar with Windows Phone dev, however it looks like that is a completely
separate ecosystem for developing apps (different programming language, different IDE, different app store etc).
Can I go from Android to Windows Phone or from iOS to Windows Phone?
PhoneGap - or similar platforms - are not options since the code is already written in Objective-C and Java.
Like iOS and Android, Windows Phone is a completely different operating system and currently requires a completely different development platform.
It is not possible to take the existing code and make it function on a Windows Phone.
iOS commonly uses Objective-C for application development . Even if there was a way to compile Objective-C onto a Windows Phone, it would be inherently tied to platform features, and UI controls. While you could write some code in C++ and share it, with an iOS application, you'll still need some in Objective-C.
Android applications use Java normally. Java is not available for the Windows Phone platform. So, the language is out. Further, like iOS, the platform features are not necessarily shared and the UI control and behaviors are different. Android applications can use C++ (if you happened to code using it), but it has limitations, and by using it, again, you'd be tying the code to the Android platform potentially. Some code may be portable.
Windows Phone applications are usually written in C#/C++ and XAML or DirectX. While there is some similarity in languages (Java and C#), you'll encounter far more platform differences that could need significant effort to convert. From the way network requests are made to handling threads will be different (and many many more). Objective-C is also very different from C++.
Unless you had used something like Xamarin and written the underlying business logic using a common platform (C#/.NET), you'll need to consider a port to Windows Phone a fresh start.
It's not possible to just reuse all of the code that's been written. With a careful effort, you could share some common code (if it were written in C++), but as the shared code will not directly work with UI (and other platform features), you'd still need to do the UI on each platform, work around limitations, and potentially customize the user experience for each platform.
Microsoft has provided some guidance on porting, and provided some links with an API equivalency table here.
Yes, you can use Microsoft's Windows bridge for iOS to convert your iOS application code to Windows mobile platform code.
You need to use WinObjC SDK provided by Microsoft for this purpose.
Follow this link for more details.
No, you can't, WP apps are build with c# or .net and in visual studio IDE. There is no automated way to port a previously coded ios or android native app built with objetive-c or java to WP.
In my opinion there is no way to directly port a iphone app to windows phone app. You need to develop windows phone app with its needed environment like Visual Studio , windows phone sdk and with windows os.
You can also use cross platform like phonegap if it may fit to your requirement.
It looks like you have an existing Obj-C codebase for iOS, and a Java codebase for Android. No matter how you cut it, you're looking at [re]writing code to get something on WP8.
I don't know how "UI heavy" your app is; in general the UI code is the most platform specific (unless you're willing to put up with "cross platform" stuff that might not have good UX).
You might consider keeping the non-UI code mostly plain C++ and using Obj-C, etc. only for the parts where you have to talk to the framework. It will be easier to support multiple platforms with C++.
I took this approach with an app I'm working on; it's targeted for iOS but it's about 80% C++ (including Open GL). If I decide to port to Android I just need to deal with the 20%, mostly UI-ish code.
I'm trying to find an automation framework for iOS and/or Android that allows me to automate actions on a real device using 3rd party/built-in apps. For example, I want to be able to automate: Browse these websites with Safari, watch these videos with the Youtube app, et al.
The automation frameworks I've encountered in my search seem to be focused on testing out your own app, in which you provide hooks in your own code to the framework in question.
I won't be testing out my own app (I'm testing out a proxy that the devices send traffic through), and thus won't have access to the source code to the apps on the device. I'm new to this, apologies in advance if there's a way obvious answer right under my nose.
For android automation you can use UIAutomator. It doesn't require source code. It uses in built uiautomator jar file which is present in android SDK. For more information you can refer http://developer.android.com/tools/testing-support-library/index.html
I'm currently looking for a solution to test Android Apps automatically, native Android apps as well as hybrid Cordova/Phonegap apps.
The UI Automator from Google looks pretty fine, but can not deal with WebViews, which makes it unusable for me.
Then I found the promising automation framework Appium based on Selenium, which should also be able to deal with hybrid apps, but I couldn't get it to work with WebViews, it seems to not be implemented fully yet, as also several posts prove.
After trying Appium I found a hint for Selendroid, that also should work for hybrid apps, but it seems pretty much buggy and keeps crashing my whole computer all the time.
So, does anyone here know a working solution for testing Android Apps with WebViews? I'm working on Windows 7. Thanks a lot in advance for any help.
In first case we need to know what kind of tests you like to drive. I think you like to run functional tests on the UI? Thats what i can think about after reading your question.
So lets split this by the given environment:
native iOS
unit tests -> do it in xCode. http://www.apple.com
functionality tests -> http://appium.io/
native Android
unit tests -> JUnit, http://developer.android.com/tools/testing/testing_android.html
functionality tests -> http://selendroid.io/
native Web like phonegap/cordova Apps
unit tests -> jsUnit, http://jsunit.berlios.de/
QA Testing and Checkstyle -> jsHint/jsLint, http://www.jshint.com/ & http://www.jslint.com/
functionality tests -> http://docs.seleniumhq.org/ & https://npmjs.org/package/ripple-
functionality tests (E2E) -> https://angular.github.io/protractor/#/ or https://github.com/jasmine/jasmine
Here is a article about JavaScript QA / QS
native X - The out of the Box solution for all Platforms
Here we are. There is none atm. But .. footage is that one here:
Gappium based on appium uses json for writing your tests. As i get the thread right, it was testet with Web/iOS for this moment. Android/Win seems not be integrated for this moment:
https://github.com/appium/io.appium.gappium.sampleapp
Note for phonegap & apache cordova functional tests:
Its possible to use ripple and selenium for testing hybrid apps. Keep in mind that some native function/plugins (hehe native functions on hybrid apps ... =) cant be tested or need to be mocked on a unknown way. Thats the footage for this moment.
Maybe usefull for you Continous Integration Server:
https://github.com/linslin/PHPUnit-selenium-HTMLGallery
Generally, testing hybrid apps is quite a challenge with API-based approaches. It can be done, but typically you need to integrate the UI technologies (e.g. WebView, Native, OpenGL, ...) with several APIs or some kind of wrapper (like Selendroid).
Here at TestObject (I'm one of the co-founders) we've created an Image-based UI testing approach specifically for cases like hybrid apps, interaction between apps, and so forth. This black-box approach is solely based on capturing the screen - we don't care what happens underneath.
Feel free to give it a try (http://testobject.com/) with your hybrid Cordova/Phonegap app and let me know how it worked out in comparison to UI Automator, Selendroid, Appium. Let us know if you stumble over any issues.
I faced this challenge with our own Cordova app ( sourceforge.net/p/ustadmobil/codehtml5cordova/ci/master/tree/ ) ; and I needed a way to integrate this with Jenkins CI. We have Cordova specific code (e.g. filesystem access) so just using PhantomJS and Grunt is not an option.
Essentially what I did was to launch the app with the test page as index.html in the emulator, run an http server, and then have the test page pass the results back using AJAX.
Script launches an emulator with the package
$ /opt/adt/sdk/tools/emulator-x86 -avd $AVDNAME -qemu -m 2047 &
$ EMULATEPID=$!
$ adb wait-for-device #wait for device to start
$ adb shell input keyevent 82 #unlock screen
Make a test page using qunit, which when finished will communicate the test results with an AJAX call.
Make a basic nodejs server script that will listen for that ajax call and save the results to a file. A bash script can then read that file and determine if the tests passed or failed : see http://sourceforge.net/p/ustadmobil/codehtml5cordova/ci/master/tree/setup/node-qunit-server/node-qunit-server.js
In the build script wait for the result file to come, then kill the emulator and the NodeJS server - see http://sourceforge.net/p/ustadmobil/codehtml5cordova/ci/master/tree/setup/android/unit-test-setup-android.sh
Also worth noting: this approach works for the cross platform nature of Cordova: it should be possible to take the same approach running iOS, Windows Phone emulators etc (I also use this test method against our NodeWebKit desktop version which shares most of the code).
Hope this helps,
-Mike
I have to develop an app for the Ipad. It has to be non-browser based. That's a requirement and I can't change it.
I think it likely that the app would be useful on other tablet PC types and have a good chance of a second app which requires IPad and Android at a minimum; Windows and Linux would also be useful.
If it makes any differences these are "desktop" apps for tablet PCs and it is not envisaged that there will be any handphone development.
Is there a “Grand Unifying Theory” of cross-platform desktop app development? Is there a good IDE, preferably FOSS? I'd rather code C++ or Java and am less keen on Ruby or Python (through lack of experience) but would accept if there is no alternative.
I need a GUI builder, something like Borland Delphi or MSVC or the Eclipse Android plugin and I need a way of executing different code on different platforms (#ifdef Android … etc)
Any ideas, or should I just go ahead and code the current project for Ipad only and stick to browser based HTML5 + CSS3 with Jquery/Ajax for cross platform apps (the problem being that some will need to execute native system calls, like en/de-crypting a file and at least one app has to work in “local mode” if there is so internet access, so I guess I would have to bundle a web server (Apache) if I go browser based (in order to serve the web pages), which would not be necessary with a “desktop app”.
Any recommended IDEs, Web sites? Books? Thanks
The "grand unifying theory" is that core business logic should reside in the cloud; that allows your iOS and Android implementations to be just a thin GUI on top of this shared logic. Unfortunately, there isn't really a way to reuse the GUI, and even if you did, it would go against the intuition of users on one or both platforms, since you wouldn't be using the paradigms of those specific platforms.
Google App Engine provides a way for implementing your core business logic in Java on top of Google's cloud computing infrastructure at reasonable costs (development is free, cost is proportionate to usage, and one can put caps on how much one is willing to pay). There is an Eclipse plugin for developing App Engine applications. When developing for Android, you will similarly want to use Eclipse (there is a plugin specifically for Android development), although the Android SDK can be used just from the commandline (which is good for setting up a continuous build and test system).
For iOS, you will want to use the standard Xcode and the iOS SDK. Xcode is an IDE, but it is possible to build Xcode projects directly from the commandline using the xcodebuild command (also good for continuous building). The standard language for iOS applications is Objective-C.
You should take a look at jQuery Mobile. I used it to cross develop between Android and Playbook. I know that it also does iOS.
Maybe for you the downside is that you have to program in JavaScript.
would like to build an app that can run on any of the new PAD's hitting market.
I don't want to limit our users to a specific OS.
What is the best solution to allow all these pads to use our app.
The app needs to be able to run offline.
Thanks!
You could write a web application and use HTML5 for off-line caching.
http://diveintohtml5.ep.io/offline.html
Alternatively, you could try and use Titanium Mobile.
http://www.appcelerator.com/products/titanium-mobile-application-development/
You should also spend some time reading this discussions:
is-there-a-multiplatform-framework-for-developing-iphone-android-applications
technology-to-write-iphone-blackberry-and-android-phone-at-the-same-time
Have a look a MonoTouch, it will let you write all your logic in C# over all the main mobile platforms. However you still need custom UI code for each platform, but as least it will all be in C#.
(Better then having to use C#, Java and Objective C)
You could use Adobe Air that could works in most of Mobile/Tablet operating system Iphone,Android and Windows 7. but im not sure if Apple will approve your App if you plan to released to the App market.
Another way to think about it is to create an HTML resources and then integrated in away seems native to the system its more work but you will have a higher chance to get approved from apple and the app look more integrated with the OS .
The obvious -- and currently free -- answer is to use Adobe FlashBuilder to develop iOS apps. There is an iPhone and iPad emulator included. This does not use xcode, but you get most of the features to work with, and you can also develop Android apps from the same set of code. Further, with minor modifications for mouse usage, you can also have the apps run on any desktop as an Air app.
Adobe's website has detailed directions for how to create iOS apps on Windows with Adobe Air, though the most useful instructions for Air are from untoldentertainment.com.