Information Technology Reference
In-Depth Information
a
b
c
d
g
e
f
k
j
h
i
l
m
Fig. 9.5
Interconnection diagram
approach. Consider artifact a. It cannot be tested on its own, because it calls
artifacts b, c, and d. Therefore in order to unit test a, artifacts b, c and d must be
coded as stubs. A stub is empty artifact, and it should return values corresponding
to preplanned test cases (Damian 2007 ).
9.10.1 Top-Down Integration
In top-down integration, if module mAbove calls module mBelow, then mAbove
is implemented/integrated before mBelow. Suppose that the same product
(Fig. 9.5 ) is to be implemented/integrated in a top-down manner. One possible top-
down ordering is a, b, c, d, e, f, g, h, i, j, k, l, m. First, module a is coded and
tested with b, c and d implemented as stubs. Next, stub b is expanded into module
b, linked to module a, and tested with module c e implemented as a stub.
Implementation/integration proceeds this way until all of the modules have been
integrated into the product. Another possible top-down ordering is a, b, e, h, c, d,
f, i, g, j, k, l, m. With this latter ordering, portions of the implementation/inte-
gration can proceed in parallel in the following way. After a has been coded and
tested, one programmer can use module a to implement/integrate module b, e, and
h, while another programmer can use a to work in parallel on c, d, f, and i. Once
d and f are completed, a third programmer can start to work on g, j, k, l, and m.
9.10.1.1 Advantages
Suppose that module a executes correctly by itself on a specific test case. However,
when the same data sets are submitted after b has been coded and integrated into the
product (now consisting of modules a and b linked together), the test fails. The fault
can be in one of two places; namely, in module b or in the interface between modules
a and b. This holds true in general whenever a new module is added to the product.
 
Search WWH ::




Custom Search