Re: WicketTester and https

2010-09-01 Thread Kent Tong

 is there a way to test Pages that have the @RequireHttps annotation?

You can try http://wicketpagetest.sourceforge.net which should support
https testing.

--
Kent Tong
Useful  FREE software at http://www2.cpttm.org.mo/cyberlab/freeware

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketTester and https

2010-08-30 Thread Michael Sparer

 hi,

is there a way to test Pages that have the @RequireHttps annotation? 
currently the code


getTester().startPage(RegisterPage.class);
getTester().assertRenderedPage(RegisterPage.class);

results in this Exception:

junit.framework.AssertionFailedError: page was null
at 
org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:621)
at 
org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:569)


(using wicket 1.4.10)

I suppose this is due to the redirect it performs. 1 is there a way to 
test @RequireHttps pages and 2 wouldn't make a 
WicketTester.assertRedirect or WicketTester.assertHttpsRedirect would 
make sense for such scenarios?


cheers,

Michael

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester and https

2010-08-30 Thread Igor Vaynberg
wicket tester is not a complete emulation tool, it is designed for
simple usecases. you are welcome to patch it to support this, but its
probably easier to turn off the httpsrequestcycleprocessor in your
tests so no redirect happens.

-igor

On Mon, Aug 30, 2010 at 4:13 AM, Michael Sparer michael.spa...@gmx.at wrote:
  hi,

 is there a way to test Pages that have the @RequireHttps annotation?
 currently the code

                getTester().startPage(RegisterPage.class);
                getTester().assertRenderedPage(RegisterPage.class);

 results in this Exception:

 junit.framework.AssertionFailedError: page was null
    at
 org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:621)
    at
 org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:569)

 (using wicket 1.4.10)

 I suppose this is due to the redirect it performs. 1 is there a way to test
 @RequireHttps pages and 2 wouldn't make a WicketTester.assertRedirect or
 WicketTester.assertHttpsRedirect would make sense for such scenarios?

 cheers,

 Michael

 -
 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