RE: Struts 1.1 and StrutsTestCase
Just tested with the nightly build of struts (20021114) and the CVS HEAD version of StrutsTestCase... Got the behaviour I had experienced with Struts 1.1-b2 (but the dynamic validators are now working!) In the test method at some point I make a call to 'verifyForward(Sucesso)' which is mapped as follows: action ... forward name=Sucesso path=/index.do/ /action This mapping is defined within a sub-application named 'docente', so it seems Struts is handling well the request, but StrutsTestCase isn't dealing with the sub-application prefix... An excerpt from the test's result is below: Testcase: testSuccessfulCriarSitio took 2,907 sec FAILED was expecting '/index.do' but received '/docente/index.do' junit.framework.AssertionFailedError: was expecting '/index.do' but received '/docente/index.do' at servletunit.struts.Common.verifyForwardPath(Common.java:171) at servletunit.struts.MockStrutsTestCase.verifyForward(MockStrutsTestCase.j ava:465) ... If anyone can shed some light over this issue... Thanks, Jorge inesc-id Jorge Martins | [EMAIL PROTECTED] lisboaSoftware Engineering Group | http://www.esw.inesc-id.pt/~jorge -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: sexta-feira, 15 de Novembro de 2002 1:38 To: Struts Users Mailing List Subject: Re: Struts 1.1 and StrutsTestCase Jorge Martins wrote: Hi, I'm using a nightly build of struts (20021101) and can't get the StrutsTestCase unit testing framework to work for sub-applications... I think this has been fixed in more recent nightly builds - try a more recent one, please. I've tried using struts 1.1-b2 and the the tests work partially (forwards verification doesn't deal with forwards defined within an action in a sub-application), but the Struts Dynamic Validator doesn't seem to work properly... Does anyone have these problems? Is there any way of using Dynamic Validators in struts 1.1-b2? It's conceivable that the problems you are experiencing are causing this other aberrant behavior. Try a more recent nightly and report back, please. Thanks in advance, Jorge -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts 1.1 and StrutsTestCase
While I am do not know the exact problem, I have seen similar problems recently. They generally have been related to recent changes in the core Struts ActionServlet for detection and tracking of modules. It may be that recent changes in how Struts detects and tracks modules have not been reflected in the most recent StrutsTestCase. To resolve this I would recommend reviewing the current source for servletunit.struts.Common.verifyForwardPath.java and compare it's evaluation of the forward path to how the ActionServlet currently tracks it. Sorry to not have more - Kevin http://www.strutskickstart.com Jorge Martins [EMAIL PROTECTED] on 11/15/2002 07:46:12 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:RE: Struts 1.1 and StrutsTestCase Just tested with the nightly build of struts (20021114) and the CVS HEAD version of StrutsTestCase... Got the behaviour I had experienced with Struts 1.1-b2 (but the dynamic validators are now working!) In the test method at some point I make a call to 'verifyForward(Sucesso)' which is mapped as follows: action ... forward name=Sucesso path=/index.do/ /action This mapping is defined within a sub-application named 'docente', so it seems Struts is handling well the request, but StrutsTestCase isn't dealing with the sub-application prefix... An excerpt from the test's result is below: Testcase: testSuccessfulCriarSitio took 2,907 sec FAILED was expecting '/index.do' but received '/docente/index.do' junit.framework.AssertionFailedError: was expecting '/index.do' but received '/docente/index.do' at servletunit.struts.Common.verifyForwardPath(Common.java:171) at servletunit.struts.MockStrutsTestCase.verifyForward(MockStrutsTestCase.j ava:465) ... If anyone can shed some light over this issue... Thanks, Jorge inesc-id Jorge Martins | [EMAIL PROTECTED] lisboaSoftware Engineering Group | http://www.esw.inesc-id.pt/~jorge -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: sexta-feira, 15 de Novembro de 2002 1:38 To: Struts Users Mailing List Subject: Re: Struts 1.1 and StrutsTestCase Jorge Martins wrote: Hi, I'm using a nightly build of struts (20021101) and can't get the StrutsTestCase unit testing framework to work for sub-applications... I think this has been fixed in more recent nightly builds - try a more recent one, please. I've tried using struts 1.1-b2 and the the tests work partially (forwards verification doesn't deal with forwards defined within an action in a sub-application), but the Struts Dynamic Validator doesn't seem to work properly... Does anyone have these problems? Is there any way of using Dynamic Validators in struts 1.1-b2? It's conceivable that the problems you are experiencing are causing this other aberrant behavior. Try a more recent nightly and report back, please. Thanks in advance, Jorge -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts 1.1 and StrutsTestCase
Thanks for the prompt info!... Unfortunately I don't have a lot of time to sift through the ActionServlet's code :P As far as I've gone through StrutsTestCase doesn't seem to bother appending the module prefix to the expected path, but I might be wrong, not having an in dept knowledge of Struts internals... As anyone else experienced these problems? Are there any known solutions? Any workarounds? I'm kind of in a hurry... If I can't get StrutsTestCase to work with Struts modules I'll be forced to revert to a single default module. TIA, Jorge inesc-id Jorge Martins | [EMAIL PROTECTED] lisboaSoftware Engineering Group | http://www.esw.inesc-id.pt/~jorge -Original Message- From: [EMAIL PROTECTED] [mailto:Kevin.Bedell;sunlife.com] Sent: sexta-feira, 15 de Novembro de 2002 14:07 To: Struts Users Mailing List Subject: RE: Struts 1.1 and StrutsTestCase While I am do not know the exact problem, I have seen similar problems recently. They generally have been related to recent changes in the core Struts ActionServlet for detection and tracking of modules. It may be that recent changes in how Struts detects and tracks modules have not been reflected in the most recent StrutsTestCase. To resolve this I would recommend reviewing the current source for servletunit.struts.Common.verifyForwardPath.java and compare it's evaluation of the forward path to how the ActionServlet currently tracks it. Sorry to not have more - Kevin http://www.strutskickstart.com Jorge Martins [EMAIL PROTECTED] on 11/15/2002 07:46:12 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:RE: Struts 1.1 and StrutsTestCase Just tested with the nightly build of struts (20021114) and the CVS HEAD version of StrutsTestCase... Got the behaviour I had experienced with Struts 1.1-b2 (but the dynamic validators are now working!) In the test method at some point I make a call to 'verifyForward(Sucesso)' which is mapped as follows: action ... forward name=Sucesso path=/index.do/ /action This mapping is defined within a sub-application named 'docente', so it seems Struts is handling well the request, but StrutsTestCase isn't dealing with the sub-application prefix... An excerpt from the test's result is below: Testcase: testSuccessfulCriarSitio took 2,907 sec FAILED was expecting '/index.do' but received '/docente/index.do' junit.framework.AssertionFailedError: was expecting '/index.do' but received '/docente/index.do' at servletunit.struts.Common.verifyForwardPath(Common.java:171) at servletunit.struts.MockStrutsTestCase.verifyForward(MockStrutsTestCase.j ava:465) ... If anyone can shed some light over this issue... Thanks, Jorge inesc-id Jorge Martins | [EMAIL PROTECTED] lisboaSoftware Engineering Group | http://www.esw.inesc-id.pt/~jorge -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: sexta-feira, 15 de Novembro de 2002 1:38 To: Struts Users Mailing List Subject: Re: Struts 1.1 and StrutsTestCase Jorge Martins wrote: Hi, I'm using a nightly build of struts (20021101) and can't get the StrutsTestCase unit testing framework to work for sub-applications... I think this has been fixed in more recent nightly builds - try a more recent one, please. I've tried using struts 1.1-b2 and the the tests work partially (forwards verification doesn't deal with forwards defined within an action in a sub-application), but the Struts Dynamic Validator doesn't seem to work properly... Does anyone have these problems? Is there any way of using Dynamic Validators in struts 1.1-b2? It's conceivable that the problems you are experiencing are causing this other aberrant behavior. Try a more recent nightly and report back, please. Thanks in advance, Jorge -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe
Re: Struts 1.1 and StrutsTestCase
Jorge Martins wrote: Hi, I'm using a nightly build of struts (20021101) and can't get the StrutsTestCase unit testing framework to work for sub-applications... I think this has been fixed in more recent nightly builds - try a more recent one, please. I've tried using struts 1.1-b2 and the the tests work partially (forwards verification doesn't deal with forwards defined within an action in a sub-application), but the Struts Dynamic Validator doesn't seem to work properly... Does anyone have these problems? Is there any way of using Dynamic Validators in struts 1.1-b2? It's conceivable that the problems you are experiencing are causing this other aberrant behavior. Try a more recent nightly and report back, please. Thanks in advance, Jorge -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org