geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Blewitt <Alex.Blew...@ioshq.com>
Subject Re: [Testing] New test directory(s)
Date Tue, 12 Aug 2003 19:25:57 GMT
On Tuesday, Aug 12, 2003, at 18:02 Europe/London, Bruce Snyder wrote:

> This one time, at band camp, Alex Blewitt said:
>
> AB>Can someone set up the Maven project structure to have the two 
> types of
> AB>test? If we can't have two test directories for source code, then 
> can
> AB>we agree on a naming convention like org.apache.geronimo for unit
> AB>tests, and usecase.Xxx or test.Xxx (such as
> AB>usecase.j2ee.ejb.DeploymentUseCase) to allow the two to be 
> separated?
>
> There's already a directory structure like so:
>
>     src/java
>     src/test
>
> We need to keep all the tests in their respective package structure for
> the testing of protected and package scoped objects. I suggested 
> earlier
> that we add:
>
>     src/spec-test
>
> which is where the specification tests will live. Is this acceptable?

There may be a difference between 
testing-that-it-meets-the-J2EE-specification and 
testing-that-a-user-can-do-what-they-want. There may be an overlap 
between the two, but that doesn't imply they are one and the same. I 
believe that a test to verify specification compliance will essentially 
be a low-level test (an ejbCreate must have an associated 
ejbPostCreate, for example). However, use-cases will be bigger than 
this (such as taking an EJB, running it through the 
verifier/deployer/installer, and then checking it can be accessed via 
JNDI).

So I think that 'spec-test' may be unnecessarily specific to 
specification testing if that is the alternative name.

Of course, no reason why we couldn't have 3 test directories; 
unit-test, spec-test and use-case-test (or just use-case)

> AB>Also, if use-case tests are going to be different from unit-tests, 
> do
> AB>we want to use/allow a different suffix other than XxxTest.java?
>
> How about *SpecTest.java?

Same as point above. Not all SpecTests will necessarily be 
UseCaseTests, and IMHO UseCaseTest is a silly name; perhaps XxxUseCase 
would be better.

Is XxxSpecTest that meaningful? Well, if it's in a separate directory 
for specification tests anyway, not really that necessary. For that 
matter, if we have a bunch of use-cases, then if they're in a separate 
directory we could just life with the InstallAndRetrieveEJBTest.java 
type names rather than specific extension types. Anyone else have any 
other preferences/ideas?

Alex.


Mime
View raw message