Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/186258.186508acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
Article
Free access

Generating a test oracle from program documentation: work in progress

Published: 01 August 1994 Publication History

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

[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]
Bernot, G., Gaudel M. C. & Marre, B., "Software Testing Based on Formal Specifications' A Theory and a Tool", Software Engineering Journal, Vol. 6, pp. 387- 405.
[3]
Chapman, D., "A Program Testing Assistant", Communications ofthe ACM, Vol. 25, No. 9 (September 1982), pp. 625-634.
[4]
Gannon, J., McMullin, P. & Hamlet, R., "Data-Abstraction Implementation, Specification, and Testing", A CM Transactions on Programming Languages and Systems, Vol. 3, No. 3 (July 1981), pp. 211-223.
[5]
Gerhart, S., Craigen, D. & Ralston, T., "Experience with Formal Methods in Critical Systems", IEEE Software, (January, 1994) pp. 21-28.
[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]
Luckham, D. C., von Henke, E W., Krieg-Brtickner, B. & Owe, O., ANNA A Language for Annotating Ada Programs Reference Manual, Lecture Notes in Computer Science, 260, Goos, G. & Hartmanis, J. (editors), Springer-Verlag, 1987.
[8]
Panzl, D. j., "Automatic Software Test Drivers", Computer, April 1978, pp. 44-50.
[9]
Parnas, D. L., "A Generalized Control Structure and Its Formal Definition", Communications of the A CM, Vol. 26, No. 8 (August 1983), pp. 572-581.
[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]
Parnas, D. L., "Predicate Logic for Software Engineering'', iEEE Transactions on Software Engineering, Vol. 19, No. 9 (September 1993), pp. 856-862.
[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]
Richardson, D. J., Aha, S. L. & O'Malley, T. O. "Specification-based Test Oracles for Reactive Systems", Proceedings of the 1992 International Conference on Software Engineering (ICSE), (May, 1992), pp. 105- 118.
[16]
Stocks, P. & Carrington, D., "Test Template Framework: A specification-based testing case study", Proceedings of the 1993 International Symposium on Software Testing and Analysis (iSSTA), (June, 1993), pp. 11-18.
[17]
Weyuker, E. J., "On Testing Non-testable Programs", The Computer Journal, Vol. 25, No. 4 (1982), pp. 465- 470.

Cited By

View all
  • (2024)Assessing Evaluation Metrics for Neural Test Oracle GenerationIEEE Transactions on Software Engineering10.1109/TSE.2024.343346350:9(2337-2349)Online publication date: Sep-2024
  • (2023)JMLKelinci+: Detecting Semantic Bugs and Covering Branches with Valid Inputs Using Coverage-guided Fuzzing and Runtime Assertion CheckingFormal Aspects of Computing10.1145/360753836:1(1-24)Online publication date: 5-Aug-2023
  • (2022)Comparing the Effectiveness of Assertions with Differential Testing in the Context of Web TestingQuality of Information and Communications Technology10.1007/978-3-031-14179-9_8(108-124)Online publication date: 5-Sep-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA '94: Proceedings of the 1994 ACM SIGSOFT international symposium on Software testing and analysis
August 1994
241 pages
ISBN:0897916832
DOI:10.1145/186258
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 August 1994

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

ISSTA94
Sponsor:
ISSTA94: International Symposium on Software Testing and Analysis
August 17 - 19, 1994
Washington, Seattle, USA

Acceptance Rates

ISSTA '94 Paper Acceptance Rate 16 of 69 submissions, 23%;
Overall Acceptance Rate 58 of 213 submissions, 27%

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)78
  • Downloads (Last 6 weeks)18
Reflects downloads up to 24 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Assessing Evaluation Metrics for Neural Test Oracle GenerationIEEE Transactions on Software Engineering10.1109/TSE.2024.343346350:9(2337-2349)Online publication date: Sep-2024
  • (2023)JMLKelinci+: Detecting Semantic Bugs and Covering Branches with Valid Inputs Using Coverage-guided Fuzzing and Runtime Assertion CheckingFormal Aspects of Computing10.1145/360753836:1(1-24)Online publication date: 5-Aug-2023
  • (2022)Comparing the Effectiveness of Assertions with Differential Testing in the Context of Web TestingQuality of Information and Communications Technology10.1007/978-3-031-14179-9_8(108-124)Online publication date: 5-Sep-2022
  • (2021)Using a Guided Fuzzer and Preconditions to Achieve Branch Coverage with Valid InputsTests and Proofs10.1007/978-3-030-79379-1_5(72-84)Online publication date: 18-Jun-2021
  • (2020)DEVS-scriptingProceedings of the Winter Simulation Conference10.5555/3466184.3466435(2196-2207)Online publication date: 14-Dec-2020
  • (2020)MEGACM Transactions on Reconfigurable Technology and Systems10.1145/340911413:4(1-24)Online publication date: 30-Sep-2020
  • (2020)Accelerating FPGA Routing Through Algorithmic Enhancements and Connection-aware ParallelizationACM Transactions on Reconfigurable Technology and Systems10.1145/340695913:4(1-26)Online publication date: 25-Aug-2020
  • (2020)iModelACM Transactions on Modeling and Performance Evaluation of Computing Systems10.1145/33742205:2(1-30)Online publication date: 5-Mar-2020
  • (2020)DEVS-scripting: A Black-Box Test Frame for Devs Models2020 Winter Simulation Conference (WSC)10.1109/WSC48552.2020.9384024(2196-2207)Online publication date: 14-Dec-2020
  • (2019)A Measure of Added Value in GroupsACM Transactions on Autonomous and Adaptive Systems10.1145/333554713:4(1-46)Online publication date: 23-Jul-2019
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media