Friday 21 June 2013

Expanding LoadRunner functions


I quickly wanted to get some lr_status message outputted to the console for every LoadRunner transaction in a script, I basically wanted to insert a status message every time the lr_start_transaction was called to output the transaction name to the console. however, it was a large script and I didn’t want to make any code changes to the load runner script. So I wanted to expand the existing function. The code below was added into the vinit section.

void my_start_transaction (char *name)
{
lr_vuser_status_message("Starting Transaction %s",name);
lr_start_transaction(name);
return ;
};
vuser_init()
{

#define lr_start_transaction(x) my_start_transaction(x)

return 0;
}


LoadRunner Function Override

2 comments:

Sandeep Pawar said...

When I tried your code at http://easyloadrunner.blogspot.com.au/2013/06/expanding-loadrunner-functions.html, it goes into endless loop and then gives memory violation error. Is there any fix for this?

Software Development Company said...

Hello Ravi,
The Article on Expanding LoadRunner functions gives detailed information about it. Thanks for Sharing the information about THE loadRunner Functions For More information check the detail on the Loadrunner testing here Software Testing Company