I believe an ear file can contain ejbs, war's, webapps (not warr'd up),
supporing libs and probably other stuff too.
I am using a cactus (cactified) war file for testing an ejb contained with
an ear. In my environment, I have one ear file which contains my ejb to be
tested and its supporting libs. This is what I'm going to deploy to
production.
I have another war file, test.war. It's a cactified war which contains all
my class files from my application and all the needed libraries in the
WEB-INF/lib folder. I create this war with the following task
<target name="test.ejb.createwar" depends="init" description="deploy the
ejb test.war">
<cactifywar mergewebxml="ServletTestRunnerIntegration.xml" version="2.3"
destfile="test.war">
<classes dir="${basedir.build.projectname.web-inf.classes}"
includes="**/*.class" />
<lib dir="${basedir.build.projectname.web-inf.lib}">
<include name="*.jar" />
</lib>
</cactifywar>
</target>
then the war gets "deployed" to the domain i run my tests under (my ear file
mentioned above is expected to be already deployed ...
<target name="test.ejb.copywar" depends="test.ejb.createwar"
description="copies the ejb test.war">
<delete>
<fileset dir="/bea/weblogic/config/${internet.domain.name}"
includes="**/test.war"/>
</delete>
<copy file="test.war"
toFile="/bea/weblogic/config/${internet.domain.name}/applications/test.war"/
>
</target>
these are both run prior to the below runservertests task. Are you testing
servlets or ejb's? Both? Cactus needs to cactify a war file so that it can
run the tests through it's servlet or jsp.
> -----Original Message-----
> From: Bret Kumler [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 14, 2003 12:46 PM
> To: Mark Lybarger
> Subject: RE: runservertests task - multiple startTargets, stopTargets
>
>
> Forgive my ignorance as I am not a J2EE expert, but I thought
> you can only
> have ejbs in an .ear file.
>
> We have an .ear file with all our classes & xml files in it.
>
> I extract the .ear file, I add a .war file to it, which
> contains the cactus
> libs & our test classes.
> I modified the application.xml to add the new war file.
>
> I change the ant script to be similar to yours.
>
> Only thing is I don't use cactus warfile
>
>
> Ant ideas?
>
> Thanks
>
> -----Original Message-----
> From: Mark Lybarger [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 11:41 AM
> To: '[EMAIL PROTECTED]'; 'Cactus-User (E-mail)
> Subject: RE: runservertests task - multiple startTargets, stopTargets
>
>
> no, I don't use startup/shutdown within the containerset. i
> have separate
> tasks that startup/shutdown the servers. and its controlled by the
> runservertests task.
>
> <target name="run.cactus.tests" depends="init,test.ejb.copywar"
> description="execute cactus tests">
> <runservertests
>
> testURL="http://localhost:${internet.domain.port}/test/Servlet
> Redirector?Cac
> tus_Service=RUN_TEST"
> startTarget="cactus.start.weblogic6x"
> stopTarget="stop.mydomain"
> testTarget="test.ejb" />
> </target>
>
>
> have you sifted through the output of running ant with the
> -debug flag?
>
> > -----Original Message-----
> > From: Bret Kumler [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 10, 2003 3:25 PM
> > To: Mark Lybarger
> > Subject: RE: runservertests task - multiple startTargets,
> stopTargets
> >
> >
> > Here's what mine looks like.
> >
> > <target name="test" depends="start.weblogic.81"
> > description="Run the tests
> > against weblogic 8's container">
> > <!-- Run the tests -->
> > <cactus
> > earfile="${base.dir}/pm-tests/${test.file}" fork="yes"
> > failureproperty="tests.failed">
> > <classpath>
> > <path refid="project.classpath"/>
> > <pathelement
> > location="${pm.required.libs}/qa-test.jar"/>
> > </classpath>
> > <containerset>
> > <generic name="Weblogic 8.1.1"
> > port="${test.port}">
> > <startup
> > target="start.weblogic.81"/>
> > <shutdown
> > target="stop.weblogic.81"/>
> > </generic>
> > </containerset>
> > <formatter type="brief" usefile="false"/>
> > <formatter type="xml"/>
> > <batchtest>
> > <fileset dir="${pm.test.src}">
> > <include name="**/Qa*.java"/>
> > <exclude name="**/Qa*All.java"/>
> > </fileset>
> > </batchtest>
> > </cactus>
> > <!-- Generate the JUnit reports -->
> > <junitreport
> > todir="${base.dir}/${modification.location}/weblogic8x">
> > <fileset
> > dir="${base.dir}/${modification.location}/weblogic8x"
> > includes="TEST-*.xml"/>
> > <report
> > todir="${base.dir}/${test.reports.loc}/weblogic8x"
> > format="frames"/>
> > </junitreport>
> > <fail if="tests.failed">At least one test failed!</fail>
> > </target>
> >
> > -----Original Message-----
> > From: Mark Lybarger [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 10, 2003 11:16 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: runservertests task - multiple startTargets,
> stopTargets
> >
> >
> > it shouldn't be any different in executing the tests. here's
> > my task to run
> > the tests. i'm testing an ejb
> >
> >
> > <target name="test.ejb" depends="init">
> > <cactus warfile="test.war" printsummary="withOutAndErr">
> > <formatter type="plain" />
> > <classpath>
> > <path refid="ejbdoclet.classpath" />
> > <pathelement
> > location="${basedir.build.mysystem.web-inf.classes}" />
> > </classpath>
> > <containerset>
> > <generic name="${internet.server.name}"
> > port="${internet.domain.port}" />
> > </containerset>
> > <batchtest>
> > <fileset dir="${basedir.build.mysystem.web-inf.classes}">
> > <include name="**/MyTestBeanTest.class" />
> > </fileset>
> > </batchtest>
> > </cactus>
> > </target>
> >
> >
> > > -----Original Message-----
> > > From: Bret Kumler [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, October 10, 2003 3:07 PM
> > > To: Mark Lybarger
> > > Subject: RE: runservertests task - multiple startTargets,
> > stopTargets
> > >
> > >
> > > I've been trying to get it working on WLS 8.1
> > >
> > > I have it starting the server, but it never executes the tests..
> > >
> > > -----Original Message-----
> > > From: Mark Lybarger [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, October 10, 2003 9:55 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: runservertests task - multiple startTargets,
> > stopTargets
> > >
> > >
> > > wls 6.1
> > >
> > > > -----Original Message-----
> > > > From: Bret Kumler [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, October 10, 2003 1:47 PM
> > > > To: Mark Lybarger
> > > > Subject: RE: runservertests task - multiple startTargets,
> > > stopTargets
> > > >
> > > >
> > > > I have an question off your topic.
> > > >
> > > > What version of weblogic are you using for your tests?
> > > >
> > > >
> > > >
> > > >
> > > > ---
> > > > Incoming mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
> > > >
> > > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
> > >
> > >
> > >
> > >
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
> > >
> > >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
> >
> >
> >
> >
> >
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
> >
> >
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
>
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]