|
Hello,
I am using the
CactusStrutsTestCase class to test Struts Actions using Cactus.
I am all confused by the configuration. This is
my current setup:
- NetBeans IDE v3.5
- Tomcat 4.1.24
- Cactus 1.4.1
- Struts 1.0
- StrutsTest 1.9.6
------------------------------------------------------------------------------------------------------------
1. Web App (Classes under Test -
http:\\localhost:8080\bulletinBoard):
c:\jakarta-tomcat-4.1.24\webapps\bulletinBoard\WEB-INF\lib\argyle.jar
(this JAR includes:
org.cait.argyle.module.bulletinBoard.struts.action.AddTopicAction
2. Test Files
(Cactus):
c:\jakarta-tomcat-4.1.24\webapps\bulletinBoard\TestAddTopicAction
------------------------------------------------------------------------------------------------------------
1) Is this setup correct?
2) According to the documentation I put the Cactus'
properties files as follows:
"Client Side":
I added the cactus.properties
and log4j.properties to my CLASSPATH in NetBeans by right-clicking and set "Add
to Project".
"Container Side":
- cactus.properties and log4j
at: ...\webapps\bulletinBoard\
but every time I try to run my tests, Cactus
complains with the following errors:
.E
Time: 0.07 There was 1 error: 1) testFailedAddTopic(bulletinBoard.TestAddTopicAction)org.apache.cactus.util.ChainedRuntimeException: Missing Cactus property [cactus.contextURL] at org.apache.cactus.util.Configuration.getContextURL(Configuration.java:185) at org.apache.cactus.util.ServletConfiguration.getServletRedirectorURL(ServletConfiguration.java:94) at org.apache.cactus.client.ServletHttpClient.getRedirectorURL(ServletHttpClient.java:87) at org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):184) at org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):109) at org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):1218) at org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):104) at org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.java:260) at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133) at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195) at bulletinBoard.TestAddTopicAction.main(TestAddTopicAction.java:96) FAILURES!!! Tests run: 1, Failures: 0, Errors: 1 log4j:WARN No appenders could be found for logger (org.apache.cactus.util.JUnitVersionHelper). log4j:WARN Please initialize the log4j system properly. |
- Re: Setting up Cactus Tests with NetBeans IDE 3.5, Tomcat... Alejandro
- Re: Setting up Cactus Tests with NetBeans IDE 3.5, T... Christopher Lenz
- Re: Setting up Cactus Tests with NetBeans IDE 3.... Alejandro
- Re: Setting up Cactus Tests with NetBeans IDE 3.... Alejandro
- Re: Setting up Cactus Tests with NetBeans ID... Christopher Lenz
- getSession.getAttribute("someAttribute"... Alejandro
