JaVa
   

Objectives of this tutorial

This tutorial represents a practical introduction to unit testing for software developers. More specifically, it introduces test-driven development and suggests it as a general approach for system development. A large number of special fields and problem cases of this approach are discussed. Some of the questions addressed are, Which are the central tests to start with? How should I organize my tests? How many tests are enough? What about testing at the system boundary? and How can I test in the presence of inheritance and polymorphism? However, many of the techniques introduced in this tutorial can also be used for subsequent unit testing; in fact, some are meaningful for that purpose only. Other test types—mainly system and acceptance tests—will be explained whenever there does not appear to be a clear distinction to unit tests. In the ideal case, this tutorial should instruct developers during the first, second, and third steps, and motivate them to further explore the numerous references given. This tutorial is not an introduction to Java or general software development; knowledge and experience in both areas are assumed. It also does not represent a systematic introduction to the testing of object-oriented systems, but the required theory will be examined and references for further reading will be given. Moreover, Extreme Programming will be discussed only to the extent that it offers us assistance and reasons for unit tests.

This tutorial includes operating instructions for JUnit only to a limited extent. Many problems of practical operation, such as installation, integration into your own development environment, and other special issues, will be dealt with very briefly (see also Appendix A). However, JUnit serves as a basis for the automation of our unit tests (see ).


JaVa
   
Comments