I need to hold sessions for a certain period of time using JMeter.
The test plan and script detail is given below:
Say, for example, 100 users have logged into my web application using their individual credential.The session timeout of my web application is 30 minutes. That means if those 100 users remain idle for 30 minutes after login, the application will hold the connection open for next 30 min to receive any further requests from those logged in clients. The connection will not be closed. So if the client needs to conduct another HTTP transaction, it can use the idle keepalive connection rather than create a new TCP connection. Now when those 100 connections are active or idle, I need to determine the response time of a newly logged in client. But I can’t generate this scenario using JMeter.
Here is my script detail: ->Simple Login request -> Ultimate Thread Group: Start Thread Count-100 ->Startup time-120 ->Hold load for-120 ->Shutdown Time-60 -> Constant Throughput Timer- Target Throughput (1200/min). ->Tests run in non-GUI mode ->I have allowed "keepAlive" in "HTTP Request" sampler.
All the threads are up within 120 seconds and after that, this load will be held for another 120 sec. So for this total 240 seconds login requests will be sent (in fact during shutdown time also). In my test around 6500 login requests were generated for 100 threads and all of them logged in using different credentials. I have used CSV data configuration element to pass the data for login. I have monitored the server log while executing the test and observed all login requests were accepted and successful. So in real time scenario, if 6500 users log in to my web app, using different machines or PCs and simply do nothing after login, my server will keep the connection open for next 30 min for further HTTP transactions. How could I generate this scenario in JMeter. Or in my script, are all those sessions kept alive?
Any suggestions or guidance would be very helpful.