Automatic identification of common and special object-oriented unit tests.

Tao Xie
DOI: https://doi.org/10.1145/1028664.1028785
2004-01-01
Abstract:Common and special test inputs can be created to exercise some common and special behavior of the class under test, respectively. Although manually created tests are valuable, programmers often overlook some special test inputs. If programmers write down specifications, special or common tests can be automatically generated and selected by tools. However, specifications are not commonly written in practice. This research develops a novel approach for automatically identifying common and special unit tests for a class without requiring any specification. Given a class, our approach automatically generates test inputs and identifies common and special tests among the generated tests. Programmers can inspect these identified tests and use them to augment existing (manual) tests. Our approach is based on statistical algebraic abstractions, program properties (in the form of algebraic specifications) dynamically inferred from test executions. We use statistical algebraic abstractions to characterize program behavior. A test is identified to be common if the test exercises a behavior that is universally or commonly exercised by generated tests, or to be special if the test violates a behavior that is commonly exercised by generated tests.
What problem does this paper attempt to address?