Test Oracle Strategies for Model-Based Testing

被引:41
作者
Li, Nan [1 ]
Offutt, Jeff [2 ]
机构
[1] Medidata Solut, Div Res & Dev, New York, NY 10014 USA
[2] George Mason Univ, Fairfax, VA 22030 USA
关键词
Test oracle; RIPR model; test oracle strategy; test automation; subsumption; model-based testing; MUTATION;
D O I
10.1109/TSE.2016.2597136
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Testers use model-based testing to design abstract tests from models of the system's behavior. Testers instantiate the abstract tests into concrete tests with test input values and test oracles that check the results. Given the same test inputs, more elaborate test oracles have the potential to reveal more failures, but may also be more costly. This research investigates the ability for test oracles to reveal failures. We define ten new test oracle strategies that vary in amount and frequency of program state checked. We empirically compared them with two baseline test oracle strategies. The paper presents several main findings. (1) Test oracles must check more than runtime exceptions because checking exceptions alone is not effective at revealing failures. (2) Test oracles do not need to check the entire output state because checking partial states reveals nearly as many failures as checking entire states. (3) Test oracles do not need to check program states multiple times because checking states less frequently is as effective as checking states more frequently. In general, when state machine diagrams are used to generate tests, checking state invariants is a reasonably effective low cost approach to creating test oracles.
引用
收藏
页码:372 / 395
页数:24
相关论文
共 45 条
[1]  
Ammann P., 2016, INTRO SOFTWARE TESTI
[2]  
Ammann P., 2008, GRAPH COVERAGE WEB A
[3]   Is mutation an appropriate tool for testing experiments? [J].
Andrews, JH ;
Briand, LC ;
Labiche, Y .
ICSE 05: 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2005, :402-411
[4]  
[Anonymous], 2008, CLASS OF TREE
[5]  
[Anonymous], 2005, MEASURING COMPUTER P
[6]  
[Anonymous], REPOSITORY PUBLICATI
[7]   The Oracle Problem in Software Testing: A Survey [J].
Barr, Earl T. ;
Harman, Mark ;
McMinn, Phil ;
Shahbaz, Muzammil ;
Yoo, Shin .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2015, 41 (05) :507-525
[8]  
Binder RV., 1999, Testing Object-Oriented Systems: Models, Patterns, and Tools
[9]   Assessing and improving state-based class testing: A series of experiments [J].
Briand, LC ;
Di Penta, M ;
Labiche, Y .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2004, 30 (11) :770-793
[10]   An overview of JML tools and applications [J].
Burdy L. ;
Cheon Y. ;
Cok D.R. ;
Ernst M.D. ;
Kiniry J.R. ;
Leavens G.T. ;
Leino K.R.M. ;
Poll E. .
International Journal on Software Tools for Technology Transfer, 2005, 7 (3) :212-232