• DocumentCode
    146773
  • Title

    An Empirical Analysis of Test Oracle Strategies for Model-Based Testing

  • Author

    Nan Li ; Offutt, Jeff

  • Author_Institution
    Software Eng., George Mason Univ., Fairfax, VA, USA
  • fYear
    2014
  • fDate
    March 31 2014-April 4 2014
  • Firstpage
    363
  • Lastpage
    372
  • Abstract
    Model-based testing is a technique to design abstract tests from models that partially describe the system´s behaviour. Abstract tests are transformed into concrete tests, which include test input values, expected outputs, and test oracles. Although test oracles require significant investment and are crucial to the success of the testing, we have few empirical results about how to write them. With the same test inputs, test oracles that check more of the program state have the potential to reveal more failures, but may also cost more to design and create. This research defines six new test oracle strategies that check different parts of the program state different numbers of times. The experiment compared the six test oracle strategies with two baseline test oracle strategies. The null test oracle strategy just checks whether the program crashes and the state invariant test oracle strategy checks the state invariants in the model. The paper presents five main findings. (1) Testers should check more of the program state than just runtime exceptions. (2) Test oracle strategies that check more program states do not always reveal more failures than strategies that check fewer states. (3) Test oracle strategies that check program states multiple times are slightly more effective than strategies that check the same states just once. (4) Edge-pair coverage did not detect more failures than edge coverage with the same test oracle strategy. (5) If state machine diagrams are used to generate tests, checking state invariants is a reasonably effective low cost approach. In summary, the state invariant test oracle strategy is recommended for testers who do not have enough time. Otherwise, testers should check state invariants, outputs, and parameter objects.
  • Keywords
    program testing; program verification; abstract test design; edge-pair coverage; failure detection; model state invariant checking; model-based testing; program crash; program failures; program state checking; runtime exceptions; state invariant test oracle strategy; system behaviour; test oracle strategies; Abstracts; Concrete; Java; Runtime; Testing; Transforms; Unified modeling language; Empirical study; Model-based testing; Test oracle;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Testing, Verification and Validation (ICST), 2014 IEEE Seventh International Conference on
  • Conference_Location
    Cleveland, OH
  • Type

    conf

  • DOI
    10.1109/ICST.2014.49
  • Filename
    6823898