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] Move JUnit base/utility classes???
Date Wed, 16 Aug 2006 13:25:46 GMT
Andreas Korneliussen wrote:

> David Van Couvering wrote:
>> Sounds good to me...
>> David
>> Daniel John Debrunner wrote:
>>> Currently the JUnit base and utility classes are in this package:
>>> org.apache.derbyTesting.functionTests.util
>>> (See http://wiki.apache.org/db-derby/DerbyJUnitTesting)
>>> I was wondering if they should be moved, for two reasons:
>>>   1) That package is cluttered up with other stuff, it's more or less a
>>> dumping ground. Utilites, JUnit base classes, "user level" classes for
>>> procedures and vtis, etc.
>>>   2) JUnit tests can be much more than funcional tests, e.g. having
>>> system tests as JUnit tests would make them easy for everyone to run.
>>> I was thinking of the following package:
>>> org.apache.derbyTesting.junit
>>> The package would be limited to base classes for JUnit tests and JUnit
>>> related utilities such as the JDBC class. Classes for specific tests, or
>>> those that implement Java procedures for tests etc. would not be
>>> allowed.
>>> The functional tests would continue to live in their current location,
>>> just that the super-class BaseJDBCTestCase would be in the new package.
>>> Thoughts?
> I support moving the utility classes to a new package.
> Below are some thoughts on how Junit tests could be structured, in case
> we would like to also move tests:
> Package for derby-specific utility classes:
> org.apache.derbyTesting.junit.util
>  -> TestConfiguration, JDBCClient, JDBC,..
> Package for common testcase/testsetup classes:
> org.apache.derbyTesting.junit.common
>  -> BaseTestCase, BaseJDBCTestCase, BaseJDBCTestSetup

I'm not sure the split between util and common here is worth it. The
classes in common have a very close relationship with the classes in
util, to my mind it seems they should be together.

> Packages for tests:
>  org.apache.derbyTesting.junit.tests
>  org.apache.derbyTesting.junit.tests.jdbcapi
>  org.apache.derbyTesting.junit.tests.lang
>  org.apache.derbyTesting.junit.tests.store
>  org.apache.derbyTesting.junit.tests. . .

I don't see any value in this, the existing layput looks fine to me.

org.apache.derbyTesting.junit.systemTests.app1 (future)

Though maybe one day some cleanup could happen and some naming
guidlines, e.g.


having test in the name four times seems excessive.

My point was just to get the Junit generic stuff out of the
functionalTest layer since it can apply to so much more. I'm not willing
to spend time moving the existing tests around.


View raw message