Category:

I’m sure this scenario has happened to you: Out of the corner of your eye you notice your team’s QA engineer approaching with a confused look on her face. Suddenly, your heart starts to beat faster…

Most of you would start to dread the upcoming conversation. “What did I do wrong? It was working for me, I swear!” you think to yourself.

As she gets closer you start to become a little more honest with yourself: “Well, I guess I didn’t fully test all the use cases but she must know that I was on a tight deadline and testing takes forever.”

Let’s imagine a different scenario: She reaches your desk and says “All good! That new testing tool is paying dividends.”

You spend the rest of the day not being afraid of your team’s QA because you realize the impact that rapidly creating tests is having on your confidence to ship high quality code.

Reasons for testing usually fall into three categories:

  1. You’re doing what you’re told
  2. You’re super responsible
  3. You (like me) find that seeing a line of green “test-passed” circles in Android Studio incredibly satisfying
In any case, spending the time to create effective tests is incredibly important because it not only ensures that our code works as expected, but also lets us be more confident that changes we made haven’t caused major problems elsewhere. As a developer, I would like to spend less time on testing and more time building, this is where Mockito has been a real help.

Read More …