Home
CV
UPE
Contact

Projects
Funding
Publications

### Teaching

Fall 2018
CS163: Java (CS1) - No Prior Programming

Service Record

# Dataflow Testing of AspectJ programs

### Personnel

Faculty:
Sudipto Ghosh, Email: ghosh .At. cs.colostate.edu

### Description

Data-flow testing approaches have been used for procedural and object-oriented (OO) programs, and empirically shown to be effective in detecting faults. However, few such approaches have been proposed for aspect-oriented (AO) programs. In an AO program, data-flow interactions can occur between the base classes and aspects, which can affect the behavior of both. Faults resulting from such interactions are hard to detect unless the interactions are specifically targeted during testing.

In this research, we propose a data-flow testing approach for AO programs. In an AO program, an aspect and a base class interact either through parameters passed from advised methods in the base class to the advice, or by the direct reading and writing of the base class state variables in the advice. We identify a group of def-use associations (DUAs) that are based on the base class state variables and propose a set of data-flow test criteria that require executing these DUAs. We identify fault types that result from incorrect data-flow interactions in AO programs and extend an existing AO fault model to include these faults. We implemented our approach in a tool that identifies the targeted DUAs by the proposed criteria, runs a test suite, and computes the coverage results.

We conducted an empirical study that compares the cost and effectiveness of the proposed criteria with two control-flow criteria. The empirical study is performed using four subject programs. We seeded faults in the programs using three mutation tools, \textit{AjMutator}, \textit{Proteum/AJ}, and $\mu$Java. We used a test generation tool, called RANDOOP, to generate a pool of random test cases. To produce a test suite that satisfies a criterion, we randomly selected test cases from the test pool until required coverage for a criterion is reached.

### Conference

1. "A Dataflow Testing Approach for Aspect-Oriented Programs", F. Wedyan and S. Ghosh, Proceedings of the 12th IEEE International High Assurance Systems Engineering Symposium (HASE), pp. 64-73, San Jose, USA, November 1-4, 2010.

2. "A Joinpoint Coverage Measurement Tool for Evaluating the Effectiveness of Test Inputs for AspectJ Programs", F. Wedyan and S. Ghosh, Proceedings of the 19th International Symposium on Software Reliability Engineering (ISSRE), pp. 207-212, Seattle, Washington, November 11-14, 2008.