Page 284 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 284

Principles of Software Engineering



                   Notes         Integration testing is a systematic technique for constructing the program true while at the same
                                 time conducting tests to uncover errors associated with in front of. The objective is to take unit
                                 tested components and build a program structure that has been dictated by design.
                                 There is often a tendency to attempt no incremental integration; that is, to structure the program
                                 using a “big bang” approaches. All components are advance. The entire program is tested as a
                                 whole. And chaos usually results of errors is encountered. Correction is difficult because isolation
                                 of causes is placated by the vast expanse of the entire program. Once these errors are new ones
                                 appear and the process continues in a seemingly endless loop.
                                 Top-down Integration
                                 Top-down integration testing is an incremental approach to construction of structure. Modules
                                 are integrated by moving downward through the control hierarchy, beginning with the main
                                 control module (main program). Modules subordinate (and ultimately subordinate) to the main
                                 control module are incorporated’ structure in either a depth-first or breadth-first manner.
                                 Depth-first integration would integrate all components on major control path of the structure.
                                 Selection of a major path is somewhat arbitrary and depends on application-specific characteristics.
                                 For example, selecting the hand path, components M , M , M  would be integrated first. Next,
                                                                                   5
                                                                                2
                                                                            1
                                 M  or (if necessary for proper functioning of M ) M  would be integrated. Then, the central and
                                                                          6
                                   8
                                                                       2
                                 right hand control paths are built. Breadth-first integration incorporates all components directly
                                 subordinate at each level, moving across the structure horizontally. From the figure, components
                                 M , M , and M  (a replacement for stub S ) would be integrated first. The next control level, M ,
                                      3
                                             4
                                                                  4
                                   2
                                                                                                            5
                                 M , and so on, follows.
                                   6
                                 The integration process is performed in a series of five steps:
                                    1.  The main control module is used as a test driver and stubs are substituted for all components
                                      directly subordinate to the main control module.
                                    2.  Depending on the integration approach selected (i.e., depth or breadth first), subordinate
                                      stubs are replaced one at a time with actual components.
                                    3.  Tests are conducted as each component is integrated.
                                    4.  On completion of each set of tests, another stub is replaced with the real component.
                                    5.  Regression testing may be conducted to ensure that new errors have not been introduced.

                                                         Figure 14.1: Top-down Integration


                                                                           M1

                                                                                  M3
                                                                  M2


                                                          M4            M5



                                                                    M6          M7


                                                                               (a)






        278                               LOVELY PROFESSIONAL UNIVERSITY
   279   280   281   282   283   284   285   286   287   288   289