Thanks for the feedback Barrie and Wendy.  The inclusion of the assembly
worked great, the admins and I thank you.  Wendy, I've downloaded the book
and read it, as well as viewed your example pom, but I'm still having a
difficult time getting my mind around how to do this.  We run our own custom
version of jboss with several modifications.  I have created a zip with the
server and installed it on our intranet maven 2 area.  I have the following
plug in declared.

<plugin>
    <groupId>org.codehaus.cargo</groupId>
     <artifactId>cargo-maven2-plugin</artifactId>
          <configuration>
               <container>
                   <containerId>jboss3x</containerId>
                     <zipUrlInstaller>
                       <url>

http://homer.nine.homelinux.com/jboss/jboss-3.2.6-default-with-clustering.zip
                        </url>
                      <installDir>${installDir}</installDir>
                    </zipUrlInstaller>
                  </container>
              </configuration>
        </plugin>

When cargo downloads the zip file, it extracts it then I receive this error

org.codehaus.cargo.container.ContainerException: Invalid JBoss installation:
[C:\development\server\integrationserver\jboss-
3.2.6-default-with-clustering\jboss-3.2.6\lib\endorsed] is an empty
directory

We're using Jboss 3.2.6.  It runs fine with without endorsed when using the
run.bat as well as run.sh.  So I have a few questions that I could really
need your help with.

1. Any ideas where to start fixing the error above?  Why does it need this
directory?

2. Is there any good documentation/examples on how to configure what
artifact gets deployed and where?  My integration test artifact generates an
ear, I don't want to copy it to the "deploy" directory, I want to copy it to
the "farm" instead of directory so we can test it in clustered mode.

3. How do I lay out my projects for integration testing?  I have 3 projects.

messageDrivenPojo
messageDrivenDelegate
messageDrivenSender

I need to integration test both messageDrivenSender and
messageDrivenDelegate.  Message driven delegate integration tests should
produce an ear that includes the delegate and a test POJO the sender needs
to start and connect to JMS, send a message, and then the delegate needs to
acknowledge the return.  How can I correctly assert the receive to the
integration-tests when the messageDrivenDelegate is running in Jboss?  Also,
what project structure do I lay out, do I use the following?

src/integration-tests/java
src/integration-test/resources

I'm not clear on how to include this as a project, but exclude the tests
from the unit tests, and only run them during the integration tests, and I
can't find any documentation on it.

Thanks,
Todd


On 8/30/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:

On 8/30/06, Todd Nine <[EMAIL PROTECTED]> wrote:

> 2. I have a project that has both unit tests and integration tests.  The
> unit tests use mock objects and obviously execute automatically when
test is
> performed.  How do I specify the tests that need to run for integration
> testing?  Also note that I will need to start Jboss in the
> pre-integration-test phase and shut it down in the post-integration-test
> phase.  I'm trying the codehaus mojo plug in, but it doesn't quite work
as
> expected, I may end up using cargo.  Does anyone have a strong opinion
of
> cargo and any relevant experience?

Yes. Cargo is great. :)

Maven doesn't handle having both unit _and_ integration tests in the
same module very well yet.  If you have the option, move the
integration tests to a separate module.  There is an example of this
in the 'Better Builds with Maven' book:
http://www.mergere.com/m2book_download.jsp

If not, and you have to keep the tests together, here's a simple example:

http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-blank/pom.xml

You have to play around with the includes/excludes so the integration
tests don't run during 'mvn test'.  Then you reverse the pattern when
the "itest" profile is active.  You can also see the configuration for
Cargo, which gets used in the CargoTestSetup class to start and stop
the container.

Please come join us on the mailing lists if you have more questions about
Cargo:
  http://cargo.codehaus.org/Mailing+Lists

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to