Chapter 2: Understanding Test-Driven Development

Now that we have seen what unit tests are and how they can help in development, we are going to learn about test-driven development (TDD).

After giving you some insights into the origin and objective of TDD, we will move ahead and have a look at the benefits and drawbacks of it. By the end of the chapter, you will have a clear idea about the relevance of TDD and what should be or can be tested using it.

These are the main topics that we will cover in the chapter:

  • The origin of TDD
  • The TDD workflow
  • Advantages of TDD
  • Disadvantages of TDD
  • What to test

The origin of TDD

In 1996, Kent Beck, Ward Cunningham, and Ron Jeffries introduced a new software development methodology called Extreme Programming ...

Get Test-Driven iOS Development with Swift - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.