Page 276 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 276

Principles of Software Engineering



                   Notes                      Figure 13.1: CFG with Def/use of Variable maxVal in Program





                                                                   d

                                                                   for

                                                                   if

                                                                   u
                                                                            u
                                                                   d














                                 After the control flow graph is ready, DU pairs are identified. In this example, only variable
                                 maxVal is considered for test, so only DU pairs of the variable is considered. After DU pairs
                                 are identified, paths to be covered under tested are selected based on test adequacy criteria.
                                 13.6.1 Test Data

                                 Test data is the data that is used in tests of a software system. In order to test a software application
                                 we require entering some data for testing most of the features. Any such specifically identified
                                 data which is used in tests is known as test data. We can have test data in excel sheet which can
                                 be entered manually while executing test cases or it can be read automatically from files (XML,
                                 Flat Files, Database etc.) by automation tools. Some test data is used to confirm the expected
                                 result, when test data is entered the expected result should come and some test data is used
                                 to verify the software behaviour to invalid input data. Test data is generated by testers or by
                                 automation tools which support testing. Most of the times in regression testing the test data are
                                 reused; it is always a good practice to verify the test data before re using it in any kind of test.
                                 Test data Categories

                                 Design test data considering following categories:
                                 No data: Run test cases on blank or default data. See if proper error messages are generated.

                                 Valid data set: Create it to check if application is functioning as per requirements and valid
                                 input data is properly saved in database or files.

                                 Invalid data set: Prepare invalid data set to check application behaviour for negative values,
                                 alphanumeric string inputs.
                                 Illegal data format: Make one data set of illegal data format. System should not accept data in
                                 invalid or illegal format. Also check proper error messages are generated.





        270                               LOVELY PROFESSIONAL UNIVERSITY
   271   272   273   274   275   276   277   278   279   280   281