The potentially high costs for testing each individual method in a class
have been described. These high costs will be particularly apparent when
there are many methods in a class; the numbers can reach as high as 20
to 30. If the class is selected as the unit to test, it is possible to reduce
these costs since in many cases the methods in a single class serve as drivers
and stubs for one another. This has the effect of lowering the complexity
of the test harness that needs to be developed. However, in some cases
driver classes that represent outside classes using the methods of the class
under test will have to be developed.
In addition, if it is decided that the class is the smallest component to
test, testers must decide if they are able to adequately cover all necessary
features of each method in class testing. Some researchers believe that
coverage objectives and test data need to be developed for each of the
methods.