Testing aspect-oriented programs with finite state machines

  • Authors:
  • Dianxiang Xu;Omar El-Ariss;Weifeng Xu;Linzhang Wang

  • Affiliations:
  • National Center for the Protection of the Financial Infrastructure, Dakota State University, Madison, SD 57042, U.S.A.;Department of Computer Science, North Dakota State University, Fargo, ND 58105, U.S.A.;Computer Science Department, Gannon University, Erie, PA 16541, U.S.A.;State Key Laboratory of Novel Software Technology, Department of Computer Science and Technology, Nanjing University, Nanjing 210093, People's Republic of China

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

Quantified Score

Hi-index 0.00

Visualization

Abstract

Aspect-oriented programming yields new types of programming faults due to the introduction of new constructs for dealing with crosscutting concerns. To reveal aspect faults, this paper presents a framework for testing whether or not aspect-oriented programs conform to their state models. It supports two families of strategies (i.e. structure-oriented and property-oriented) for automated generation of aspect tests from aspect-oriented state models. A structure-oriented testing strategy derives tests and test code from an aspect-oriented state model to meet a given structural coverage criterion, such as state coverage, transition coverage, or round trip. A property-oriented testing strategy generates test code from the counterexamples of model checking. Two such strategies are checking an aspect-oriented state model against trap properties and checking mutants of aspect models against system properties. Mutation analysis of aspect-oriented programs is used to evaluate the effectiveness of these testing strategies. The experiments demonstrate that testing aspect-oriented programs against their state models can detect many aspect faults. The comparative evaluations also reveal that the structure-oriented and property-oriented testing strategies complement each other—some aspect faults were detected by the structure-oriented strategies, but not by the property-oriented strategies and vice versa. Copyright © 2010 John Wiley & Sons, Ltd.