Hi Alejandro,

Alejandro wrote:
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

Hmm, that looks wrong. That should be


...\webapps\bulletinBoard\WEB-INF\classes\TestAddTopicAction.class

IIUC

------------------------------------------------------------------------------------------------------------
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".

That didn't seem to do the trick, otherwise you wouldn't get the exception below. I don't know NetBeans, but there must be some other way to add the cactus.properties file to the classpath.


"Container Side":
    - cactus.properties and log4j at:    ...\webapps\bulletinBoard\

Again, that should be ...\webapps\bulletinBoard\WEB-INF\classes


-chris

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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to