Comments below (changed subject to reflect new discussion thread)

> Lets say you put it in .../test/cmp2/.
> 
> Test cases go in .../test/cmp2/test. They should be named
> *UnitTestCase.java or *StressTestCase.java. They should descend from
> JBossTestCase.
> 
> Typically you will have an application to test, say 
> Example.ear.  Assuming
> you want to deploy it for a whole TestCase class worth of 
> tests (rather
> than un/redeploy it between tests), use a JBossTestSetup like 
> this in your
> testcase:
> 
>    public static Test suite() throws Exception
>    {
>       return getJ2eeSetup(MyCMP2UnitTestCase.class, "Example.ear");
>    }
> 
> This will deploy Example.ear once before any tests from 
> MyCMP2UnitTestCase
> and undeploy it after all are complete.
> 
> Put the bean classes in .../test/cmp2/bean (or .../ejb), 
> interfaces (if not
> xdoclet-generated) in .../test/cmp2/interfaces
> 
> Put ejb-jar.xml and other config files in .../src/resources/cmp2/....
> 
> Put instructions for building the ears in the build.xml, it 
> should end up
> in output/lib. As far as I am concerned you don't need to package the
> */test/*TestCase code, although it may be getting jarred up anyway. 
> Personally I am only interested in running tests from ant, 
> where the test
> class files work fine.
> 
> Tests named *UnitTestCase will be run from the tests-unit 
> target.  You can
> run all cmp2 tests with -Dtest=cmp2 test or one test class with
> -Dtest=MyCMP2UnitTestCase one-test.
> 
> Thanks!
> 
> david jencks
> 

Is this structure imposed by the build system or is it just a convention?  I
have a set of test that are based on the cmp 2 section "10.3.7 Assignment
rules for relationships" of the ejb 2.0 spec.  There are test for each
relation type (1-n bi, 1-n uni, n-1 uni ...) and mapping style (fk, fk with
back pointers, and relation-table).  That is about 14 unit tests.  Anyway I
have these organized into sub-packages under the org.jboss.test.relationship
package.  I can't merge them all into package as each type has it's own set
of 'A' / 'B' interfaces.  Should I leave them organized into sub packages or
should I eliminate the top level relationship package?

The other issue I have is my tests use a, yet to be completed, extension to
JUnit which runs the tests on the serverside (I wrote this).  This is
required for testing local interfaces which by definition are not accessible
remotely.  Anyway, how do I go about adding the code to the build system.
It is in the package net.sourceforge.junitejb.*

-dain

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to