Background

This was my honours thesis project. It built on two summer internships I completed during the summer of 2000 and 2001 with Software Verification and Research Centre (SVRC) of the University of Queensland. The 2000 summer project was on "Testing Java components" and the 2001 summer project on "Testing Methods for Java monitor components". My supervisor for the project was Professor Paul Strooper. The honour project itself was a year-long subject I took during the final year of my Bachelors of Computer Systems Engineer at the University of Queensland.

Project Overview

This project involved the development of an extension for the popular automated software testing tool JUnit. JUnit is a regression testing framework that is based on test cases and test suites, which are developed using raw Java code. The extension, called JUnit Plus, allows users of JUnit to test concurrent Java programs quickly and easily. The need for this extension and hence the project arises from the fact that Java-based programs are becoming more common placed and thus significant demand exists for tools that allow concurrent Java programs to be tested effectively and efficiently.

Concurrent programs are programs where multiple threads execute statements in parallel. As a result concurrent program’s are non-deterministic by nature. Furthermore, concurrent programs can have errors related to concurrency, such as deadlock, starvation, and livelock, due to the multithread nature of the programs. As such concurrent programs require additional support when being tested. JUnit Plus provides such supports in the form of a clock that regulate the order of thread execution, an automated thread execution method and support for detection of concurrency errors.

Two concurrent programs, ProducerConsumer and SingleLaneBridge, were used to evaluate the effectiveness of JUnit Plus. It was found that a relatively complex concurrent test driver could be developed for JUnit Plus in very little time and the tool was effective in detecting concurrency errors, executing threads automatically and in using the clock to exert control over the execution order of threads. As such the project has been successful in meeting its aim.

Project Output

JUnit Plus

Publication

Thesis

S. Choudhury, “JUnit Tool Support for testing concurrent Java programs,” University of Queensland, 2002.