Abstraction in Assertion-Based Test Oracles
Yoonsik Cheon
- 11 Oct 2007
- pp 410-414
TL;DR: This work advocates the use of model variables - specification-only variables of which abstract values are given as mappings from concrete program states - to write abstract assertions for test oracles and performs a mutation testing experiment to evaluate the effectiveness of the useOf model variables in assertion-based test oracle assertions.
read more
Abstract: Assertions can be used as test oracles. However, writing effective assertions of right abstraction levels is difficult because on the one hand, detailed assertions are preferred for thorough testing (i.e., to detect as many errors as possible), but on the other hand abstract assertions are preferred for readability, maintainability, and reusability. As assertions become a practical tool for testing and debugging programs, this is an important and practical problem to solve for the effective use of assertions. We advocate the use of model variables - specification-only variables of which abstract values are given as mappings from concrete program states - to write abstract assertions for test oracles. We performed a mutation testing experiment to evaluate the effectiveness of the use of model variables in assertion-based test oracles. According to our experiment, assertions written in terms of model variables are as effective as assertions written without using model variables in detecting (injected) faults, and the execution time overhead of model variables are negligible. Our findings are applicable to other use of runtime checkable assertions.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
The Oracle Problem in Software Testing: A Survey
TL;DR: This paper provides a comprehensive survey of current approaches to the test oracle problem and an analysis of trends in this important area of software testing research and practice.
1K
Automatic generation of oracles for exceptional behaviors
Alberto Goffi,Alessandra Gorla,Michael D. Ernst,Mauro Pezzè +3 more
- 18 Jul 2016
TL;DR: Toradocu is proposed, a technique that automatically creates test oracles for exceptional behaviors from Javadoc comments that uses a combination of natural language processing and run-time instrumentation.
118
Translating code comments to procedure specifications
Arianna Blasi,Alberto Goffi,Konstantin Kuznetsov,Alessandra Gorla,Michael D. Ernst,Mauro Pezzè,Sergio Delgado Castellanos +6 more
- 12 Jul 2018
TL;DR: Jdoctor is presented, an approach that combines pattern, lexical, and semantic matching to translate Javadoc comments into executable procedure specifications written as Java expressions and supplied to an automated test case generation tool, Randoop.
106
Cross-checking oracles from intrinsic software redundancy
Antonio Carzaniga,Alberto Goffi,Alessandra Gorla,Andrea Mattavelli,Mauro Pezzè +4 more
- 31 May 2014
TL;DR: An experimental evaluation shows that cross-checking oracles, used in combination with automatic test generation techniques, can be very effective in revealing faults, and that they can even improve good hand-written test suites.
MeMo: Automatically identifying metamorphic relations in Javadoc comments for test automation
TL;DR: The experimental evaluation demonstrates that MeMo can effectively and precisely infer equivalence metamorphic relations, and MeMo complements existing state-of-the-art techniques that are based on dynamic program analysis and effectively detect defects when used as test oracles in automatically-generated or manually-written test cases.
41
References
•Book
An axiomatic basis for computer programming
C. A. R. Hoare
- 01 Jan 2002
TL;DR: In this article, the logical foundations of computer programming are explored by using techniques first applied in the study of geometry and later extended to other branches of mathematics, and a formal proof of a simple theorem is displayed.
3.3K
An axiomatic basis for computer programming
TL;DR: An attempt is made to explore the logical foundations of computer programming by use of techniques which were first applied in the study of geometry and have later been extended to other branches of mathematics.
•Journal Article
An Axiomatic Basis for Computer Programming (Reprint).
Abstract: In this paper an attempt is made to explore the logical foundations of computer programming by use of techniques which were first applied in the study of geometry and have later been extended to other branches of mathematics. This involves the elucidation of sets of axioms and rules of inference which can be used in proofs of the properties of computer programs. Examples are given of such axioms and rules, and a formal proof of a simple theorem is displayed. Finally, it is argued that important advantages, both theoretical and practical, may follow from a pursuance of these topics.
1.5K
A practical approach to programming with assertions
TL;DR: This paper describes experience using an assertion processing tool that was built to address the concerns of ease-of-use and effectiveness, and presents a classification of the assertions that were most effective at detecting faults.
A Simple and Practical Approach to Unit Testing: The JML and JUnit Way
Yoonsik Cheon,Gary T. Leavens +1 more
- 10 Jun 2002
TL;DR: In this paper, the authors present an approach that makes writing unit tests easier by using a formal specification language's runtime assertion checker to decide whether methods are working correctly, thus automating the writing of unit test oracles.
333
Related Papers (5)
Martin Davis,Elaine J. Weyuker +1 more
- 01 Jan 1981
Tsong Yueh Chen,Fei-Ching Kuo,T. H. Tse,Zhi Quan Zhou +3 more
- 19 Sep 2003