commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Zeigermann <ozeigerm...@c1-fse.de>
Subject Re: [testutils] Is there any commons area for generic test code?
Date Thu, 10 Jun 2004 14:29:04 GMT
I could contribute a class called RendezvousBarrier. It is simple, but 
very useful when testing stuff in concurrent szenarios and you want to 
make non-deterministic runs of more than one thread deterministic for 
certain tests.

Additionally, I have a set of methods that do comparison on files. They 
include checking the content of text files as well as checking what 
files are in certain directories.

A few other methods as well.

If of any interest I could offer to contribute and maintain all of them 
in a testutils component...

Oliver

Alex Karasulu wrote:

> Hi,
> 
> I've often found it necessary to write some of the same test code
> snippets over and over again.  Namely I'm referring to test cases for
> private methods that use reflection as well as other common snippets of
> code dealing with unit tests.  Some of these snippets could have become
> JUnit extensions.
> 
> Is there a place where we can collect and localize utility methods and
> classes used for unit testing?  I have not found anything yet.
> 
> Is it even worth doing this?
> 
> If the answer is "no", then "yes" to the two questions above, is it
> worth creating a sandbox area where we can start gathering useful
> utilities for unit testing?  
> 
> IMO most projects could benefit from unit testing utilities or
> extensions that do not come out of the box with JUnit or mock objects. 
> Personally I'm looking for a place where I can keep generic test code
> that could be used across projects, while sharing testing strategies and
> techniques with others.  Sometimes nothing better communicates ideas
> than actual code.  So if nothing already exists perhaps we can use this
> area as a place to gather modest utilities; very simple tools.  It can
> grow as demands increase and need not be a full fledged production:
> meaning there is no rush or stress to make it into a release or a
> deliverable.  
> 
> Also perhaps things like the commons collections testing framework could
> be kept here as well.  Don't if this is the right thing to do but just a
> thought.  It might not be a good idea since it is so specific to
> collections but this can be discussed over time.
> 
> Why this email now?
> 
> I sat down this morning to write a few JUnit tests and realized I needed
> to write the same darn utility code over again for common issues I deal
> with while testing.  That's what triggered this email.  9 out of 10
> times I can find existing JUnit AddOns that help but sometimes they need
> to be altered or augmented in some respect.  Rather then impose
> dependencies where I cannot make additions to the code I thought it
> would be nice if we had our own test utilities where additions can be
> made on demand.  I thought for sure others had this wish at some point.
> 
> WDYT?
> 
> Alex
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message