|
ABSTRACT
A fundamental assumption of software testing is that there is some mechanism, an oracle, that will determine whether or not the results of a test execution are correct. In practice this is often done by comparing the output, either automatically or manually, to some pre-calculated, presumably correct, output [17]. However, if the program is formally documented it is possible to use the specification to determine the success or failure of a test execution, as in [1], for example. This paper discusses ongoing work to produce a tool that will generate a test oracle from formal program documentation.In [9], [10] and [11] Parnas et al. advocate the use of a relational model for documenting the intended behaviour of programs. In this method, tabular expressions are used to improve readability so that formal documentation can replace conventional documentation. Relations are described by giving their characteristic predicate in terms of the values of concrete program variables. This documentation method has the advantage that the characteristic predicate can be used as the test oracle -- it simply must be evaluated for each test execution (input & output) to assign pass or fail. In contrast to [1], this paper discusses the testing of individual programs, not objects as used in [1]. Consequently, the method works with program documentation, written in terms of the concrete variables, and no representation function need be supplied. Documentation in this form, and the corresponding oracle, are illustrated by an example.Finally, some of the implications of generating test oracles from relational specifications are discussed.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Antoy, S. & Hamlet, R., "Objects that Check Themselves against Formal Specifications", TR 91-1, Dept. of Computer Science, Portland State University School of Engineering and Applied Sciences, Portland, OR. 18 pgs.
|
| |
2
|
|
 |
3
|
|
 |
4
|
John Gannon , Paul McMullin , Richard Hamlet, Data Abstraction, Implementation, Specification, and Testing, ACM Transactions on Programming Languages and Systems (TOPLAS), v.3 n.3, p.211-223, July 1981
[doi> 10.1145/357139.357140]
|
| |
5
|
|
| |
6
|
Hamlet, R. G., "Testing Programs with the Aid of a Compiler", IEEE Transactions on Software Engineering, Vol. SE-3, No. 4 (July 1977), pp. 279~290.
|
| |
7
|
|
| |
8
|
Panzl, D. j., "Automatic Software Test Drivers", Computer, April 1978, pp. 44-50.
|
 |
9
|
|
| |
10
|
Parnas, D.L. &Madey, J., "Functional Documentation for Computer Systems Engineering (Version 2)", CRL Report No. 237, Telecommunications Research Institute of Ontario (TRIO), September 1991, 14 pgs.
|
| |
11
|
Parnas, D. L., Madey, J. & Iglewski, M., "Formal Documentation of Well-Structured Programs", CRL Report No. 259, Telecommunications Research institute of Ontario (TRIO), September 1992, 37 pgs.
|
| |
12
|
Parnas, D. L., "Tabular Representation of Relations", CRL Report No. 260, Telecommunications Research Institute of Ontario (TRIO), November 1992, 17 pgs.
|
| |
13
|
|
| |
14
|
Peters, D. K., "Shortest Path Algorithm - Formal Program Documentation", CRL Report No. 280, Telecommunications Research Institute of Ontario (TRIO), February 1994, 11 pgs.
|
 |
15
|
|
 |
16
|
|
| |
17
|
Weyuker, E. J., "On Testing Non-testable Programs", The Computer Journal, Vol. 25, No. 4 (1982), pp. 465- 470.
|
CITED BY 6
|
|
Dick Hamlet , Dave Mason , Denise Woit, Theory of software reliability based on components, Proceedings of the 23rd International Conference on Software Engineering, p.361-370, May 12-19, 2001, Toronto, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|