jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bret Kumler" <bkum...@firstam.com>
Subject RE: runservertests task - multiple startTargets, stopTargets
Date Tue, 14 Oct 2003 20:20:30 GMT
I'll look in to it to make sure it's getting deployed.

-----Original Message-----
From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
Sent: Tuesday, October 14, 2003 11:23 AM
To: 'Cactus Users List'
Subject: RE: runservertests task - multiple startTargets, stopTargets


Do you see errors in your weblogic logs files?  Are you certain that the
cactified war (within your ear) is getting deployed? Is your ear file
actually getting deployed to weblogic?   You can verify your ear and
cactified war using the browser integration 

http://jakarta.apache.org/cactus/integration/integration_browser.html



> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@firstam.com]
> Sent: Tuesday, October 14, 2003 2:10 PM
> To: Cactus Users List
> Subject: RE: runservertests task - multiple startTargets, stopTargets
> 
> 
> I do have a cactifywar task.
> 
> <cactifywar srcfile="${pm.required.libs}/test.war"
>         		destfile="${base.dir}/test.war"
>         		
> mergewebxml="${base.dir}/cactus-templates/WEB-INF/cactus-web.xml">
> 			<lib file="${httpunit-jar}"/>
> 			<lib file="${cactus-ant-jar}"/>
> 			<lib file="${nekohtml-jar}"/>
> 			<lib file="${log4j.jar}"/>
> 			<lib file="${pm.required.libs}/netui-util.jar"/>
> 			<lib 
> file="${pm.required.libs}/commons-lang-1.0.1.jar"/>
> 			<lib file="${pm.required.libs}/LoggerHelp.jar"/>
> 			<lib file="${pm.required.libs}/qa-test.jar"/>
> 			<lib
> file="${base.dir}/${modification.location}/${path-to-new-pmjws
> -web.xml}/lib/
> pm.jar"/>
> 			<lib
> file="${base.dir}/${modification.location}/${path-to-new-pmjws
> -web.xml}/lib/
> common.jar"/>
> 			<classes dir="${conf.test.dir}" 
> includes="log_server.properties"/>
> </cactifywar>
> 
> 
> I'm trying to use the cactus ear file.
> 
> 
> <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>
> 
> The problem is it never executes the tests.  It starts the 
> server but no
> tests are ever executed.
> 
> I ran ant -debug, but didn't see any issues.
> -----Original Message-----
> From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
> Sent: Tuesday, October 14, 2003 10:00 AM
> To: 'Cactus Users List'
> Subject: RE: runservertests task - multiple startTargets, stopTargets
> 
> 
> it sounds like you're not using the cactifywar task in your 
> ant script? you
> need a cactified war to run the tests.
> 
> > -----Original Message-----
> > From: Bret Kumler [mailto:bkumler@firstam.com]
> > Sent: Tuesday, October 14, 2003 1:43 PM
> > To: Mark Lybarger; 'Cactus-User (E-mail)
> > Subject: RE: runservertests task - multiple startTargets, 
> stopTargets
> >
> >
> > I catify the war file, only thing I do is I place the
> > cactified war file
> > back in to the .ear file & I add the following to the 
> applicatrion.xml
> >
> > <module>
> >    <web>
> >        <web-uri>test.war</web-uri>
> >        <context-root>test</context-root>
> >    </web>
> > </module>
> >
> >
> > We're testing ejbs & servlets.
> >
> > So what you're saying is:
> > 1.  Seperate the .war from the .ear,
> > 2.  Copy the application classes/libs/ejb, etc in to the
> > cactified war along
> > with the test classes.
> 
> deployable ejb's do not go into the cactified war that i'm 
> using.  i put the
> class files there just because it's easier.  i hear you can 
> use a cactified
> ear file for doing cactus testing, but i haven't tried it.
> 
> 
> > 3.  The cactus web application can be named something else.
> > 4.  Deploy the .ear as we would normally.
> > 5.  Execute the tests against the .war instead of the .ear.
> >
> > Is this correct?
> 
> basically, yes. this is how _my_ setup is.  the cactified war 
> contains the
> test cases (myEjbTest.class) and anything needed to run them. 
>  The test
> cases do a jndi lookup to get the remote interface to the ejb that i'm
> testing.  i haven't tested servlets so i don't know how that 
> differs.  I
> think you can cactify an ear file the same as a war file.
> 
> >
> >
> > Thanks
> >
> >
> >
> > -----Original Message-----
> > From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
> > Sent: Tuesday, October 14, 2003 9:10 AM
> > To: 'bkumler@firstam.com'; 'Cactus-User (E-mail)
> > Subject: RE: runservertests task - multiple startTargets, 
> stopTargets
> >
> >
> > 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}/applicati
> > ons/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:bkumler@firstam.com]
> > > 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:Mark.Lybarger@CBC-Companies.com]
> > > Sent: Friday, October 10, 2003 11:41 AM
> > > To: 'bkumler@firstam.com'; '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:bkumler@firstam.com]
> > > > 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:Mark.Lybarger@CBC-Companies.com]
> > > > Sent: Friday, October 10, 2003 11:16 AM
> > > > To: 'bkumler@firstam.com'
> > > > 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:bkumler@firstam.com]
> > > > > 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:Mark.Lybarger@CBC-Companies.com]
> > > > > Sent: Friday, October 10, 2003 9:55 AM
> > > > > To: 'bkumler@firstam.com'
> > > > > Subject: RE: runservertests task - multiple startTargets,
> > > > stopTargets
> > > > >
> > > > >
> > > > > wls 6.1
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Bret Kumler [mailto:bkumler@firstam.com]
> > > > > > 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?
> > > > > >
> > > > > >
> > > > > >
> 
> ---
> 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: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> ---
> 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: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




Mime
View raw message