Course Structure

We will learn about the different parts of this course and be introduced to the prerequisites for it.

Course sections

This course has many chapters, which we can broadly classify in four main sections:

Foundation

The JUnit Test Foundations section will provide us with a starter set of information about writing basic tests in JUnit. We’ll learn how to incorporate JUnit into our project, including writing a sample test and a couple of more industry-applicable tests. In Digging Deeper into JUnit Assertion and Organizing Your Tests, we’ll learn about JUnit organization and assertions, and we’ll pick up a few core practices for unit testing.

Mnemonics

The “mnemonics” section presents a trilogy of acronyms for improving the quality of our unit testing. The F.I.R.S.T. properties of a good test, the Right-BICEP rules for determining what to test, and the CORRECT guidelines for exploring boundary conditions.

Bigger design picture and issues

The “bigger design picture” section focuses on the relevance of design to unit testing and vice versa. You’ll refactor in the small, in the large, and in your tests, and you’ll learn how to use mock objects to deal with trouble-some dependencies.

The bigger unit-testing picture

The “bigger unit-testing picture” section discusses a handful of larger concerns in unit testing. We’ll learn how to use disciplined unit-testing practices for test-driven development. We’ll look at some more interesting code challenges and discuss some suggestions for introducing unit testing in a team environment.

Course coding style

This course is designed for Java developers who want to implement unit testing in their applications. We will use the iloveyouboss application throughout the course. Moreover, to reduce a bit of code clutter, we’ve omitted package statements from code listings.

We will be using JUnit version 4.12 throughout the course.