jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natcho Man <natcho-...@shaw.ca>
Subject RE: RE: going nuts with beginXXX & endXXX
Date Fri, 19 Mar 2004 23:14:40 GMT
>1/ there's nothing wrong with your test
Hmm, too bad! 

>2/ are you sure the output logs do not get redirected to some files?
My println's should all be going to the same place and I've also tried my
own logger which had the same response as the printlns. I've also tried
writing test methods that did useful things within the begin (like set
required parameters) and they don't seem to run since my servlet test fails
because it can't find the required parameters.

>3/ how are you running your Cactus tests?
The tests are run using Ant & the Cactus task. Btw, the server is Jboss 3.2
with Tomcat.

I turned up the cactus logging level and I'll paste the content below. You
can see my println from testXXX() but nothing from beginXXX() or endXXX(). 

Anyone have any ideas?

2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletTestRedirector]
<doGet([org.apache.coyote.tomcat4.CoyoteRequestFacade@ce41cc],
[org.apache.coyote.tomcat4.CoyoteResponseFacade@141cd01])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletTestRedirector]
<doPost([org.apache.coyote.tomcat4.CoyoteRequestFacade@ce41cc],
[org.apache.coyote.tomcat4.CoyoteResponseFacade@141cd01])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletTestRedirector] ------------- Start Servlet
service
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects]
<setHttpServletRequest([org.apache.coyote.tomcat4.CoyoteRequestFacade@ce41cc
])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects] >setHttpServletRequest
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects]
<setHttpServletResponse([org.apache.coyote.tomcat4.CoyoteResponseFacade@141c
d01])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects] >setHttpServletResponse
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects]
<setServletContext([org.apache.catalina.core.ApplicationContextFacade@b41541
])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects] >setServletContext
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects]
<setServletConfig([org.apache.catalina.core.StandardWrapperFacade@df88d2])
2004-03-19 12:43:54,625 DEBUG
[org.apache.cactus.server.ServletImplicitObjects] >setServletConfig
2004-03-19 12:43:54,687 DEBUG
[org.apache.cactus.server.ServletTestController]
<handleRequest([org.apache.cactus.server.ServletImplicitObjects@6bc73b])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_Service])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [CALL_TEST]
2004-03-19 12:43:54,687 DEBUG
[org.apache.cactus.server.AbstractWebTestController] Service to call =
CALL_TEST
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.ServiceEnumeration]
<valueOf([CALL_TEST])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.ServiceEnumeration]
>valueOf = [CALL_TEST]
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_TestClass])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter =
[com.beyondsql.madrid.action.loginlogout.TestLoginAction]
2004-03-19 12:43:54,687 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] Class to call =
[com.beyondsql.madrid.action.loginlogout.TestLoginAction]
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_WrappedTestClass])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:54,687 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] No wrapped test class
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_TestMethod])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [testXXX]
2004-03-19 12:43:54,687 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] Method to call = testXXX
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.util.ClassLoaderUtils]
<loadClass([com.beyondsql.madrid.action.loginlogout.TestLoginAction], [class
org.apache.cactus.server.ServletTestCaller])
2004-03-19 12:43:54,687 DEBUG [org.apache.cactus.util.ClassLoaderUtils]
<loadClassFromWebappClassLoader([com.beyondsql.madrid.action.loginlogout.Tes
tLoginAction], [class org.apache.cactus.server.ServletTestCaller])
2004-03-19 12:43:54,812 DEBUG [org.apache.cactus.util.ClassLoaderUtils]
>loadClassFromWebappClassLoader = [class
com.beyondsql.madrid.action.loginlogout.TestLoginAction]
2004-03-19 12:43:54,812 DEBUG [org.apache.cactus.util.ClassLoaderUtils]
>loadClass = [class com.beyondsql.madrid.action.loginlogout.TestLoginAction]
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
<setDelegatedTest([testXXX(com.beyondsql.madrid.action.loginlogout.TestLogin
Action)])
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
>setDelegatedTest
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
<setWrappedTest([null])
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
>setWrappedTest
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
<setConfiguration([org.apache.cactus.configuration.ServletConfiguration@126b
165])
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.client.WebClientTestCaseDelegate]
>setConfiguration
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.server.ServerTestCaseDelegate]
<setDelegatedTest([testXXX(com.beyondsql.madrid.action.loginlogout.TestLogin
Action)])
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.server.ServerTestCaseDelegate] >setDelegatedTest
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.server.ServerTestCaseDelegate]
<setWrappedTest([null])
2004-03-19 12:43:55,093 DEBUG
[org.apache.cactus.internal.server.ServerTestCaseDelegate] >setWrappedTest
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.ServletURL]
<loadFromRequest([org.apache.coyote.tomcat4.CoyoteRequestFacade@ce41cc])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_Protocol])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_Server])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_ContextPath])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_ServletPath])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_PathInfo])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_URL_QueryString])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.ServletURL] Undefined
simulation URL
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.ServletURL]
>loadFromRequest = [null]
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
<getQueryStringParameter([Cactus_TestMethod=testXXX&Cactus_TestClass=com.bey
ondsql.madrid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=tru
e&Cactus_Service=CALL_TEST], [Cactus_AutomaticSession])
2004-03-19 12:43:55,140 DEBUG [org.apache.cactus.server.ServletUtil]
>getQueryStringParameter = [true]
2004-03-19 12:43:55,140 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] Auto session is true
2004-03-19 12:43:55,203 DEBUG [org.apache.cactus.ServletURL]
<setProtocol([http])
2004-03-19 12:43:55,203 DEBUG [org.apache.cactus.ServletURL] >setProtocol
2004-03-19 12:43:55,203 DEBUG [org.apache.cactus.ServletURL]
<setServerName([localhost])
2004-03-19 12:43:55,203 DEBUG [org.apache.cactus.ServletURL] >setServerName
2004-03-19 12:43:55,203 DEBUG [org.apache.cactus.ServletURL]
<setContextPath([/demo])
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL] >setContextPath
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL]
<setServletPath([/ServletRedirector])
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL] >setServletPath
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL]
<setPathInfo([null])
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL] >setPathInfo
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL]
<setQueryString([Cactus_TestMethod=testXXX&Cactus_TestClass=com.beyondsql.ma
drid.action.loginlogout.TestLoginAction&Cactus_AutomaticSession=true&Cactus_
Service=CALL_TEST])
2004-03-19 12:43:55,218 DEBUG [org.apache.cactus.ServletURL] >setQueryString
2004-03-19 12:43:55,265 DEBUG
[com.beyondsql.madrid.action.loginlogout.TestLoginAction] testXXX!!!
WWWWWWWWWWOoooooooooo
2004-03-19 12:43:55,265 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] Test result : [Test ok]
2004-03-19 12:43:55,265 DEBUG
[org.apache.cactus.server.AbstractWebTestCaller] Result saved in context
scope
....

