A testing strategy for abstract classes

  • Authors:
  • Peter J. Clarke;James F. Power;Djuradj Babich;Tariq M. King

  • Affiliations:
  • School of Computing and Information Sciences, Florida International University, 11200 S.W 8th Street, Miami, FL 33199, U.S.A.;Department of Computer Science, National University of Ireland, Maynooth, Co. Kildare, Ireland;School of Computing and Information Sciences, Florida International University, 11200 S.W 8th Street, Miami, FL 33199, U.S.A.;Department of Computer Science, North Dakota State University, Fargo, ND 58108, U.S.A.

  • Venue:
  • Software Testing, Verification & Reliability
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the characteristics of the increasingly widespread use of object-oriented libraries and the resulting intensive use of inheritance is the proliferation of dependencies on abstract classes. Since abstract classes cannot be instantiated, they cannot be tested in isolation using standard execution-based testing strategies. A standard approach to testing abstract classes is to instantiate a concrete descendant class and test the features that are inherited. This paper presents a structured approach that supports the testing of features in abstract classes, paying particular attention to ensuring that the features tested are those defined in the abstract class. Two empirical studies are performed on a suite of large Java programs and the results presented. The first study analyses the role of abstract classes from a testing perspective. The second study investigates the impact of the testing strategy on the programs in this suite to demonstrate its feasibility and to comment on the pragmatics of its use. Copyright © 2010 John Wiley & Sons, Ltd.