Page 194 - DCAP405_SOFTWARE_ENGINEERING
P. 194

Unit 11: Testing Strategies




          11.5.1 Levels of Testing                                                              Notes


          Unit Testing
          In unit testing, the analyst tests the program making up a system. For this reason, unit testing is
          sometimes called program testing. Unit testing gives stress on the modules independently of
          one another, to find errors. This helps the tester in detecting errors in coding and logic that are
          contained within that module alone. The errors resulting from the interaction between modules
          are initially avoided. For example, a hotel information system consists of modules to handle
          reservations; guest check in and checkout; restaurant, room service and miscellaneous charges;
          convention activities; and accounts receivable billing. For each, it provides the ability to enter,
          modify or retrieve data and respond to different types of enquiries or print reports. The test
          cases needed for unit testing should exercise each condition and option.

          Unit testing can be performed from the bottom up, starting with smallest and lowest level
          modules and proceedings one at a time. For each module in bottom-up testing a short program
          is used to execute the modules and provided the needed data, so that the modules is asked to
          perform the way it will when embedded within the larger system.

          System Testing

          The important and essential part of the system development phase, after designing and
          developing the software is system testing. We cannot say that every program or system design
          is perfect and because of lack of communication between the user and designer, some error is
          there in the software development. The number and nature of errors in a newly designed system
          depend on some usual factors like communication between the user and the designer; the
          programmer’s ability to generate a code that reflects exactly the systems specifications and the
          time frame for the design.
          Theoretically, a newly designed system should have all the parts or sub-systems are in working
          order, but in reality, each sub-system works independently. This is the time to gather all the sub-
          system into one pool and test the whole system to determine whether it meets the user
          requirements. This is the last change to detect and correct errors before the system is installed
          for user acceptance testing. The purpose of system testing is to consider all likely variations to
          which it will be subjected and then push the system to its limits.
          Testing is an important function of the success of the system. System testing makes a logical
          assumption that if all the parts of the system are correct, the goal will be successfully activated.




             Notes  Another reason for system testing is its utility as a user-oriented vehicle before
             implementation.

          System Testing consists of the following five steps:
          1.   Program Testing: A program represents the logical elements of a system. For a program to
               run satisfactorily, it must compile and test data correctly and tie in properly with other
               programs. It is the responsibility of a programmer to have an error free program. At the
               time of testing the system, there exist two types of errors that should be checked. These
               errors are syntax and logical. A syntax error is a program statement that violates one or
               more rules of the language in which it is written. An improperly defined field dimension
               or omitted key words are common syntactical errors. A logical error, on the other hand,
               deals with incorrect data fields out of range items, and invalid combinations. Compiler




                                           LOVELY PROFESSIONAL UNIVERSITY                                   187
   189   190   191   192   193   194   195   196   197   198   199