db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: [junit] jdbcapi suite runs JUnit tests as a suite, not as individual tests.
Date Mon, 14 Aug 2006 15:46:58 GMT
Kristian Waagan wrote:

> Daniel John Debrunner wrote:
> 
>> With revision 431195 I modified the old test harness jdbcapi.runall
>> suite to run most of its JUnit tests through the single test/suite
>> jdbcapi._Suite. This _Suite can also be run directly by JUnit test
>> runners, though that yet does not install the security manager. The two
>> JUnit tests left in jdbcapi.runall are just because I didn't get round
>> to them, I think they were added after I created the _Suite (or I missed
>> them).
> 
> 
> Hi Dan,
> 
> I see that tests are added in two different ways; either with
> TestSuite.addTest(ATestClass.suite()) and
> TestSuite.addTestSuite(SomeTestClass.class). Now, if I decide to add a
> suite-method to SomeTestClass, then the logic I put into it will not be
> executed if I forget to update the _Suite.suite-method.
> 
> Is this something we should:
>  a) catch during review
>  b) document in a checklist or similar
>  c) see if JUnit already has functionality for
>  d) write a utility method for, that checks for a suite-method and uses
> it if it is available

I hit this problem during the switch to _Suite and I noticed it when the
logic I had added was not executed, ie. the _Suite test continued to
fail when running with the DB2 client. So that's one way of checking. :-)

I would exclude d) as an option as I believe that adding JUnit tests in
Derby should fit the typical JUnit pattern so that others used to JUnit
don't have to learn new tricks.

Dan.



Mime
View raw message