Answered question

How configure the loop for specified time of virtual user transations

In my case i need to loop through actions container for say 30 min time then logut of the application. Relogin and continue the same of another 30 min. Logout and login again .. like wise.

How can i configure this case. to specify that actions part run for configured time

raj N.
raj N.

raj N.

Level
1
153 / 750
points

If you have your whole script inside Actions container then i would suggest you to remove your loop action which is not necessary here.

The Actions container is already a loop. Then on the Action container, make sure that the option "Yes" is selected to reset user session between each iteration.

The "close connection" using Javascript may not work for WebSocket connection but the reset option should.

Did you find this useful ?

No (0)

Yes (1)

100%

100% of users found this answer useful

Other answers

It's not cleared how you designed your script with the login/logout containers. Did you put them inside Init/End containers?

If yes then basically what you would like is to iterate for 30 minutes and execute a new user when you reach that time so it can login again right?

You could have a population set to run for 30 minutes and start another population when this first population is completed. It can be configured in the advanced settings of your populations.

If your login/logout are inside the Actions container then i assume that you are using a loop action. In that case you could use a kind of timer that you could check at the end of each loop iteration the elapsed time and with an if-then-else condition go to the next iteration when the 30 minutes time is reached.

Does it make sense to you?

raj N.
raj N.

raj N.

Level
1
153 / 750
points

Yes . i would like to run the same session again after 30 minutes. and my login is in int and logiout is in end containers . Can tell how to configure that

For example, if you create two populations A and B. You configured them in the same way in term of profiles, load etc... Then in population B, go to the advanced settings and configure it to start at the end of population A.

With that setup, if population A is configured to run for 30 minutes, all the VU's will stop after 30 minutes and population B will start for again 30 minutes if you have configured it.

You can use more than two populations if you need to. In that case, configure all the populations to start when the previous one is completed.

raj N.
raj N.

raj N.

Level
1
153 / 750
points

I have kept all the transcations inside the actions container and kept a java script to close connections so that websocket is also closed at the end of the loop. But in next loop authentcation is passed but websocket request getting failed with error as NL-WEBSOCKET-REQUEST-ENGINE. I am attaching my script scrren shot