Re: Where's the best way to test session timeout?
> 1) Can we test it with a struts integration test? > 2) How can we mock the time span (ie, we obviously don't want to wait 5 > minutes for the test to finish...). Are you testing what happens when a session is no longer a session? Invalidate the session in your test: http://struts.apache.org/2.2.1/docs/how-do-we-get-invalidate-the-session.html Otherwise, you're testing your servlet container, which is pretty silly IMO. If you are testing the configuration file, then parse it and look for the correct timeout.
RE: Where's the best way to test session timeout?
1 ? Beez - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Where's the best way to test session timeout?
Dear all, Today's question is on the borderline between Struts and general "good testing practises". I have an application requirement "users must re-login after 5 minutes of inactivity". Now, the way to do this is to add to the web.xml: 5 However, how does one test it? More specifically: 1) Can we test it with a struts integration test? 2) How can we mock the time span (ie, we obviously don't want to wait 5 minutes for the test to finish...). Thanks for the input, Miguel Almeida