Thank you Richard for the answering... Since my app is written in a lower J2EE 
version so I have to use strutstest_2.0.0.jar which doesn't support 
verifyTilesForward() method. 
 
Any other suggestions? Thanks.
 

Richard Yee <[EMAIL PROTECTED]> wrote:
Carl,
Check the CactusStrutsTestCase javadoc. You should use 
verifyTilesForward instead of verifyForward(). There is also a 
verifyInputTilesForward() too.

-Richard


Carl Smith wrote:
> Is there any helps here? Thank you in advance.
>
> Carl Smith wrote:
> I am sorry for this a little long question, but you will be finding it 
> interesting... Simply put, I have (1),(2) and (3), then we I run struts 
> testing, I got error described as (4)
>
>
>
> (1) item in struts-config.xml
> type="my.actions.myAction" 
> name="myForm" 
> scope="request" 
> validate="true" 
> input="myInput">
>
>
>
> (2) item in tiles-defs.xml
>
>
>
>
>
>
>
>
>
>
>
>
> (3) 
> I was trying to test MyAction.java (not shown here since it is just some 
> simple stuff),
> I wrote the following struts testing case:
>
>
> public class MyActionTest extends CactusStrutsTestCase {
> public MyActionTest(String testingName){
> super(testingName);
> }
>
> public void begin(WebRequest req){
> req.setAuthentication(new BasicAuthentication("username","password"));
> }
>
> public void testDisplay() throws Exception {
> setRequestPathInfo("/MyAction");
> actionPerform();
> // after actionPerform(), MyAction is really forwarding to myApp.display.page
> // so the testing should have passed, but it did not, see below error
> verifyForward("display");
>
> }
>
> }
>
>
>
> (4)
> junit.framework.AssertionFailedError: was expecting 
> '/myContentRoot/myApp.display.page' but received 
> '/myContentRoot/jsp/default.jsp'
> at servletunit.struts.Common.verifyForwardPath(Common.java:170)
> at 
> servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)
>
>
> However, if I delete extends="myDefault" from the configure for 
> myApp.display.page in tiles-defs.xml, then the test case passed.
> It seems there is an issue with the tiles extend, why this is happening? Do 
> you have any idea or workaround?
>
>
>
>
> ---------------------------------
> Yahoo! for Good
> Click here to donate to the Hurricane Katrina relief effort. 
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 



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


                
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Reply via email to