Android testing framework for non-developers - android

My question is similar to this. I am looking for automated test frameworks for Android where test cases can be written by technical QA people.
All the frameworks ive seen so far require thorough knowledge of Java, JUnit, Eclipse, Adb, Activities, etc.

Check out TestDroid at http://bitbar.com/.
It has an eclipse plugin that lets you simply press record (like a macro) and it will generate the test code (using Robotium) for you.

Related

Present solutions for testing Android applications

I've just reviewed about 10 Android books, read a bunch of articles and found a couple of frameworks, but still I haven't found any comprehensive way of testing Android applications.
It's too bad that testing appears (if at all) only as a single and short chapter only in some books.
There are:
ActivityUnitTestCase and ActivityInstrumentationTestCase2
Robolectric
Robotium
But none of them has sufficient documentation, tutorials or example. I couldn't able to setup Robotium with Gradle as well to be run either from AS or even command line.
What is the most current way to test Android applications with Android Studio 1.0 and Gradle 1.0.0? What frameworks and tools do you use? Where do you learn testing recipes for Android?
The only thing I managed to setup is standard android ways for testing applications, however there are only few examples how to do that.
The problem is that, there is no single page, that covers all Android test frameworks. Anyway there are more of them than you listed above.
Espresso
UIAutomator and related page
Calabash gh project and official page
Appium gh project and official page
Telerik
I don't know much about integrating them with Android Studio as it still is in infancy, however it should be feasible.
Check out Blundell's blog for some good tutorials: here's the one for espresso. Be warned, while I could get Espresso and JUnit tests to work, I haven't managed to get Robolectric to work yet. If anyone has a way to get it to work for projects targetting API 21, I would be keen to know how.

Automation frameworks for mobile devices

