Thanks Vincent. I have the following questions regarding running the cactus unit tests along with my other tests. I am running Orion 1.5.2 and jakarta-cactus-13-1.4b1.
1. For my application, the 'cactus.contextURL' is set to http://localhost:80/myapp, this causes the following error (among others) when I tried to run the cactus unit tests using Ant. I guess the testcase testGetRequestDispatcherFromNamedDispatcherOK is looking for the servlet named "TestJsp" under the /myapp context, which is not specified in its web.xml. How do I get around this problem ? [junit] Testcase: testCookieEncoding took 0.11 sec [junit] Testcase: testGetRequestDispatcherFromNamedDispatcherOK took 0.13 sec [junit] FAILED [junit] unable to get NamedDispatcher : TestJsp [junit] junit.framework.AssertionFailedError: unable to get NamedDispatcher : TestJsp [junit] at org.apache.cactus.unit.TestServletTestCase2.testGetRequestDispatcherFromNamedDispatcherOK(Unknown Source) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332) [junit] at org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:235) [junit] at org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:149) 2. Can I change the value of the 'cactus.contextURL' on the fly so that it'll point to the right context at run time ? If so, how do I do this in Ant ? 3. What is the best way to run the test.war out of the box along with other tests. Thank you in advance for your help. chen-ching woo. -----Original Message----- From: Vincent Massol [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 2:23 PM To: 'Cactus Users List' Subject: RE: Must I run the Cactus unit test ? (Newbie alert) Hi, > -----Original Message----- > From: Woo, Chen Ching [mailto:[EMAIL PROTECTED]] > Sent: 29 August 2002 18:39 > To: [EMAIL PROTECTED] > Subject: Must I run the Cactus unit test ? (Newbie alert) > > Hi, > > I'm new to Cactus and (finally) get Cactus running. While I was playing > with the sample-servlet test cases, i noticed that it is running the > cactus's unit test cases as part of the build process. Do I always need > to do this ? Deciding when to run Cactus is up to your development process. However, one of the big feature of Cactus is its ability to run the tests in an automated fashion. I've always found it very useful (actually, even downright crucial!) to run the tests as part of the build. That said, if your tests are taking long you may want to make it optional to run them on development machines but triggering them during nightly builds for example. Hope it helps -Vincent > > -- > To unsubscribe, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
