Old habits die hard
Wednesday, July 08, 2009
by Stephen Ng and Noel Yap
Old habits die hard. Particularly when it comes to testing--once you get used to working in a project blanketed with lots of fast-running unit tests, it's hard to go back.
So when some of us at Google learned that we weren't able to use our favorite mocking libraries when writing for our favorite mobile platform (Android, naturally), we decided to do something about it.
So when some of us at Google learned that we weren't able to use our favorite mocking libraries when writing for our favorite mobile platform (Android, naturally), we decided to do something about it.
With a bit of setup, this can be done in Android, too. We've put together a tutorial describing our approach. It's the first installment in what we hope will be a series of articles on android app development and testing, from the perspective of Googlers who are not actually on the Android team. We'd love to hear whether you find it useful.
This Ganesh guy is posting the same useless comment on all the blog entries (check http://googletesting.blogspot.com/2009/07/why-are-we-embarrassed-to-admit-that-we.html) to get links to his blog.
ReplyDeleteWhat a spammer!
Thanks. Agree that duplicate comments aren't useful. I removed it.
ReplyDeleteThis is a comment for your "An Experimental Approach to Writing Unit Tests" article. To the point: it's great. Keep posting anything you learn in this field. I find not a lot information about testing Android apps.
ReplyDeleteSo far, I have been using Positron aka Autoandroid to do testing (this framework allows only for functional testing), which works relatively well. However, these tests are slow and the project is almost abandoned by its developer.
Then, recently, in Android 1.5 I have found that the support for Android native, unit and functional testing, has improved, and I was going to switch to it.
But then, since I have found your article (An Experimental Approach to Writing Unit Tests), I'm thinking of following the approach you suggest in it.
Any farther thoughts on this approach? Are you doing TDD, even if with CALTAL for your Android development? I'm definitely interested to here any comments from you as well as any other developers. I, on my side, provide some more info on this topic on my blog at http://sberka.blogspot.com.
Thanks for a great tool, especially the android.jar file that runs in a JVM. I have been looking for something like this for a while.
ReplyDeleteOne question though, what version of Android is the jar? I don't seem to be able to find this info in your documentation.
Thanks again for this solution, I've been looking for something like this for a while now so that I can test drive my development.
Even though the post is old I hope to get an answer. Will you update the android.jar file some day? I accept the fact that I have to use an specific project for it, but it would be nice to be able to get an automatically updated android.jar. (The hoops I jump through to use mockito :)
ReplyDeleteI stuck with this android.jar to test WebVeiw. So I've wrote small parcer on Perl with regexp and made android.jar without any exception. It works fine for me. Hope it would be useful for somebody else.
ReplyDeletehttp://www.4shared.com/get/KWwSl5an/android.html
More details on problem solwing in my blog: http://denistimofeev.livejournal.com/3072.html
Thanks for this! But it would be nice to get a .jar for each new android version that comes out. When will these be available?
ReplyDelete