Tets Case for Multithreaded Class
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Neelesh_Tripathi
Posted On:   Friday, May 6, 2005 05:55 PM

Hi ,
I have multi thread class which impliments runnbale interface. How do I write a test case to test the run method of this class ??

Thanks,

Neelesh

Re: Tets Case for Multithreaded Class

Posted By:   Stephen_Smith  
Posted On:   Monday, July 25, 2005 09:46 AM

Do you want to test the logic within your definition of Runnable#run(), or test that your class is properly multi-threaded? If it's the former, extract the desired logic within your definition of Runnable#run to a separate method and write a single-threaded test case.


If it's the latter, check out GroboUtils (http://today.java.net/pub/a/today/2003/08/06/multithreadedTests.html).

About | Sitemap | Contact