This chapter focuses on the reasons why unit test automation is necessary and how automated unit tests can be realized. While formulated a few requirements to an automation framework, showed how they can be implemented in JUnit:

For these reasons, JUnit is ideally suited for use as an automation tool to automate developer-side component tests. Because it is freeware, we have used it as a basis for most of the code examples in this tutorial.

In this chapter we discussed the technical aspects of the creation and execution of test cases in JUnit. The rest of this tutorial will deal mainly with the creation of "the right" test cases. The word right relates to the creation time, quantity, size, structure, organization, and implementation. As in most aspects of our lives, we will see here too that there are no absolute rules and that we will have to give up looking for an optimal solution and instead settle for a sufficiently good solution.