jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: Setting up Cactus Tests with NetBeans IDE 3.5, Tomcat 4.1.24, and CactusStrutsTest 1.9.6
Date Mon, 30 Jun 2003 16:32:38 GMT
Hi Alejandro,

Alejandro wrote:
> Actually, take that back. I was using MockStrutsTestCase (which doesn't use
> Cactus), by mistake. I changed the extends class and the import lines in
> both the Client and Container, to use CactusStrutsTestCase.

:-)

> Here's my new configuration:
> Client Side:
> c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru
> ts\action\TestAddTopicAction.class
> c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru
> ts\action\cactus.properties
> c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru
> ts\action\log4j.properties

Errm. What java package is that then? Both property files need to be in the 
*default* package. I *guess* that would translate to the location

   c:\subversion\argyle\trunk\qa\test\

in your case.

> Container Side:
> c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\TestAddTopicAction.class

This actually depends on the package your test class is in... if it's in the 
default package, okay.

> c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\cactus.properties
> c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\log4j.properties

You don't actually need cactus.properties here. It's only required on the 
client side.
   [http://jakarta.apache.org/cactus/integration/howto_config.html]

> c:\TOMCAT\webapps\bulletinBoard\WEB-INF\lib\argyle.jar (with my classes
> under test here)
> 
> When I run the Client Side class, I get the error below
> Questions:
> 1) My cactus.properties file includes only the required cactus.setContextURL
> parameter, do I need to add the other ones?

Well, *cactus.contextURL* would definitely help. ;-)
Note there's no "set" in the property name.

> 2) Where do I need to put the CACTUS jar files? I currently have them in
> TOMCAT\common\lib
> 3) Is this correct?: The IMPORT line in both my Client Side and Container
> Side java classes is the same:
>         import qa.test.org.cait.argyle.module.bulletinBoard.struts.action;
> 
> 
> Apparently everything's in place.

Apparently not, or it'd be working ;-)

> ----ERROR-------------------------------------------------------------------
> -----------------------
> .log4j:WARN No appenders could be found for logger
> (org.apache.cactus.util.JUnitVersionHelper).
> log4j:WARN Please initialize the log4j system properly.

(See, the log4j.properties isn't picked up either)

> E
> Time: 0.07
> There was 1 error:
> 1)
> testSuccessfulAddTopic(qa.test.org.cait.argyle.module.bulletinBoard.struts.a
> ction.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(ServletC
> onfiguration.java:94)
>         at
> org.apache.cactus.client.ServletHttpClient.getRedirectorURL(ServletHttpClien
> t.java:87)
>         at
> org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.j
> ava;org/apache/cactus/util/log/LogAspect.aj(1k):184)
>         at
> org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHttpCli
> ent.java;org/apache/cactus/util/log/LogAspect.aj(1k):109)
>         at
> org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpClien
> t.java;org/apache/cactus/util/log/LogAspect.aj(1k):1218)
>         at
> org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;o
> rg/apache/cactus/util/log/LogAspect.aj(1k):104)
>         at
> org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.jav
> a:260)
>         at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
>         at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195)
>         at
> qa.test.org.cait.argyle.module.bulletinBoard.struts.action.TestAddTopicActio
> n.main(TestAddTopicAction.java:96)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> 
> ----ERROR-------------------------------------------------------------------
> -----------------------
-chris


Mime
View raw message