Re: How to test for a redirect after form submit, eg. setting RedirectRequestTarget?
Thanks Igor! After figuring out that onRequestTargetSet is called afterwards again with null as an argument (probably on closing the RequestCycle), it worked. Jörn On Tue, May 26, 2009 at 6:03 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: subclass requestcycle, override onrequesttargetset (may only be in 1.4) and set some flag when you see the redirect, or add it to some list you have visibility into. -igor On Mon, May 25, 2009 at 8:32 AM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Hi, in one of my Wicket unit tests I'd like to assert that after a successful submit, a RedirectRequestTarget was set. Its not even necessary to check the exact URL of that redirect, just that it happens. I can't find any support for that via WicketTester, and RequestCycle.get().getRequestTarget() (or accessed via tester.getLastRenderedPage().getRequestCycle().getRequestTarget()) returns null. Any ideas? Regards Jörn Zaefferer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to test for a redirect after form submit, eg. setting RedirectRequestTarget?
Hello, if you don't get a Wicket solution you might want to try real-time testing for re-direction using something like the Apache JMeter: http://jakarta.apache.org/jmeter/ - Original Message - From: Jörn Zaefferer joern.zaeffe...@googlemail.com To: Wicket Users users@wicket.apache.org Sent: Monday, May 25, 2009 10:32:40 AM GMT -06:00 US/Canada Central Subject: How to test for a redirect after form submit, eg. setting RedirectRequestTarget? Hi, in one of my Wicket unit tests I'd like to assert that after a successful submit, a RedirectRequestTarget was set. Its not even necessary to check the exact URL of that redirect, just that it happens. I can't find any support for that via WicketTester, and RequestCycle.get().getRequestTarget() (or accessed via tester.getLastRenderedPage().getRequestCycle().getRequestTarget()) returns null. Any ideas? Regards Jörn Zaefferer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to test for a redirect after form submit, eg. setting RedirectRequestTarget?
subclass requestcycle, override onrequesttargetset (may only be in 1.4) and set some flag when you see the redirect, or add it to some list you have visibility into. -igor On Mon, May 25, 2009 at 8:32 AM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Hi, in one of my Wicket unit tests I'd like to assert that after a successful submit, a RedirectRequestTarget was set. Its not even necessary to check the exact URL of that redirect, just that it happens. I can't find any support for that via WicketTester, and RequestCycle.get().getRequestTarget() (or accessed via tester.getLastRenderedPage().getRequestCycle().getRequestTarget()) returns null. Any ideas? Regards Jörn Zaefferer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to test for a redirect after form submit, eg. setting RedirectRequestTarget?
Hi, in one of my Wicket unit tests I'd like to assert that after a successful submit, a RedirectRequestTarget was set. Its not even necessary to check the exact URL of that redirect, just that it happens. I can't find any support for that via WicketTester, and RequestCycle.get().getRequestTarget() (or accessed via tester.getLastRenderedPage().getRequestCycle().getRequestTarget()) returns null. Any ideas? Regards Jörn Zaefferer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org