Font Size: a A A

An empirical evaluation of the effectiveness of JML assertions as test oracles

Posted on:2011-08-31Degree:M.SType:Thesis
University:University of DenverCandidate:Shrestha, KavirFull Text:PDF
GTID:2448390002452205Subject:Computer Science
Abstract/Summary:
Test oracles remain one of the least understood aspects of the modern testing process. An oracle is a mechanism used by software testers and software engineers for determining whether a test has passed or failed. One widely-supported approach to oracles is the use of runtime assertion checking during the testing activity. Method invariants, pre- and postconditions help detect bugs during runtime. While assertions are supported by virtually all programming environments, are used widely in practice, and are often assumed to be effective as test oracles, there are few empirical studies of their efficacy in this role. In this thesis, we present the results of an experiment we conducted to help understand this question. To do this, we studied seven of the core Java classes that had been annotated by others with assertions in the Java Modeling Language, used the muJava mutation analysis tool to create mutant implementations of these classes, exercised them with input-only (i.e., no oracle) test suites that achieve branch coverage, and used a machine learning tool, Weka, to determine which annotations were effective at "killing" these mutants. We also evaluate how effective the "null oracle" (in our case, the Java runtime system) is at catching these bugs. The results of our study are interesting, and help provide software engineers with insight into situations in which assertions can be relied upon to find bugs, and situations in which assertions may need to be augmented with other approaches to test oracles.
Keywords/Search Tags:Test, Oracles, Assertions, Effective, Used
Related items