I am trying to use automation frameworks similar to Selenium to test native apps (both android and IOS apps). Does anyone have a list of frameworks that is suitable for the tasks. Java based frameworks are preferred but others are welcome too. I want to go over the merits of each framework and make a final determination
There are lots of options to test mobile applications, not all are cross platform though. You say this is important to you so I would either say MonkeyTalk (http://www.gorillalogic.com/testing-tools/monkeytalk) calabash (http://blog.lesspainful.com/) or the new Calabash Driver projects (A form of calabash made to look and feel more like selenium from the ebay guys just recently announced) https://github.com/calabash-driver/calabash-driver and https://github.com/freynaud/ios-driver.
Appium is a Selenium-compatible mobile automation tool which lets you write tests in Java and other languages using the Selenium client libraries.
My team has been using Frank for the past 14 months and it's been working out really well for us. It describes itself as: "Selenium for native iOS apps". It's a fairly active project, and has a small community that's very helpful.
You can get started here: Testing With Frank
For iOS: Unlike the ruby based Frank, KIF is a 100% obj-c solution, which makes for easier integration with your iOS code.
Take a look here for an example of how I used KIF for my iOS project and the reason why I chose it over Frank.

Is developing an application for Android using Lua only possible?

So I read this article on Mobile Orchard and, as I'm planning on having my first steps in Android development, it got me thinking: is it possible to develop for Android in Lua only? I Googled the topic but found no definitive answer. I know Java is the "base style" for Android but for the coding newbie which I am (elementary Python, basic C++), Lua seems somehow clearer and more friendly. Then here goes my question: can one develop an Android app using Lua only? If so, could you please show me some directions to move from here?
I've been developing a mobile application in Lua to control robots remotely from iOS and Android phones. The app is in pure Lua and runs on top of Mosync platform using MobileLua. There is still some plumbing required, but it's not too complex.
I also have a debugger and a Lua IDE (ZeroBraneStudio) that support debugging of Lua scripts running remotely (including MobileLua scripts running on Android or iOS devices). I provide a demo app you can use as a client to run simple scripts and check remote debugging in action.
[Update] If you are interested in more game oriented options, there are several available: (1) already mentioned Corona SDK, (2) Moai, and (3) Gideros Mobile. There is also Marmalade Quick and Cocos2d-x Lua bindings (for example, quick-cocos2d-x). All these toolkits/frameworks allow to develop in Lua.
Here is a detailed comparison of Moai vs. Corona.
I know this is an older question, but just to correct some misinformation (in the comments) for people who come later, Corona SDK (as of spring 2013) has a Starter Edition which is free -- no splash screen or anything. The main difference between it and the "Pro" version is you can't do in-app purchases in the Starter Edition. But you can use it to create apps for sale, etc. No expiration date on it or anything.
And in answer to the original question, learning Java may allow you to write Android apps, but if you then also want to target iOS you don't have any great options. By choosing something that's cross-platform from the beginning you can target Android or iOS or both. Lua (in any of the flavors already mentioned) is a great base language to learn for mobile development.
The question is what kind of app do you want to build and what skills do you have. If you are already familiar with JavaScript there is Phonegap/Cordova. If you are building games there are a number of frameworks for 2D and 3D which use Lua. Some are free, others have licensing fees but are worth it if it provides a solution to your problem. All have pros and cons. For example I'm not sure if I would want to build an RSS reader in a game framework. Java is just another language, I would recommend just learning Java and the Android framework to start and knowing what is there before adding another application specific framework layer on top.
Corona SDK allows you to write iOS and Android apps in Lua. Its very easy to learn, but its not free.
Edit:
I saw you posted that you found Corona just after I sent my post...
You can try http://scormpool.com/luastudio
Develop and run code on your device including iOS, Android, Mac, Win.
Exporter can help you to make standalone app on listed above platforms.
This may not be useful to the OP, however for other people interested in using lua to write their apps, I'd share my thoughts. So to answer the question:
Yes, you can use only lua to write apps for android using LuaJava from the kepler project (though I don't believe its being maintained anymore). You can create and manipulate Java objects seemlessly, and interact with the Android APIs through lua. You can even create UI elements dynamically using just lua. However, a small amount of java bootstrap code is needed to start the lua VM from your app. The AndroLua project is a great place to start for Android. The creator has done a lot of work making lua work with Android and packaging it all into an app. From experience I can say it works great! However, I would in no way recommend this to a beginner, as it requires a lot of knowledge about java and lua to make things work, meaning more work not less.
For AndroLua, just clone the repo and use that as a base for your own app. Last time I used it, I just imported it into android-studio, and after fixing a few problems with my own setup, had it compiling and running on my device.
If only pure Lua then the answer is no.. unless you want to use a lot of libraries
If you want to make little Android app/games then use a game engine, learning is a step by step process, don't dive straight into the hard part.

iOS and Android development on Windows

I'm facing a dilemma: I have a solid ASP.NET development experience in C# and looking to start mobile development. I have done research and know that there are some hacks for getting a development environment for iOS on windows, and recently after Apple lifted ban on 3rd party dev apps, Adobe Flash CS5 can be used to package iOS apps. I do have some prior experience with Flash and AS2.
So my question is: should i use Flash CS5 for iOS and MonoDroid for Android or should i just get Mac and learn Objective C for iOS and learn Java for Android? What would be the most practical solution?
Thank you in advance
EDIT: In the end, after trying out both Java Development in Eclipse against Android SDK and Mono for Android, I decided it's best to write Android apps in native environment. Eclipse FTW! As for iOS, I think it will also be best to use native Mac tools and Objective C.
While there are ways to get around using Objective-C for iOS development, I'm going to recommend that you learn it anyway. You need a Mac to deploy anyway, you might as well use it to develop as well.
Objective-C is bloody bizarre when you first start using it, with its strange square brackets and odd ways of doing things. However, once you've spent some time writing code in it, a change happens in your brainmeats and you suddenly realize that this is really an elegant way to work. Xcode is also quite an excellent IDE.
You can start with the iPhone Applications Programming lessons on iTunesU from Stanford. It's free, and covers what you'll need to know pretty throughly.
Worst case, you've learned a new language, and how Apple thinks iPhone apps should be developed. Even if you ultimately use something else, that understanding will help you out long term.
Take a look at monotouch & MonoDroid (Coming Soon), it still requires a mac. But you can open your solutions in VS2010 and use resharper, and just use the Mac for deploying and building. Take a look at this Here to open monodevelop solutions in Visual Studio.
http://monotouch.net
For Android, I would recommend learning Java. I just started working with Android in Java on my Windows machine after developing some ASP.NET sites. I'm familiar with Java, but the syntax is so similar to C# that it's very easy to understand and pick up. So far it is more difficult figuring out and remembering the details of the architecture of mobile applications as opposed to the language. It also helps that there are a number of good books and online resources for converting from C# to Java and vice versa.
Update: I found a good post over on programmers.stackexchange.com that talks about C# vs. Java for Android development with good discussion on the pros and cons of switching: https://softwareengineering.stackexchange.com/questions/33076/as-a-c-developer-would-you-learn-java-to-develop-for-android-or-use-monodroid-i
#Dimitri I was almost your identical skill set when iOS 2.0 was released. I decided to try and learn Objective-C and now its my language of choice. Its a bit different to start with but most of the changes are simple to learn. Whether you are programming for iOS using Objective-C or something like Monotouch either way you have to learn the frameworks. If you use Monotouch you will never be able to be on the bleeding edge of the iOS enhancements. Using Objective-C you will be able to use the latest beta APIs and ensure your apps work right. You will need a Mac to deploy to the App store so just bite the bullet and get a Mac. Get a MacBook Air 13"
I went the route of Monotouch for iOS and Java for the Android. Unfortunately, Monotouch still requires a Mac. I am currently participating in the MonoDroid beta, which looks pretty promising too. It's all a matter of taste. I should also note that, for the most part, HTML/Javascript is a nice way to get portable apps in some circumstances. I would expect HTML5 apps to become even more viable as tooling improves.
I choose to use the Mono, MonoTouch and Mono for Android technology stack from Novell. When coupled with a micro framework like MonoCross (open source in Google code) it helps me write applications for both iPhone and Android devices while leveraging a shared code base for much of it. I would highly suggest the same route, it has allowed me to implement numerous solutions for small businesses and enterprise customers alike.
I didn't have the ASP .NET experience like you, but I was a Pocket PC/Windows CE developer so C# and the .NET Framework were also my strongest tools when I started on journey towards Mono many moons ago.
You can do iOS,Android and Windows using Xamarin.
Android and Windows can be done easily but doing iOS on Windows was tough so far like networked mac is required for debug and development but things have changed now.
Microsoft has introduced Xamarin Live Player using which you can debug,develop and deploy the app completely in windows without the help of any Apple system but to sign and release the app to appstore you will need Apple System though

Android Test Automation

How can i automate Android Apis for better quality ? How can i test the android applications to get a better quality of this software..?
I would recommend you checkout Robolectric for testing Android apps.
Use Robotium, its a good tool to use for Android Automation
http://www.robotium.org/
Try robotium, i am using it, Its very easy for writing your Functional Test Cases and can be tested in all android Devices.
Espresso is the best option coming forward to automate the android API's. Google has developed this testing kit for developers to write the unit test cases. Here's the Google's home page for espresso
https://code.google.com/p/android-test-kit/wiki/EspressoStartGuide
Google has also implemented the sample test cases which help to learn espresso faster. Main advantage of espresso is its speed of execution and its work asynchronously meaning we are not explicitly required to write wait for actions in espresso. Developer should only perform action, waiting time taken care by espresso.
Here's link which gives start to espresso in easy to understand way:
http://www.stevenmarkford.com/android-ui-testing-with-espresso-basics-tutorial/
I would suggest you to use Seetest.
This is also an automation tool independent of any platform. You can run the same test script across all the platforms like Android, IPhone, Windows Phone using this tool. Moreover it has a plugin for existing test frameworks like QTP, Testcomplete etc. Here is the link to download the trial version of the same.
http://experitest.com/support/download-2/
I would suggest Webdriver/ selenium 2.0 android driver if you are looking for open source. its good and robust as well
Try bot-bot. Its a functional automation tool built over Robotium/Nativedriver. It have recording feature which helps in easy element identification and writing test-cases.
It uses "Ant" for build and running the tests. This helps in integration with continuous integration tools.
At the end of your test execution it generates emailable html reports with pass-fail status.
If you have a spare Raspberry-Pi, you can also use that to speedup your test :) , much better than running on Emulator:
Raspberry-PI for Android Test Automation

Categories

Resources