|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
[JIRA] Created: (STS-519) MockRoundtrip doesn't work with wizard action beansMockRoundtrip doesn't work with wizard action beans
--------------------------------------------------- Key: STS-519 URL: http://www.stripesframework.org/jira/browse/STS-519 Project: Stripes Issue Type: Bug Affects Versions: Release 1.4.3 Environment: Windows XP, Java 1.6.0_10-ea, Maven 2.0.8, Stripes 1.4.3. Reporter: Jirka Hradil I would like to test my wizard bean (annotated with @Wizard) with the set of Mock tests delivered in the package net.sourceforge.stripes.mock with the Stripes framework 1.4.3. When I call the execute() method on the MockRoundtrip instance which is bounded to a wizard bean, Stripes starts to complain with the exception: ================================= 2008-02-19 21:19:31,187 WARN [net.sourceforge.stripes.exception.DefaultExceptionHandler] - Unhandled exception caught by the Stripes default exception handler. net.sourceforge.stripes.exception.StripesRuntimeException: Submission of a wizard form in Stripes absolutely requires that the hidden field Stripes writes containing the names of the fields present on the form is present and encrypted (as Stripes write it). This is necessary to prevent a user from spoofing the system and getting around any security/data checks. ================================== As mentioned in documentation (http://www.stripesframework.org/display/stripes/Wizard+Forms), the wizard form adds an encrypted hidden field to ensure that a wizard submission is not called directly. But I'm afraid that the functionality is not available with testing via the Mock object. I red that the security check is not applied to a method marked with startEvents, for example: @Wizard(startEvents="begin") This is true, calling the method "begin" from the Mock object don't cause the exception. But I'm afraid that these kind of "hack" is not usable for complex unit testing. One should say that is impossible to test the wizard beans with the current Mock implementation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.stripesframework.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Stripes-development mailing list Stripes-development@... https://lists.sourceforge.net/lists/listinfo/stripes-development |
|
|
[JIRA] Commented: (STS-519) MockRoundtrip doesn't work with wizard action beans[ http://www.stripesframework.org/jira/browse/STS-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11839#action_11839 ] Brandon Goodin commented on STS-519: ------------------------------------ i believe all you have to do is set the __fp parameter. trip.setParameter("__fp",""); We use this to test a Wizard Action. If that doesn't work you should be able to create a delimited list of field names and encrypt it yourself. Maybe something like: trip.setParameter("__fp",CryptoUtil.encrypt("field1|field2|field3")); This is all untested code. But, as far as I can tell that's all Stripes is really doing. > MockRoundtrip doesn't work with wizard action beans > --------------------------------------------------- > > Key: STS-519 > URL: http://www.stripesframework.org/jira/browse/STS-519 > Project: Stripes > Issue Type: Bug > Affects Versions: Release 1.4.3 > Environment: Windows XP, Java 1.6.0_10-ea, Maven 2.0.8, Stripes 1.4.3. > Reporter: Jirka Hradil > Assignee: Frederic Daoud > > I would like to test my wizard bean (annotated with @Wizard) with the set of > Mock tests delivered in the package net.sourceforge.stripes.mock with the > Stripes framework 1.4.3. > When I call the execute() method on the MockRoundtrip instance which is bounded > to a wizard bean, Stripes starts to complain with the exception: > ================================= > 2008-02-19 21:19:31,187 WARN > [net.sourceforge.stripes.exception.DefaultExceptionHandler] - Unhandled > exception caught by the Stripes default exception handler. > net.sourceforge.stripes.exception.StripesRuntimeException: Submission of a > wizard form in Stripes absolutely requires that the hidden field Stripes writes > containing the names of the fields present on the form is present and encrypted > (as Stripes write it). This is necessary to prevent a user from spoofing the > system and getting around any security/data checks. > ================================== > As mentioned in documentation > (http://www.stripesframework.org/display/stripes/Wizard+Forms), the wizard form > adds an encrypted hidden field to ensure that a wizard submission is not called > directly. But I'm afraid that the functionality is not available with testing > via the Mock object. > I red that the security check is not applied to a method marked with > startEvents, for example: > @Wizard(startEvents="begin") > This is true, calling the method "begin" from the Mock object don't cause the > exception. But I'm afraid that these kind of "hack" is not usable for complex > unit testing. > One should say that is impossible to test the wizard beans with the current Mock > implementation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.stripesframework.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Stripes-development mailing list Stripes-development@... https://lists.sourceforge.net/lists/listinfo/stripes-development |
| Free embeddable forum powered by Nabble | Forum Help |