You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Muirhead <mu...@yahoo.com> on 2006/03/10 18:01:44 UTC

Re: How to bind execution of integration tests to integration-test phase

Back on Feb 11 there was a thread regarding
integration testing with the subject line "How to bind
execution of integration tests to integration-test
phase".

Like Pete, who offered good advice in that thread, I
also need to do in-container testing via Cactus, run
CruiseControl and deploy to OAS/OC4J.

Pete, if you see this posting, I'm interested in a few
additional details about your approach.

1) does your "runtests-integration" project (or
sub-projects) deploy the application (ear file) under
test, or does it assume that the application under
test is already deployed?

2) You said in your posting that "With m2.02 I should
now convert the Antruns to Ant Plugins." Why is that?
Is there a new version of the Ant plugin that provides
some new functionality that obviates the need for
Antrun? I couldn't find any release notes or other
info about the Ant Plugin that suggested anything new.
Can you explain further?

3) You refer to two other modules - "tests-serverside"
and "tests-incontainer". What is the relationship of
the "tests-incontainer" modules to your
"runtests-integration" module(s) and/or your
application module(s)? Is the "tests-incontainer"
artifact (jar) packaged into, and deployed with, your
application ear? Is it packaged and deployed
separately? If the latter, is your
"runtests-integration" module responsible for
deploying that (perhaps inside of a war with the
Cactus jar and its dependency jars)?

4) How do you deploy and configure Cactus and all its
dependencies? Did you set up a "shared library" in
OC4J or deploy them along with the tests?

5) You must have a web app somewhere that gets the
Cactus servlets, filters, etc. in the game, right? Is
it packaged in the ear or separate?

Thanks for any additional info about your approach.

Dave



Dave Muirhead
303-638-4618
muirheadd@yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to bind execution of integration tests to integration-test phase

Posted by Pete <pe...@gmail.com>.
re: 1) My EAR pom.xml copies the ear file to the oc4j applications
directory. I used AntRun to do this copy, antrun bound to install, but I
think a better solution is to use the dependency-plugin (copyfile goal ??
can't remember). So during the 'install' the EAR file redeploys if the
server is already started or is picked up when the server is next started.

re 2) See
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
this allows you to wrap any embedded Ant Script (i.e. with AntRun plugin
would be inside <configuration>  ) into a self contained plugin, that gets
installed/deployed to your company repository.

This is useful where you could have say a startOC4J Ant Plugin that could be
used by multiple projects. Whereas my original solution either had the ant
script embedded, or the <configuration>  called out to an existing ant
script. But this means you can't do a Maven build without getting the ant
script first.

re 3) & 4)  I used JUnitEE, with this you have to have a JAR file container
the incontainer JUnit Tests. so my tests_ServerSide was this. This needed
deploying in WebApp (like Cactus) so I just had the tests_ServerSide as
dependency on the WebApp maven project (also needed classifier tests on the
dependency) . The WepApp was aggregated in the EAR. Webapp was just a normal
maven project packaging war, with a web.xml containing the JUNitEE servlet
e.g.

    <servlet>
        <servlet-name>JUnitEETestServlet</servlet-name>
        <description>JUnitEE test runner</description>
        <servlet-class>org.junitee.servlet.JUnitEEServ let </servlet-class>
        <init-param>
             <param-name>searchResources</param-name>
             <param-value>tests_Serverside-1.0-SNAPSHOT-tests.jar</param-value>

        </init-param>
    </servlet>



On 10/03/06, Dave Muirhead <mu...@yahoo.com> wrote:
>
> Back on Feb 11 there was a thread regarding
> integration testing with the subject line "How to bind
> execution of integration tests to integration-test
> phase".
>
> Like Pete, who offered good advice in that thread, I
> also need to do in-container testing via Cactus, run
> CruiseControl and deploy to OAS/OC4J.
>
> Pete, if you see this posting, I'm interested in a few
> additional details about your approach.
>
> 1) does your "runtests-integration" project (or
> sub-projects) deploy the application (ear file) under
> test, or does it assume that the application under
> test is already deployed?
>
> 2) You said in your posting that "With m2.02 I should
> now convert the Antruns to Ant Plugins." Why is that?
> Is there a new version of the Ant plugin that provides
> some new functionality that obviates the need for
> Antrun? I couldn't find any release notes or other
> info about the Ant Plugin that suggested anything new.
> Can you explain further?
>
> 3) You refer to two other modules - "tests-serverside"
> and "tests-incontainer". What is the relationship of
> the "tests-incontainer" modules to your
> "runtests-integration" module(s) and/or your
> application module(s)? Is the "tests-incontainer"
> artifact (jar) packaged into, and deployed with, your
> application ear? Is it packaged and deployed
> separately? If the latter, is your
> "runtests-integration" module responsible for
> deploying that (perhaps inside of a war with the
> Cactus jar and its dependency jars)?
>
> 4) How do you deploy and configure Cactus and all its
> dependencies? Did you set up a "shared library" in
> OC4J or deploy them along with the tests?
>
> 5) You must have a web app somewhere that gets the
> Cactus servlets, filters, etc. in the game, right? Is
> it packaged in the ear or separate?
>
> Thanks for any additional info about your approach.
>
> Dave
>
>
>
> Dave Muirhead
> 303-638-4618
> muirheadd@yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>