Page 40 - SOFTWARE TESTING & QUALITY ASSURANCE
P. 40

Unit 3: Black Box Testing



               The test cases have to be defined effectively in order to find the bugs. The entire test  process will
               depend on the test cases.
                                  A software application undergoes  a dynamic black box  test. The test case
                                  defines that the application has to produce an output D when the inputs A and
                                  B are given. If the application gives an output C, then the application fails the
                                  test case and this is a bug.
               There  are various techniques used to perform  dynamic black box testing. Some of the important
               techniques are test-to-pass and test-to-fail, equivalence partitioning, data testing and state testing. We
               will be discussing them in detail in subsequent sections.
               3.2.1 Test to Pass and Test to Fail
               The test-to-pass approach checks for the standard functions  of the program. However, the test cases
               focus mainly to check the normal operation of the software. The test cases do not push the software to
               its limit or will not try to break the software. They try to find out the bugs by operating the software
               under normal conditions.
               The test-to-fail approach test cases push the software to its extreme. The main focus is to push the
               software to its limit and check for bugs when the software is operated under extreme conditions. The
               tester tries to provide extreme and erroneous values as inputs to check how the software can be broken.

                                  A calculator application is developed to calculate the average of more than 1000
                                  integer values. The calculator first has to be set to "Find average" mode and all
                                  the values whose average has to be found will be entered. Once all the values
                                  have been entered the “equal” button can be clicked to display the average of all
                                  the entered numbers. As a tester when you perform test-to-pass, you calculate
                                  the average for few hundred values, but will not cross the thousand values
                                  mark. This is testing the application by providing the normal input.
                                  When you perform test-to-fail, you provide more than thousand values and
                                  check the output of the software. You even take it further by providing more
                                  than two thousand values and check the output produced by the application.
                                  Such inputs might overload the application. This helps the tester to check the
                                  maximum number of values for which the application can find the average.

               It is important to note that while performing the test, the tester should first begin the test with test-to-
               pass, and check whether the software works fine without any bugs. Once it clears test-to-pass, the tester
               can perform test-to-fail.
               3.2.2   Equivalence Partitioning
               Equivalence partitioning, also called as equivalence classing, is a process of classifying the test cases and
               grouping them into different categories or classes. This method helps to reduce the number of test cases
               to a finite number of test cases without compromising on the quality of the test being carried out.
               The main objective of partitioning is to identify the test cases that perform same kind of testing and
               generate similar output. Since the test cases within one class are considered to be equivalent, picking up
               one test case from each class would be sufficient to detect the bugs in the software.  This technique helps
               to reduce the volume of test cases considerably.

               The class can be divided into two types, valid class and invalid class. All the classes which fall under
               valid type are values that satisfy the condition. Classes that do not satisfy the condition fall under the
               invalid class.














                                        LOVELY PROFESSIONAL UNIVERSITY                           33
   35   36   37   38   39   40   41   42   43   44   45