O'Reilly logo

Test-Driven Development with Mockito by Sujoy Acharya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Getting Familiar with TDD

Test-Driven Development (TDD) is an evolutionary development approach. It offers test-first development where the production code is written only to satisfy a test and refactor.

In this chapter we will look at the following topics:

  • Definition of tests
  • Examples of TDD
  • The big picture
  • Steps of TDD

Definition of test

We all go through class tests and medical tests; musicians often check musical instruments before the program. A test is an assessment of our knowledge, a proof of concept, or an examination of data.

A class test is an examination of our knowledge to ascertain whether we can go to the next level. For software, it is the validation of functional and non-functional requirements before it is shipped to customers. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required