Multi-threaded Testing with AOP Is Easy, and It Finds Bugs!

We investigate the suitability of AOP (Aspect Oriented Programming) for testing tools by trying to implement the ConTest testing tool using AspectJ, a tool that implements AOP for the Java programming language. We examine whether the entire set of features can be implemented this way, in the context of the larger problem where moving to a higher level of abstraction means that some details cannot be implemented. Our conclusion from this exercise is that AOP is very suitable for the implementation of a number of classes of test tools. These include multi-threaded noise makers such as ConTest, in addition to coverage analyzers, data-race detectors, network traffic simulators, runtime bug pattern detectors, and others. The main advantage is that the instrumentation part of the tool creating method, which usually contains little scientific contribution but consumes most of the work, becomes much easier to perform and requires less expertise. In our specific exercise, a task that took more than half a year and required specialized knowledge, was reduced to two weeks work by a relative novice.

[1]  Assaf Schuster,et al.  Toward Integration of Data Race Detection in DSM Systems , 1999, J. Parallel Distributed Comput..

[2]  Scott D. Stoller,et al.  Testing Concurrent Java Programs using Randomized Scheduling , 2002, RV@FLoC.

[3]  James R. Larus,et al.  Protocol-based data-race detection , 1998, SPDT '98.

[4]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[5]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[6]  Satoshi Matsuoka,et al.  ECOOP'97 — Object-Oriented Programming , 1997, Lecture Notes in Computer Science.

[7]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[8]  Klaus Havelund,et al.  Model checking JAVA programs using JAVA PathFinder , 2000, International Journal on Software Tools for Technology Transfer.

[9]  Eitan Farchi,et al.  Multithreaded Java program test generation , 2002, IBM Syst. J..

[10]  Jong-Deok Choi,et al.  Deterministic replay of Java multithreaded applications , 1998, SPDT '98.

[11]  Scott D. Stoller,et al.  Model-checking multi-threaded distributed Java programs , 2000, International Journal on Software Tools for Technology Transfer.

[12]  Bilha Mendelson,et al.  Automatic detection of immutable fields in Java , 2000, CASCON.

[13]  James M. Bieman,et al.  The relationship between test coverage and reliability , 1994, Proceedings of 1994 IEEE International Symposium on Software Reliability Engineering.

[14]  James C. Corbett,et al.  Bandera: extracting finite-state models from Java source code , 2000, ICSE.

[15]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.