Aspect-Oriented Programming for Guided Testing

Siyuan Liu, Yang Yang · 2016

Distributed and multithreaded systems are usually much more complex to analyze or test due to the nondeterminism involved.A possible approach to testing nondeterministic systems is to direct the execution of the program under test to take a certain path for each test, so that a unique output (or output sequence) can be observed.Considering specification-based testing, we assume that a test case is given together with a test constraint for directing the internal nondeterministic choices.To instruct the program under test to execute according to a given test constraint, the program under test needs to communicate with the tester.In this work, we propose to use the features in Aspect-Oriented Programs to realize such communication.This solution does not require the availability of the source code of the program under test.Assuming that the program under test consists of a set of Java multithreaded processes communicating with each other using sockets, we provide an automated translation from a test constraint to a set of aspects using AspectJ.

Read the paper · More papers on PaperTik