Highlighted
Absent Member.
Absent Member.
3284 views

Help Pls.. Loadrunner Action Block & Parameterization

I'm a newbie to loadrunner. Please suggest load runner test design for the below scenario.

My web application accepts login name and password and after login and repeats function'X' a few times. My test design should login 100 valid users and perform few iterations of function'X' at the same moment for all the users (concurrent).

"Repeat_for_multiple_Users[Login->FunctionX(fewtimes)->Logout]"

Measures : Max/Min/Average time taken for every execution of FunctionX.

Do i need to create action blocks? Please propose a method to design this test.

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Re: Help Pls.. Loadrunner Action Block & Parameterization

In loadrunner Vuser_Init will execute once, Action will execute for the given no. of iterations and Vuser_end executes at the end for one time. If you need to login for multiple times you need to record your whole script under Action part and so the whole part will be executed for the specified no. of times. You dont need to create any blocks for this scenario as it is a simple one. Blocks are needed when you need to execute a specific set of code for multiple times where as the rest of the code is required to executed as per the requirement. Blocks are also used whenever we need the percentage of execution among the script. For eg. if you need to execute certain sets of functions for 75% and the rest functions for 25% etc. Let me know if you still have any questions about it.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Help Pls.. Loadrunner Action Block & Parameterization

And about the parameterization go with Unique Each Iteration parameter and so that you will be able to login with 100 valid users everytime. Make sure that you have your logout also recorded under Action part.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Help Pls.. Loadrunner Action Block & Parameterization

Hi Srinivas, Thanks a lot for the reply.

Please correct if my understanding is correct :
Record a script with login(parameterize)->perform_functionX(parameterize)->Logout in action(). Run it in controller for multiple virtual users. This will simulate concurrent valid users login and invoke functionX.

When i run such script in controller it shows virtual user ID as 1..2..3. Can i print the name of valid (parameterized) users executing this script?
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Help Pls.. Loadrunner Action Block & Parameterization

Hi,

Yes you cant print the Vuser id details as follows:

In the following example, lr_whoami retrieves information about a Vuser and places it into a message string. The message string contains Vuser login information that connects with a server.

Note that memory for vuser_group is allocated automatically. Do not alter the string.

int id, scid;
char *vuser_group;

lr_whoami(&id, &vuser_group, &scid);
lr_message( "Group: %s, vuser id: %d, scenario id %d",

vuser_group, id, scid);


0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Help Pls.. Loadrunner Action Block & Parameterization

Let me put it here from what I understand of your request.
To run a scenario where
1. 100 users with unique login credentials
2. Perform Business process .
3. Concurrent users

For this
1. Record a script completely in 3 segments init,action,end where the business process is in Action.
2. In the parameter list "select next row = Unique", "Update value on = each iteration", "When out of values = continue in cyclic manner"


In Controller, manual scenario->schedule
Start vusers: 10 users every 5 secs
Duration : 30 mins
Stop vusers : 10 users every 5 secs

The above scenario will ramp up 10 users every 5 sec untill 100 and then run the test for 30 mins.

------------------------

As the username is parameterised in the script the logs with show the value picked up at runtime( Script->runtime settings->logs-> extended logs-> parameter substitution: check)
also checking the value of username from every single vuser file of 100 count may become messy, hence i user file handling to write out the value to a text file.


Let me know if this helps

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.