The application I am working on does not have a logout option. To logout of the application you have to close the web browser.
During the load test for every new iteration a new session is opened and the previous session is not closed. Due to the number of sessions being opened the App server is running out of memory. I have handled this problem by placing the login part in the Vuser_init section and disabling the simulate a new user on each iteration option.
However I would like to know if there is an option to end a session in the application when there is no logout option. Vugen cannont simulate closing a we browser.
How HTTP works is core to your answer, http://en.wikipedia.org/wiki/Hyperte...nsfer_Protocol . HTTP is a stateless protocol. Every request stands on its own. Any state is implemented on top of HTTP by an application server solution. A browser will not automatically terminate a session when the browser closes as websites don't generally respond at all to the "on application close" request for web browsers running on the client.
this is quite interesting in that you've found a common performance bug in the application - effectively a memory leak caused by poor design - simple rule - if you log on you log off and that includes the next n-tiers too not just the front facing app server
I'd move the logon back to in the action, if that's how real users behave, and refuse to move it - otherwise you are hiding a fault in the AUT - and raise it a bug discuss the severity of it with the PM but really it should be quite high - due to the potential for application failure
it is possible for the developers to hook log off code into the onbrowserclose() method (or whatever it is) but they often don't!!! - but you should record it to make sure!
I do this and randomly use log off/close browser to close sessions
also what happens when the users navigate away from the site (don't know if there's a method for that though)
the sessions will have a time out setting - more than likely 30 minutes or so, but I've seen 4 hours - this may be ok depending on the amount of traffic that the site gets