A framework for table driven testing of Java classes

  • Authors:
  • Nigel Daley;Daniel Hoffman;Paul Strooper

  • Affiliations:
  • Sun Microsystems Inc., 1 Network Drive, UBUR02-306, Burlington;Department of Computer Science, University of Victoria, P.O. Box 3055 STN CSC, Victoria, B.C.;School of Information Technology and Electrical Engineering, Software Verification Research Centre, The University of Queensland, Brisbane, Queensland

  • Venue:
  • Software—Practice & Experience
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

With the advent of object-oriented languages and the portability of Java, the development and use of class libraries has become widespread. Effective class reuse depends on class reliability which in turn depends on thorough testing. This paper describes a class testing approach based on modeling each test case with a tuple and then generating large numbers of tuples to thoroughly cover an input space with many interesting combinations of values. The testing approach is supported by the Roast framework for the testing of Java classes. Roast provides automated tuple generation based on boundary values, unit operations that support driver standardization, and test case templates used for code generation. Roast produces thorough, compact test drivers with low development and maintenance cost. The framework and tool support are illustrated on a number of non-trivial classes, including a graphical user interface policy manager. Quantitative results are presented to substantiate the practicality and effectiveness of the approach.