Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Multiple Threads for Junit Classes

Thread view: 
sakcee@gmail.com - 28 Apr 2007 15:35 GMT
I was wondering if any one has experience in which multiple Junit
classeshas to be run concurrently and not in a sequential way(or
whichever way Junit runs).  As I understand Junit just scans/gatters
all the files for testcases and run then one by one , it also
introduces its @Before, @After etc tags which do not work as normal
class or object hierarchies e.g. I am not sure but it seems like
events that are triggered instead of object creations.

Now I want to run different threads of  junit classes in same JVM. is
there a way? Right now I am using a JUnitCore object and running each
class with it. and making one thread run one JunitCore. is this
correct?

any help is greatly appreciated , as I have read some junit books and
this information is available nowhere. also the structure of JUnit is
also not clear.

thanks
Arne Vajhøj - 28 Apr 2007 18:27 GMT
> I was wondering if any one has experience in which multiple Junit
> classeshas to be run concurrently and not in a sequential way(or
[quoted text clipped - 12 lines]
> this information is available nowhere. also the structure of JUnit is
> also not clear.

I think running multiple unit tests in parallel to find
bugs is the proper way of doing it.

I think it would be better to have one unit tests that
tested the thread safeness of the code using multiple
threads.

Arne
Patricia Shanahan - 28 Apr 2007 18:45 GMT
>> I was wondering if any one has experience in which multiple Junit
>> classeshas to be run concurrently and not in a sequential way(or
[quoted text clipped - 15 lines]
> I think running multiple unit tests in parallel to find
> bugs is the proper way of doing it.

Did you mean "I don't think running multiple ..."? If so, I would agree.

> I think it would be better to have one unit tests that
> tested the thread safeness of the code using multiple
> threads.

Or, of course, several consecutive tests each of which tests its own
combination of number of threads, initial settings of any random number
generators etc.

Patricia
Arne Vajhøj - 28 Apr 2007 19:33 GMT
>> I think running multiple unit tests in parallel to find
>> bugs is the proper way of doing it.
>
> Did you mean "I don't think running multiple ..."?

Yes.

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.