commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject [testutils] Is there any commons area for generic test code?
Date Wed, 09 Jun 2004 15:25:23 GMT

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

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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message