Chapter 1. Fundamentals

This chapter covers

  • An introduction to Programmer Testing
  • Getting started with JUnit
  • A few good practices for JUnit
  • Why testing replaces debugging

We hate debugging.

You look up at the clock to see how late it is because you still have a handful of defects that need to be fixed tonight. Welcome to the “fix” phase of “code and fix,” which is now entering its third month. In that time, you have begun to forget what your home looks like. The four walls of your office—assuming you even have four walls to look at—are more familiar than you ever wanted them to be. You look at the “hot defects” list and see one problem that keeps coming back. You thought you fixed that last week! These testers...when will they leave you alone?! ...

Get JUnit Recipes 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.