commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <...@apache.org>
Subject Re: [PATCH][Collections] New testing framework, patch #1
Date Sun, 09 Jun 2002 17:56:44 GMT
Sorry its taken so long to review your patches.  Now that I've had the 
chance, I wish I was able to take a look sooner. 

On Thu, 30 May 2002, Jack, Paul wrote:
> Okay, so the goal was to be able to modularize the 
> tests in such a way that objects that return a collection
> or map could have those return values tested using
> TestMap, TestCollection etc.

right.

> How I decided to handle that was to create a new
> implementation of junit.framework.Test, that allows
> you to specify "bulk test" methods in addition to
> the usual simple test methods:

I'm agreeing with your intent here (i.e. the addition of the bulk test
methods), however I disagree with reimplementing Test.  My main
objection is that you are reimplementing parts of JUnit and missing some
of the functionality that it provided.  Namely, the ability to extract
the testing hierarchy.

While the hierarchy isn't readily visible when run using the textui (the 
junit test runner that's run automatically as part of the commons 
build), it is useful to have when using JUnit's swing UI.  I'd really 
like to be able to see a hierarchy that looks something like this:

 TestAll
   TestArrayIterator
   ...
   TestSequencedHashMap
     testMapGet
     ...
     testYoungest
     testYoungestReplaceNullWithValue
     entrySet
       testSize
       testFoo
       testBar
     keySet
       testSize
       testFoo
       testBar
     ...
   TestFastArrayList
     testSearch
     testNewArrayList
     subList
       testFoo
       testBar

You've put a lot of work into getting these tests up and running, and it
has exposed some problems with existing implementations, so your work
isn't without merit.  In fact, I'm inclined to commit it, I would just
rather see something that utilizes JUnit's TestSuite (by subclass
probably since it doesn't support "bulkTest") so that a proper test
hierarchy can be built.  Therefore, I'm going to hold off a little bit 
to see if any other collections committers care to comment on the above.  

regards,
michael


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


Mime
View raw message