Steven, > -----Original Message----- > From: Ger, Steven M. [mailto:[EMAIL PROTECTED] > Sent: 16 March 2004 23:47 > To: 'Cactus Users List' > Subject: RE: ServletTestRunner ant usage help > > Thanks Vincent. This is definitely helpful but I think this solution is > missing some things I really need. > > 1. All system defined properties (those added in the start script) are > not > present. When run through the ant target they're not found.
Are you passing these properties in your <cactus> task using <sysproperty>? > 2. The classpath used through the URL method is the classpath as defined > by > the ear file. When executed as an ant task the classpath is not the same > as > the classpath found in my ear file. You need to understand that cactus runs in 2 JVMs: one on the client side and one on the server. The server CP is always the one defined by the EAR + container. The client side is the one you specify in the <cactus> task itself. > > One major benefit of exercising a URL such as > http://localhost:7001/myapp/ServletTestRunner?suite=MyTest&xsl=cactus- > report > is that the tests are executed in the container identically as to how a > client would execute them through a web browser. How is that a benefit? Why would you want to execute tests through the browser when you have an automated solution set up? BTW, they are supposed to be executed identically by <cactus>, the browser mode, Maven, etc. I don't see why this should be an issue. > Is there a way to do > this > through cactus? Once again I point to the JUnitEE example: > > <target name="do-run-tests"> > <junitee url="http://your.server:port/myTest/TestServlet" > printsummary="true"> > <test runall="true"/> > </junitee> > </target> There is no task named <junitee> in Cactus. However (and I repeat myself) there are at least 3 tasks that you can do that achieve the same result: <cactus>, <runservertests> and <junit>. The Cactus architecture is as follows: Front end --> [Client side -- HTTP --> Server side] You have a choice of several front ends to run Cactus. If they do not produce the same result you can consider it a bug. In practice it's more likely that you have misconfigured your front end. Hope it helps, -Vincent > > Thanks again, > --Steven > > > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED] > Sent: Monday, March 15, 2004 5:28 PM > To: 'Cactus Users List' > Subject: RE: ServletTestRunner ant usage help > > Hi Steven, > > > -----Original Message----- > > From: Ger, Steven M. [mailto:[EMAIL PROTECTED] > > Sent: 15 March 2004 23:09 > > To: '[EMAIL PROTECTED]' > > Subject: ServletTestRunner ant usage help > > > > Hey all, > > > > I've been using the cactus browser interface (i.e., > > http://localhost:7001/myapp/ServletTestRunner?suite=MyTest&xsl=cactus- > > report > > .xsl) to execute in container tests. All tests are written to support > > this > > interface. I'm trying to automate this with CruiseControl. I'm > looking > > for > > an ant task that will execute the previously mentioned URL and report > on > > the > > results. I've notice JUnitEE has a task such as this: > > > > <target name="do-run-tests"> > > <junitee url="http://your.server:port/myTest/TestServlet" > > printsummary="true"> > > <test runall="true"/> > > </junitee> > > </target> > > > > Does cactus have anything like this? If not can anyone recommend a > > different approach. > > The solution with Cactus is to use the <cactus> Ant task. Please see > http://jakarta.apache.org/cactus/integration/ant/index.html. It provides > even more than the <junitee> task as it can also perform application > deployment/start/stop of containers. > > You can also check the Servlet sample which is part of Cactus > distribution to see it in action. > > Thanks > -Vincent > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
