Using test oracles generated from program documentation

被引:69
作者
Peters, DK [1 ]
Parnas, DL
机构
[1] McMaster Univ, Dept Elect & Comp Engn, Commun Res Lab, Hamilton, ON L8S 4K1, Canada
[2] McMaster Univ, Fac Engn, Dept Comp & Software, Commun Res Lab, Hamilton, ON L8S 4K1, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
program testing; test oracle; formal specification; finite state machine;
D O I
10.1109/32.667877
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper illustrates how software can be described precisely using LD-relations, how these descriptions can be presented in a readable manner using tabular notations, and one way such descriptions can be used to test programs. We describe an algorithm that can be used to generate a test oracle from program documentation, and present the results of using a tool based on it to help test part of a commercial network management application. The results demonstrate that these methods can be effective at detecting errors and greatly increase the speed and accuracy of test evaluation when compared with manual evaluation. Such oracles can be used for unit testing, in situ testing, constructing self-checking software, and ensuring consistency between code and documentation.
引用
收藏
页码:161 / 173
页数:13
相关论文
共 37 条
[1]  
ABRAHAM RF, THESIS MCMASTER U HA
[2]  
ANTOY S, 1991, 911 TR PORTL STAT U
[3]  
BAUER BJ, THESIS MCMASTER U ON
[4]   SOFTWARE TESTING BASED ON FORMAL SPECIFICATIONS - A THEORY AND A TOOL [J].
BERNOT, G ;
GAUDEL, MC ;
MARRE, B .
SOFTWARE ENGINEERING JOURNAL, 1991, 6 (06) :387-405
[5]   A PROGRAM TESTING ASSISTANT [J].
CHAPMAN, D .
COMMUNICATIONS OF THE ACM, 1982, 25 (09) :625-634
[6]   THE CORE METHOD FOR REAL-TIME REQUIREMENTS [J].
FAULK, S ;
BRACKETT, J ;
WARD, P ;
KIRBY, J .
IEEE SOFTWARE, 1992, 9 (05) :22-33
[7]   DATA-ABSTRACTION IMPLEMENTATION, SPECIFICATION, AND TESTING [J].
GANNON, J ;
MCMULLIN, P ;
HAMLET, R .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1981, 3 (03) :211-223
[8]   TESTING PROGRAMS WITH AID OF A COMPILER [J].
HAMLET, RG .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1977, 3 (04) :279-290
[9]   PREDICATIVE PROGRAMMING .1. [J].
HEHNER, ECR .
COMMUNICATIONS OF THE ACM, 1984, 27 (02) :134-143