classify-tests-ecoop2005

classify-tests-ecoop2005 - Eclat: Automatic Generation and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Eclat: Automatic Generation and Classification of Test Inputs Carlos Pacheco and Michael D. Ernst MIT Computer Science and Artificial Intelligence Lab, The Stata Center, 32 Vassar Street, Cambridge, MA 02139 USA { cpacheco, mernst } @csail.mit.edu Abstract. This paper describes a technique that selects, from a large set of test inputs, a small subset likely to reveal faults in the software under test. The tech- nique takes a program or software component, plus a set of correct executions say, from observations of the software running properly, or from an existing test suite that a user wishes to enhance. The technique first infers an operational model of the softwares operation. Then, inputs whose operational pattern of execution differs from the model in specific ways are suggestive of faults. These inputs are further reduced by selecting only one input per operational pattern. The result is a small portion of the original inputs, deemed by the technique as most likely to reveal faults. Thus, the technique can also be seen as an error-detection technique. The paper describes two additional techniques that complement test input se- lection. One is a technique for automatically producing an oracle (a set of asser- tions) for a test input from the operational model, thus transforming the test input into a test case. The other is a classification-guided test input generation tech- nique that also makes use of operational models and patterns. When generating inputs, it filters out code sequences that are unlikely to contribute to legal inputs, improving the efficiency of its search for fault-revealing inputs. We have implemented these techniques in the Eclat tool, which generates unit tests for Java classes. Eclats input is a set of classes to test and an example program executionsay, a passing test suite. Eclats output is a set of JUnit test cases, each containing a potentially fault-revealing input and a set of assertions at least one of which fails. In our experiments, Eclat successfully generated inputs that exposed fault-revealing behavior; we have used Eclat to reveal real errors in programs. The inputs it selects as fault-revealing are an order of magnitude as likely to reveal a fault as all generated inputs. 1 Introduction Much of the skill in testing a software artifact lies in carefully constructing a small set of test cases that reveals as many errors as possible. A test case has two components: an input to the program or module, and an oracle , a procedure that determines whether the program behaves as expected on the input. Many techniques can automatically gen- erate candidate inputs for a program [10, 18, 17, 23, 8, 4, 19, 9, 12], but constructing an oracle for each input remains a largely manual task (unless a formal specification of A.P. Black (Ed.): ECOOP 2005, LNCS 3586, pp. 504527, 2005....
View Full Document

This note was uploaded on 02/24/2012 for the course CSE 503 taught by Professor Davidnotikin during the Spring '11 term at University of Washington.

Page1 / 24

classify-tests-ecoop2005 - Eclat: Automatic Generation and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online