Improving Generation of Object-Oriented Test Suites by Avoiding Redundant Tests

Tao Xie,Darko Marinov,David Notkin
2004-01-01
Abstract:Object-oriented tests consist of sequences of method invocations. Behavior of an invocation depends on the state of the receiver ob- ject and method arguments at the beginning of the invocation. Ex- isting tools for automatic generation of object-oriented test suites, such as Jtest and JCrasher for Java, typically ignore object states. These tools generate redundant tests that exercise the same method behavior, which increases the testing time without increasing the ability to detect faults. We propose a formal framework for detecting redundant tests and present five fully automatic techniques within this framework. Based on these techniques, we have developed a test-minimization tool that removes redundant tests from test suites and a test-generation tool that iteratively augments test suites with non-redundant tests. We evaluate our tools on eight subjects taken from a variety of sources. The experimental results show that our test minimization can remove over 90% of the tests generated by Jtest for most sub- jects and 30% of the tests generated by JCrasher for half of the sub- jects, without decreasing the quality of test suites. The results also show that our test generation can effectively generate new tests that increase the quality of test suites generated by Jtest and JCrasher.
What problem does this paper attempt to address?