Hi, WicketTester *simulates* a browser and a web server. In a normal setup the web server (like Tomcat) generates and encodes the jsessionid in the url. WicketTester creates a Wicket Session for the test(s) and there is no need of transferring jsessionid in the url/cookie. You can use tester.executeUrl("....;jsessionid=123456") and assert for it in your server code by using getWebRequest().getUrl().toString() but this is very artificial.
In your application code you can use http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getRequestedSessionId() and http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#isRequestedSessionIdFromURL() Maybe WicketTester should add support for those. Currently the code in MockHttpServletRequest looks like: /** * Check whether session id is from a cookie. Always returns true. * * @return Always true */ @Override public boolean isRequestedSessionIdFromCookie() { return true; } /** * Check whether session id is from a url rewrite. Always returns false. * * @return Always false */ @Override public boolean isRequestedSessionIdFromUrl() { return false; } Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 10, 2015 at 8:50 PM, Lois GreeneHernandez < lgreenehernan...@knoa.com> wrote: > Hi All, > > Is it possible to write a unit test or a pojo that tests an request url > for the presence of a jsessionid? My application Is java/wicket. Our test > system is testNG and wicket tester. > > Thanks > > Lois >