On the use of specification-based assertions as test oracles

被引:15
作者
Coppit, D [1 ]
Haddox-Schatz, JM [1 ]
机构
[1] Coll William & Mary, Dept Comp Sci, Williamsburg, VA 23185 USA
来源
29TH ANNUAL IEEE/NASA SOFTWARE ENGINEERING WORKSHOP, PROCEEDINGS | 2005年
关键词
D O I
10.1109/SEW.2005.33
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
The "oracle problem " is a well-known challenge for software testing. Without some means of automatically computing the correct answer for test cases, testers must instead compute the results by hand, or use a previous version of the software. In this paper we investigate the feasibility of revealing software faults by augmenting the code with complete, specification-based assertions. Our evaluation method is to (1) develop a formal specification, (2) translate this specification into assertions, (3) inject or identify existing faults, and (4) for each version of the assertion-enhanced system containing a fault, execute it using a set of test inputs and check for assertion violations. Our goal is to determine whether specification-based assertions are a viable method of revealing faults, and to begin to assess the extent to which their cost-effectiveness can be improved. Our evaluation is based on two case studies involving real-world software systems. Our results indicate that specification-based assertions can effectively reveal faults, as long as they adversely affect the program state. We describe techniques that we used for translating high-level specifications into code-level assertions. We also discuss the costs associated with the approach, and potential techniques for reducing these costs.
引用
收藏
页码:305 / 314
页数:10
相关论文
共 36 条
[1]  
[Anonymous], 1992, PRENTICE HALL INT SE
[2]  
BARTETZKO D, 2001, ELECT NOTES THEORETI, V55
[3]  
Blough DM, 1997, DIG PAP INT SYMP FAU, P258, DOI 10.1109/FTCS.1997.614098
[4]   DESIGNING PROGRAMS THAT CHECK THEIR WORK [J].
BLUM, M ;
KANNAN, S .
JOURNAL OF THE ACM, 1995, 42 (01) :269-291
[5]  
BOYAPATI C, 2002, P INT S SOFTW TEST A
[6]   FAULT INJECTION - A METHOD FOR VALIDATING COMPUTER-SYSTEM DEPENDABILITY [J].
CLARK, JA ;
PRADHAN, DK .
COMPUTER, 1995, 28 (06) :47-56
[7]   Sound methods and effective tools for engineering modeling and analysis [J].
Coppit, D ;
Sullivan, KJ .
25TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2003, :198-207
[8]  
Demillo R. A., 1993, ACM Transactions on Software Engineering and Methodology, V2, P109, DOI 10.1145/151257.151258
[9]  
*EIFF SOFTW, BUILD BUG FREE O O S
[10]  
ENGLER D, 2000, S OP SYST DES IMPL O