Page 266 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 266

Principles of Software Engineering



                   Notes         IEEE Definitions
                                 Failure: External behaviour is incorrect
                                 Fault: Discrepancy in code that causes a failure

                                 Error: Human mistake that caused fault
                                 Note

                                 Error: is terminology of Developer
                                 Bug: is terminology of Tester.

                                 13.2 Test Oracles

                                 The oracle problem is addressed for chance testing and difficult of randomized software. The
                                 presented Statistical Oracle is a Heuristic Oracle using statistical methods, especially statistical
                                 tests. The Statistical Oracle is applicable in case there are explicit formulae for the mean, the
                                 distribution, and so on, of characteristics computable from the test result. As with the Heuristic
                                 Oracle,  the  decision  of  the  Statistical  Oracle  is  not  always  right.  The  Statistical  Oracle  has
                                 successfully been functional. To test any program, we need to have a description of its expected
                                 behaviour  and  a  method  of  determining  whether  the  observed  behaviour  conforms  to  the
                                 expected behaviour. For this we need a test oracle. A test oracle is a mechanism, different from
                                 the program itself, which can be used to check the correctness of the output of the program for
                                 the test cases. Conceptually, we can consider testing a process in which the test cases are given
                                 to the test oracle and the program under testing. The output of the two is then compared to
                                 determine if the program behaved correctly for the test cases. Test designers widely believe that
                                 the overall effectiveness and cost of software testing depends largely on the type and number of
                                 test cases executed on the software. Test oracle used during testing also contributes significantly
                                 to test effectiveness and cost. A test oracle is a mechanism that determines whether software
                                 executed correctly for a test case. We define a test oracle to contain two essential parts, oracle
                                 information that represents expected output, and an oracle procedure that compares the oracle
                                 information with the actual output. By varying the level of detail of oracle information and
                                 changing the oracle procedure, a test designer can create different types of test oracles.
                                 13.3 Test Cases and Criteria


                                 Test case and criteria for testing is given blow:
                                 13.3.1 Test Cases

                                 A  test  case  is  a  documentation  which  specifies  input  principles,  expected  output  and  the
                                 preconditions for executing the test or a test case is a scenario made up of a sequence of steps
                                 and conditions or variables, where test inputs are provided and the program is run using those
                                 inputs, to see how it performs. An expected result is outlined and the actual result is compared to
                                 it. Certain working conditions are also present in the test case, to see how the program handles
                                 the conditions. Every requirement or objective that the program is expected to achieve, needs
                                 at least one test case. Realistically, it definitely takes more than one test case to determine the
                                 true functionality of the application being tested. The mechanism used to judge the result of the
                                 test case, i.e. whether the program has failed or passed the test, is called a test oracle. Test cases,
                                 at root level, are used to measure how a program handles errors or tricky situations such as if
                                 one input is incorrect or if both inputs are incorrect. They are also expected to expose hidden
                                 logical errors in the program’s code that have gone undetected.



        260                               LOVELY PROFESSIONAL UNIVERSITY
   261   262   263   264   265   266   267   268   269   270   271