Setting up an automated CI build

JUnit tests are only valuable if they are executed regularly. This section explains the general purpose of continuous integration builds, which ascertains a high test execution frequency. Hence, CI constitutes a very good match to the test first approach.

What is continuous integration?

In Chapter 1, Getting Started, we mentioned the importance of immediate feedback with respect to unit testing. If we bust some low-level functionality, we want to know about it as soon as possible. This puts us in a position to detect and correct a problem as it evolves and avoid expensive quality assurance cycles. Because of this, it's good practice to run all tests at least once after merging and before checking in changes into ...

Get Testing with JUnit 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.