> 
>Thanks
>-Vincent
> 
>> -----Original Message-----
>> From: Electric Natcho [mailto:electric_natcho@hotmail.com]
>> Sent: 18 March 2004 23:54
>> To: cactus-user@jakarta.apache.org
>> Subject: going nuts with beginXXX & endXXX
>> 
>> Hi, I'm using Cactus 1.5 & HttpUnit 1.5.4 and I'm running my tests
>from
>> ant
>> using the cactus task.
>> 
>> I can't get the beginXXX or endXXX methods to run but testXXX does
>work.
>> I've copied in many examples, tried to simplify it as much as possible
>and
>> still can't get it to work. What am I missing?
>> 
>> The example below will only print from testXXX().
>> 
>> import org.apache.cactus.*;
>> /**
>>  */
>> public class TestExamplesAction extends ServletTestCase {
>> 
>>     public TestExamplesAction(String testName) {
>>         super(testName);
>>     }
>> 
>>     public void beginXXX(WebRequest theRequest)  {
>>      System.out.println("beginXXX!!! WWWWWWWWWWOoooooooooo");  }
>> 
>>     public void testXXX()
>>  {
>>      System.out.println("testXXX!!! WWWWWWWWWWOoooooooooo");  }
>> 
>>  public void endXXX(WebResponse theResponse)  {
>>   System.out.println("endXXX!!! WWWWWWWWWWOoooooooooo");  } }


Mime
View raw message