I was asked to test some Android apps, but I do not have any andoid device currently. There are a loads of different Android emulators and/or dev frameworks, so I was wondering if tests performed on such virtual system is reliable in terms of later work on actual devices?
Can I use these emulators for test purposes without testing on any actual device? What are strategies for such tests?
Yes, you can use emulators.
Of course, Eclipse and Android Studio has there own, but I would recommend you Genymotion as faster one.
Related
I created a back office corporate tablet android app. Now the client wants the same app in a browser so users on a desktop can have the same functionality.
Can I just use an emulator for this? I.e. setup an android emulator on the users' laptops? Or are emulators not for production use but rather just for testing?
So can I use an emulator or do I need to develop a Web app?
Can I just use an emulator for this?
NO
Or are emulators not for production use but rather just for testing?
YES
1 Can I just use an emulator for this?
Yes! But hardware needs to be pretty beefy you have to test it. And don't use standard Android emulator use genymotion instead it's fast, very fast.
2 Or are emulators not for production use but rather just for testing?
No! There is a lot of such use. Look at genymotion or bluestack.
*note genymotion runs on virtualbox.
You cannot use emulator for this. Also emulators are mainly just for testing. Many features do not work on emulators.
You will have to build a similar app to work on desktops :)
I want to get into developing apps for Android because of its large userbase. However, at the moment I do not have a smartphone. I'm also not too keen on getting an Android phone in the future.
What problems could I encounter when developing apps for Android solely using an emulator? I could use my parents' Android phones for the occasional testing, but will an emulator prove sufficient otherwise? Furthermore, is it possible to set up an Android Virtual Device with low-end hardware on my computer to test out apps with low-end phones?
note0: I do not plan on developing apps which require use of the phone's sensors (such as gyros, GPS, etc.) I only plan on developing apps which require internet access for API calls and perhaps microphone usage (I can't give away too many details right now ;) )
note1: I know this question has been asked before on stackoverflow (albeit 4 years ago). However, I feel it is important to revisit the question because emulators, hardware, and Android itself have changed enormously in the last few years.
edit: My main issues are problems like the app looking weird on the phone despite it looking fine on the emulator or working slowly on the phone but working fine on the emulator. Will every app which works fine on the emulator work fine on the phone as well with a similar hardware configuration as the emulator? I'm in particular targetting devices with Android 4.x/5.x.
Without a doubt, the biggest problem is that many functions like push
notifications, maps, geo-location, in-app vending etc. cannot be
tested with an emulator. The reason is that all these functions are
present in the Google Play Services library which is not present on
emulators.
Another important reason for testing on hardware devices is that the
OS implementation is changed by manufacturers like Samsung, HTC and
others, and therefore, certain problems & exceptions are not observed
till a real device is used.
But the most important reason has to be that running apps on an
actual phone is a hell of a lot more fun that it is with the painfully
slow and retarded emulators! One of the most important things about
Android is that anybody with an Android phone can easily explore
computer science concepts by running simple programs on their phone.
It is incredibly easy, even for a novice, to just fire up their
Android device and start exploring the world of programming! Till just a few years back, it was incredibly difficult to debug an app on a Symbian or Palm or WinCE device. iOS is still as retarded when it comes to running the simplest apps, you have to create a provisioning profile to run a Hello World app on an iPhone!
EDIT:
If your processor supports Intel virtualization, then the emulator can be made to run as fast as a real device. You need to check that out. If your PC is low-end in the sense that it does not support such virtualization, then running and testing Android apps will be a painful, tedious experience that will suck all the fun out of the development process.
Emulators do have one significant advantage over real devices - an emulator is able to access web services on a localhost. If you are still in development phase on your local server and have not yet shifted to a publicly hosted environment, the emulator can easily access web services on a local server. All you have to do is put your computer on the same network as the local server and you're good to go. A real device cannot access a localhost; its impossible, as far as I know.
The Android emulator is a true emulator - it emulates sensors as well, so in fact you can test sensor programming (with some limitations) on an emulator. It cannot do things like GPS, maps etc. because those features have been migrated to the Google Play Services library, and they require a valid Google account to be used, which is why that library is not present on an emulator. If you only plan to work with web services, APIs', GUIs' then I suppose an emulator is more than sufficient. Unlike the iOS simulator, an Android emulator generally exhibits the WYSIWYG behavior, so your GUI will not differ on actual devices, although you do need to test your GUI on multiple AVDs' with different screen form factors.
Is it possible to automatically test Android apps on different vendor Android versions?
I'd like to set up unit tests in Jenkins which run on different vendor ROMs, above all on Samsung. Is there a way to download those versions?
I found some sites to add to user defined sites, e.g:
http://developer.lgmobile.com/sdk/android/repository.xml
http://developer.samsung.com/sdk-manager/repository/Samsung-SDK.xml
http://developer.sonymobile.com/edk/android/repository.xml
http://dl.htcdev.com/sdk/addon.xml
I also could download stuff from there:
But how do I use those things for testing?
I am not a fan of long answers, but I failed keeping it short.
TL:DR:
Prefer functional testing over unit testing when testing compatibility with devices.
Testing on emulators does not provide you the same level of confidence than testing on real devices.
Probably the best option would be testing on a small set of virtual devices and then running the same tests on the real reference devices.
Long answer:
First of all, are you already using a solution to automate functional testing? Robotium is a great option for that and there are plenty of tutorials online. I cannot see the point on unit testing (instead of functional testing) on different devices, except for testing compatibility with different android api versions.
Secondly, testing on emulators does not provide you the same level of confidence than testing on real devices. Some things are not the same, for example there is no wifi manager on simulators. Given that, even if you create a virtual device with a custom vendor ROM for each device you are supporting, it does not substitute testing on the real devices.
Finally, in my opinion considering my lack of knowledge in your specific project, probably the best option would be testing on a small set of virtual devices that simulates the higher, medium and lower devices you are supporting as a first pass, and then running the same tests on real reference devices connected to your testing server as a definitive test.
And yes, I know not everyone are willing to buy a bunch of devices for testing purpose, but this is a trade of as you can only guarantee it really works as expected in a specific device when running on that device.
Hope it helps you. :)
Try with Xamarin TestCloud testing using real devices with 788 android devices and 21 OS versions at this moment.
So, you can use too Genymotion, a faster Android emulator, with a lot of devices, very useful Java API. The following articles explains what you need:
Use Genymotion with Jenkins for Android testing
Calabash, Genymotion and Jenkins
Check testdroid cloud.
From wikipedia:
Testdroid Cloud contains real Android and iOS powered devices, some of
which are available for users.Testdroid Cloud lets users run tests
simultaneously on cloud-based service
Is there a way to develop android applications on the devices themselves? If I want to write some code for a linux machine I usually do that on a linux machine. It would be nice to develop android applications on the device (say a Nexus S) (type the code) and then build, compile and test them on the device themselves. Can this be done?
You mention testing 'on the device themselves'. Practically speaking, the emulators supplied with the SDK function in exactly the same way as the physical devices. It also means that you essentially have access to all of the devices the emulator supports, not just the phone/tablet you own or have access to.
As for a device-based IDE (if that is what you're after), I haven't seen anything beyond a couple of WP7 proof-of-concepts.
There is an IDE to develop Android apps in Android devices recently launched: AIDE - Android IDE - Java, C++
I really want to get into Android programming but I only have access to company resources right now. I have the money right now to purchase a XOOM or a development laptop. Is it possible to compile Android apps using the command line on the Xoom while using other apps to write the program files.
What would seem like a dream environment would be if I purchased a XOOM and a BlueTooth Keyboard. Am I dreaming? Developing using older Android devices was naturally limited by the screen space of the device and the underlying hardware also.
No, as far as I know, you cannot develop Android applications from within Android. You will need a Windows, Mac, or Linux desktop environment to develop Android applications. Visit the Android Developer site for additional info on the SDK.
Go for the development laptop, and test your applications on the emulator. Initially you can get friends to test them out on their android for you, and hopefully by the time you make something important enough you will be able to afford your own android.
Check out AIDE. It can build and deploy apps natively on Android.
Google doesn't have a version of the SDK that runs on an android device, although as devices become more powerful this would be a pretty awesome thing to have.
You'll want the laptop, since it can emulate different android devices.
Buy the laptop and get a cheap phone on craigslists.
Although, the XOOM emulator doesn't work at all, so if you want to develop specifically for that tablet it's a good idea to buy it. It's impossible to emulate android 3.0 on any computer on earth :)