Jump to content

  • Log In with Google      Sign In   
  • Create Account

Android TDD


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 TechnoGoth   Crossbones+   -  Reputation: 2765

Like
0Likes
Like

Posted 21 June 2012 - 07:46 AM

I'm a big fan of tdd I've got a lot of good tests around my core framework and shared code base. But I'm really struggling to crack tdd within an android application. And I'm curious how have other people dealt with automated testing for android apps. Are there any useful tools that you've used?

I've given monkey runner a try and its useful for injecting random events into the application. And I believe it can be used to script up selenium style regression tests but I haven't tried that.

The android instrumentation classes seem like they offer a lot and and are powerful, but sadly like all aspects of android I've found the documentation lacking and missing crucial details. For instance it took a few minute to realize that test methods only got picked up if the method name starts with the word test.

I've been trying to build my unit tests using the android test cases pattern they show on dev site but I've been finding it very slow going. And I've spent a couple of hours struggling hopelessly to find out how to get any kind of activity state information which I need to build my behaviour tests. For instance I have one test that I want to check that pressing the save button has successfully persisted data to a db and finished the activity. And another that checks that a dialog window has opened and populated correctly when the user touches a certain text box. But there doesn't seem to be any obvious way of getting that information, calling an applications different lifecylce methods is easy but how you find out what state it currently is in or what the orientation currently is I have no idea.

What about other developers have you managed to crack building quality tests around your android apps?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS