Research Article
Framework for testing multi-threaded Java programs
Article first published online: 12 FEB 2003
DOI: 10.1002/cpe.654
Copyright © 2003 John Wiley & Sons, Ltd.
Issue
1532-0634/asset/cover.gif?v=1&s=6094df24c795ce080ff6df6ff3b6bcec19adb708)
Concurrency and Computation: Practice and Experience
Special Issue: ACM 2001 Java Grande-ISCOPE (JGI2001) Conference
Volume 15, Issue 3-5, pages 485–499, March - April 2003
Additional Information
How to Cite
Edelstein, O., Farchi, E., Goldin, E., Nir, Y., Ratsaby, G. and Ur, S. (2003), Framework for testing multi-threaded Java programs. Concurrency and Computation: Practice and Experience, 15: 485–499. doi: 10.1002/cpe.654
Publication History
- Issue published online: 12 FEB 2003
- Article first published online: 12 FEB 2003
- Manuscript Revised: 21 JAN 2002
- Manuscript Received: 16 AUG 2001
- Abstract
- References
- Cited By
Abstract
Finding bugs due to race conditions in multi-threaded programs is difficult, mainly because there are many possible interleavings, any of which may contain a fault. In this work we present a methodology for testing multi-threaded programs which has minimal impact on the user and is likely to find interleaving bugs. Our method reruns existing tests in order to detect synchronization faults. We find that a single test executed a number of times in a controlled environment may be as effective in finding synchronization faults as many different tests. A great deal of resources are saved since tests are very expensive to write and maintain. We observe that simply rerunning tests, without ensuring in some way that the interleaving will change, yields almost no benefits. We implement the methodology in our test generation tool—ConTest. ConTest combines the replay algorithm, which is essential for debugging, with our interleaving test generation heuristics. ConTest also contains an instrumentation engine, a coverage analyzer, and a race detector (not finished yet) that enhance bug detection capabilities. The greatest advantage of ConTest, besides finding bugs of course, is its minimal effect on the user. When ConTest is combined into the test harness, the user may not even be aware that ConTest is being used. Copyright © 2003 John Wiley & Sons, Ltd.

1532-0634/asset/olbannerleft.gif?v=1&s=a4e4e145787de94e1d91eaab3c8c29d8a9d96a26)