Automatic identification of common and special object-oriented unit tests

  • Authors:
  • Tao Xie

  • Affiliations:
  • University of Washington, Seattle, WA

  • Venue:
  • OOPSLA '04 Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

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.