File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Testing and the fly likes junit and multithreaded tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "junit and multithreaded tests" Watch "junit and multithreaded tests" New topic

junit and multithreaded tests

viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
Are there any problems with JUnit and Multithreaded Tests. If so, can anyone
please provide some examples?

Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
"I don't know any useful way to test multi-threading to find anything but
the most trivial bugs. My experience is that we can write a billion tests
and run them forever, and the system deadlocks 40 milliseconds after
deployment." - Ron Jeffries, agile-testing mailinglist

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jeff Langr
Ranch Hand

Joined: May 14, 2003
Posts: 799
... which is not to say you can't try. Here's one way:
First, however, learn how to build multithreaded applications that are designed to behave well. Doug Lea's Concurrency in Java is regarded as the bible, but it's very difficult to read.

Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
I agree. Here's the link:
subject: junit and multithreaded tests
It's not a secret anymore!