This technical report describes the design of the unit testing framework JUnit in its version 3.8. The documentation technique employed is an enhanced version of collaboration-based design, also known as role modeling. In collaboration-based design, objects are viewed as playing multiple roles in different contexts, called collaborations. A collaboration, in turn, organizes several usually distinct objects for a specific purpose, for example to provide a basic service or to maintain a state dependency between two objects.
The documentation presented here accounts for every method in the original JUnit 3.8 framework and assigns it to at least one role. This way, collaboration-based documentation finds a middle ground between the more coarse-grained class-based view and the more detailed method-by-method view of objects. The report uses UML packages and interfaces to capture collaborations and roles rather than the evolving UML collaboration specification notation. For the purposes of this document this is sufficient.
The general purpose of this documentation form is to ease framework comprehension; an additional purpose that motivated this document is to investigate whether collaborations can serve as basic units of functionality provided by a design like a framework. Such a measure of functionality can serve multiple purposes, for example estimating im-plementation efforts or measuring complexity.
Dirk Riehle. "JUnit 3.8 Documented Using Collaborations." Technical Report, 2007.
The technical report is available as a PDF file.
Copyright (©) 2007 by the author. All rights reserved.
This paper has been superseded by a newer revised version.
|