loading...
Cover image for Intro to Testing: Why Test

Intro to Testing: Why Test

aniketsmk profile image Aniket Kadam ・2 min read

When you write a feature, how do you know it works?
A lot of people, will run their code, and if you're an Android dev, you see it running on the phone and now you know if it works.

For Android in particular, this takes quite a while to do.
Have you ever sat down, and timed how long it takes from the time you write some function and hit run, to the time it actually starts up on a phone?
How many times do you do that procedure when writing code? How many times a day do you do it? Sure instant run might help a lot of times, but what if the thing you're checking requires you to go a bit deeper into the app? Each trial run could easily take 5 minutes and then if you just tried something 6 times, you've spent half an hour of your day on it.

What if you could save all that time?

Testing has become associated with something complex but nothing could be further from the truth. Yes, you will be learning new techniques and learning to think a bit differently but the end result is that your work will be easier!

You're going to spend less time, to get more things done and you'll be more confident that things are working the way they should.

We all test our code, the only difference is whether it takes milliseconds or minutes.

I use testing for two reasons:

  1. Faster development.
  2. A measure of confidence in its correctness.

We'll take a look at how to do this next time in this series, alongside when to do it, what to test, what not to test, mental models and benefits you get from it.

Meanwhile, take a look at one of the central concepts in testing that I wrote about here


If your team could use some help, or would like getting things more often and faster with less time; I consult on Android. Reach out to me at consulting@aniketkadam.com

Posted on by:

aniketsmk profile

Aniket Kadam

@aniketsmk

An android dev with ~8 years of experience. I consult and may join fulltime for the right company.

Discussion

markdown guide