I've come to use Unit Tests organically.
Certainly I don't write unit tests first, I write tests to make sure
what I've coded works the way it's supposed to.
I also add more tests whenever I find bugs.

Of course not everything can be unit tested, but most things can be.

I find it faster now writing a test, than opening the app manually and
adding test code that can be triggered by say, tapping on a temporary
button on the screen.

Unit tests help you with that.

Getting unit tests to work on Android was a bit of a pain in the
beginning so I just had my own "testing classes" that I would invoke
in the UI, but this was also slow,  so I took the time to see how the
whole thing worked on android (InstrumentationTests, etc)
and I'm very glad I did.

One way or another it's good to have code making sure the simple
things work. It'll save you a lot of time, you'll be testing anyways
in the end, otherwise how can you know things are working properly?

On Mar 11, 7:40 am, Yahel <[email protected]> wrote:
> Hi everyone,
>
> Not really Android specific but :
>
> I've just read Bob Kern's answer to a vaillant 14 years old programmer
> who wants to write a game for Android.
>
> Bob's advice is good as always and he states :
> "Learn how to test effectively. Use unit tests for as much of your
> system as you can. Go to junit.org for more information. If you write
> your tests first, you'll clarify what you want to do, and it all gets
> much easier. But testing is also a skill that needs to be developed."
>
> Now I've been a developper for 10 years, mostly solo works, and I have
> never ever used UnitTesting, ever. Be it in VB, C++, PHP, ASP, Ruby
> and now Android.
>
> Do you guys really use it in your ANDROID apps at all ?
> Do you really feel it makes a (significant) difference in your
> code(app) in the end ?
>
> From a conversation from the beginning of the week I'm now having to
> learn the full xml RFC, so please don't try to hard to convince me,
> I'm beginning to feel dizzy already :D
>
> Sorry for the OOST.
>
> Yahel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to