What is use of vuser_init() and vuser_end() while we record the script, when are these functions used.

Questions by t_ansar   answers by t_ansar

Showing Answers 1 - 12 of 12 Answers

Vijay N

  • Aug 14th, 2007
 

When you record a script in vugenerator this records the scripts for a virtual user to be used while playback. vuser_init() is the call to initialise the user and vuser_end() closes the user's transaction. This can be seen in the controller while playing a scenario by monitoring the vusers.

  Was this answer useful?  Yes

The above answer is somewhat correct.

These are 3 basic ACTIONS in your script.
1. vuinit
2. Action
3. vuend

It is entirely up to you, how you use them. Conventionally, you record the LOGIN steps in the vuinit section, and log outoperation in the vuend section. (Load Runner calls them ACTIONS and when using controller, it calls them transactions)

The ACTION section is different from other 2 (ini and end) as this can be "iterated"


I can explain more if you are interested. Rate this answer if you feel like and add me on IM if you need more elaboration.

Kam!

  Was this answer useful?  Yes

GK2010

  • Apr 13th, 2015
 

Hi

I have a quick clarification...When we mention Login portion requests in VUSER_INIT & Logout portion in VUSER_END and rest in ACTION part

How does it work during the test execution.

EX: I am use 5 Vusers, VUSER_INIT - has Login and VUSER_END - has Logout. Please not that I did not mention to run any specific iteration count. Does VUSER_INIT is called every time to open a session?

  Was this answer useful?  Yes

m tulasi ram

  • Oct 17th, 2018
 

If i want to login one time and i want to run the business flow for more than the one time and i want to logout at that time we use VUSER_INIT() login and VUSER_END for logout. After that we give number of iterations in runtime settings.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions