International Journal of Advances in Engineering & Technology, May 2012.
©IJAET ISSN: 2231-1963
149 Vol. 3, Issue 2, pp. 149-159
ANALYSIS OF THE CLASS DEPENDENCY MODEL FOR
OBJECT-ORIENTED FAULTS
Pranshu Gupta and David A. Gustafson
Department of Computing and Information Sciences, Manhattan, Kansas, USA
ABSTRACT
A test order should be an integral part of all OO testing criteria. It defines the order in which classes in a
program should be tested, and accordingly defines the order of test executions. The object relation diagrams
(ORD), test dependency graphs (TDG) and class dependency model (CDM) creates a test order based on the
inheritance and association relationships between classes and methods of a program. In this paper, we apply
the class dependency model to object-oriented (OO) programs seeded with a set of standard object-oriented
faults. We analyze where the OO faults are concentrated in the hierarchy of the testing order of classes created
using the CDM. Based on this analysis, we show that the approach for defining the test order should be different
for various categories of OO faults (such as inheritance, method overloading, polymorphism, etc) as these
object-oriented program properties cause different behaviors in the program.
KEYWORDS: Software testing, CDM, ORD, TDG
I. INTRODUCTION
Various diagrams have been defined to show the relationships between classes and used for defining
test orders for OO programs. There are diagrams such as object relation diagrams (ORD) [1, 2, 4, 11,
12 and 13], test dependency graphs (TDG) [1, 2, 4, 9, 10 and 12] and class dependency model (CDM)
[1, 4] that help in defining a test order.
The ORD model shows the inheritance relationship and the association (A) relationship between
classes but does not provide the details of the association relationship [1]. The lack of detail about the
interaction between classes leads to a potential weakness that can give rise to more stubs and thus
more testing effort. An example of ORD model is shown in figure 1. On the other hand, the CDM
diagram takes into account two types of OO relationships: Inheritance relationship (I) and Use
relationship (U) both at the class level and the method level as shown in figure 2a and 2b. The CDM
is generated from the ORD by adding the details of the association relationship between classes [1].
Thus, CDM shows the inheritance relationship as well as the association relationship including the
detail of the association relationship (e.g. a use relationship between methods of different classes) as
shown in figure 2b. CDM model shown in figure 2a can be generated using the object relation
diagram (ORD) as well as by the static analysis of the source code [1]. The model is further enhanced
to the method level as shown in figure 2b. CDM has been used to generate test orders for the OO
systems [1].