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 条
[21]  
MARINOV D, 2001, P 16 IEEE C AUT SOFT
[22]   APPLYING DESIGN BY CONTRACT [J].
MEYER, B .
COMPUTER, 1992, 25 (10) :40-51
[23]  
MEYER B, 1992, ADV OBJECT ORIENTED
[24]   Two controlled experiments concerning the usefulness of assertions as a means for programming [J].
Müller, MM ;
Typke, R ;
Hagner, O .
INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2002, :84-92
[25]  
RICHARDSON DJ, 1992, 14TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING : PROCEEDINGS, P105
[26]  
RobertWFloyd, 1993, Proc. Sympos. Appl. Math, P65
[27]   A PRACTICAL APPROACH TO PROGRAMMING WITH ASSERTIONS [J].
ROSENBLUM, DS .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1995, 21 (01) :19-31
[28]  
SMITH G, 1999, OBJECT Z SPECIFICATI
[29]  
STUCKI LG, 1975, P INT C RELIABLE SOF, P59
[30]   Predicting how badly ''good'' software can behave [J].
Voas, J ;
Charron, F ;
McGraw, G ;
Miller, K ;
Friedman, M .
IEEE SOFTWARE, 1997, 14 (04) :73-83