Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing Android applications

 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

Can anyone tell me what is the best way to test the android application on multiple devices? Especially with various screen resolutions how should one test the app on different devices, and under different OS versions?

Has anyone tested the application in tablet? What sort of modification needs to be done to run the same app in the tablet?
If there is any tutorial or any sort of link please share.

Thanks
 
James Elsey
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what sort of testing do you want to do? UI testing or business logic testing?

I believe you could use the instrumentation toolkit to test the UI, then just use jUnit to test your regular logic. If you try and keep your business logic outside your android classes (ie activities) then it may prove easier to test as you wnt have to worry about mocking android classes.
 
Perry Hoekstra
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would second what James said:

-> First make sure your classes have a distinct separation between those that drive the UI and those that are business logic classes.
-> I don't know how it is with the other platforms but there is a wealth of information on how to do unit testing on Android. One example is: https://sites.google.com/site/androiddevtesting and another is: http://pivotal.github.com/robolectric In addition, the Android Development website has beefed up their documentation on testing recently. One example is: http://developer.android.com/resources/tutorials/testing/activity_test.html
-> In terms of mocking, I know that developers have had some issues with EasyMock and Mockito. PowerMock (http://code.google.com/p/powermock) claims to have solved those issues, I have not had an opportunity to try it out.
-> There is the Android Instrumentation framework

Right now, I am not aware of any software that drives the UI that is repeatable and scriptable in order to test the application in various screen resolutions. There are claims that Robotium (http://code.google.com/p/robotium) is Selenium-like but again, it is on my ToDo list to try out and I have not gotten to it yet.

Perry Hoekstra
 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Elsey wrote:what sort of testing do you want to do? UI testing or business logic testing?

I believe you could use the instrumentation toolkit to test the UI, then just use jUnit to test your regular logic. If you try and keep your business logic outside your android classes (ie activities) then it may prove easier to test as you wnt have to worry about mocking android classes.


Hello James,

Thank you for the response. I am already using the instrumentation toolkit and created test cases using JUnit. I was asking what sort of hardware do I need to consider for testing? There are several phones available in the market and with different display screen sizes.

I came across this online while looking for testing

http://www.perfectomobile.com/portal/cms/android.html

Has anyone tried testing the android applications in these cloud service platform?
Before I publish the app in the market, would like to check how the UI icons are positioned in the screen?

Thanks
 
Perry Hoekstra
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best approach may be to use one released by Google: http://android-developers.blogspot.com/2010/08/nexus-one-developer-phone.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic