Issue
What are good ways to learn Android testing? I'm interested in learning Android testing, I don't actually do TDD but write the tests and code together.
I read all the information at http://developer.android.com/tools/testing/index.html and the 'Android Application Testing Guide' book and understand the basic concepts but there is almost no information or examples out there that I can find.
the book and examples are very basic and showing how to test a pretty simple activity with 2 EditText boxes,
I need to test more complicated stuff such as IntentService, AsyncTask, ResultReceiver, etc.. I'm interested in building my apps in a TDD or almost TDD way.
is there any way I can learn those things (books, blogs, examples, ...) or Android testing is something very uncommon ?
Solution
Question is a bit old and quite few things changed from the time it was asked.
Forget old Robotium, RoboElectric etc..Those were all just temporal and workaround solutions. Android Studio comes now with 1st party testing solution. JUnit Tests doesn't need to run anymore on device but on development host (aka your Mac/Pc machine) JVM. So read a lot, whatever you find (newer books, blog posts, google announcements) and experiment.
Use JUnit with Mockito, Espresso and UiAutomator. There will be more and more explanations on Android Developers pages about those tools. Happy testing ;)
Answered By - Ewoks
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.