Page 187 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 187

Unit 9: Metrics



                                                                                                  Notes
                           Figure 9.3: Control Flow Graph with Edges Numbered










































            A basis set of paths, B1 through B3.
                     Module           :   Euclid
                     Basis Test Paths   :   3 Paths
                     Test Path B1     :   0 1 5 6 7 11 12 13
                     8( 1)            :   n>m ==> FALSE
                     14( 7)           :   r!=0 ==> FALSE
                     Test Path B2     :   0 1 2 3 4 5 6 7 11 12 13
                     8( 1)            :   n>m ==> TRUE
                     14( 7)           :   r!=0 ==> FALSE
                     Test Path B3     :   0 1 5 6 7 8 9 10 7 11 12 13
                     8( 1)            :   n>m ==> FALSE
                     14( 7)           :   r!=0 ==> TRUE
                     14( 7)           :   r!=0 ==> FALSE

            Any arbitrary path can be expressed as a linear combination of the basis paths B1 through B3.
            For example, the path P is equal to B2 - 2 * B1 + 2 * B3
            Module: Euclid

            User Specified Path: 1 Path P
                     Test Path P      :   0 1 2 3 4 5 6 7 8 9 10 7 8 9 10 7 11 12 13


                                             LOVELY PROFESSIONAL UNIVERSITY                                   181
   182   183   184   185   186   187   188   189   190   191   192