Get Knowledge from Video instead of Content:

Tuesday 11 July 2017

LoadRunner - Interview Question #2

Q. 6 What is the difference in running the Vuser as a process and as a thread?
Ans: When Vuser is run as a process, the same driver program is loaded into memory for each Vuser. This will take a large amount of memory and will limit the number of Vusers you can run on a single generator. When Vuser is run as a thread, only one instance of driver program is shared by the given number of Vusers. You can run a number of Vusers on a single generator using the multi-threading mode. Vuser as a process is used for a client-server application while Vuser as a thread is helpful for a web-based application.

Q. 7. What are the different sections of the script? In what sequence do these sections run?
Ans: LoadRunner script has three sections:
a. vuser_init() - Home and Login page code (transaction). This function runs only one time at the start of the test. 
b. Action() - User actions across the application. It runs multiple times as per scenario setting. 
c. vuser_end() - Logout code (transaction). It runs only once at the end of the test.
Q. 8 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 case, Login and Logout of the Vuser will happen in each iteration.

Q. 9 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 scenario then log in and log out code is 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. 10 What is the significance 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().

Next: LoadRunner Interview Question #3

Previous: LoadRunner Interview Question #1


No comments :

Post a Comment