LoadRunner Interview Questions #3

Following are LoadRunner Interview Questions Set #3.

Q. 11 Is it necessary to write login and logout code in vser_init and vuser_end functions respectively?

Ans: No, it is not mandatory to write the respective code in the different section. Login and Logout code could also be written in the Action part. In such a case, Vuser will log in and logout in each iteration.


Q. 12 In which scenario you need to write login and logout code in the Action part?

Ans: When you have a large number of users and want to allocate listed users to individual iteration to simulate real-world session/connection based on scenario then login and logout code are written in the Action part. In such a case, each Vuser will set-up a new connection while login and end while logging out.


Q. 13 What is the importance of vuser_init apart from login functionality?

Ans: vuser_init() does the pre-operations also called the initialization operations before the actual application is run. In the controller, Vuser remains in ‘Ready’ state while executing the vuser_init().


Q. 14 Where to define global variables and functions in LoadRunner?

Ans: Global variables and functions are defined in the globals.h file which is under ‘Extra Files’ section.


Q. 15 Can we use more than one Action() in a script? If yes then how?

Ans: Yes, we can add more than one Action() in the VuGen script by right-clicking on the ‘Actions’ and choosing ‘Create New Action’ option.