admin

This user hasn't shared any biographical information

Homepage: http://www.performancecompetence.com


Posts by admin

LoadRunner: A thread-safe duplicate file creator function which also automatically assigns unique names to files

October 10, 2011 - 11:53 am

Posted in Uncategorized | 362 comments

Note: 1.Make sure you copy the upload file into your script folder by right clicking on the action pane and pressing the “Add files to script” option 2.Adding a file to script makes sure that your file automatically gets copied to the LoadGenerators during load test execution. 3.After the load test completes – ensure to [...]

LoadRunner: A C function to fetch a portion of the string after locating the last occurance of a delimiter

August 29, 2011 - 11:58 pm

Posted in Uncategorized | 1,409 comments

A very handy function when you are processing URLs and/or HTTP response. Function call Action() { //example URL lr_save_string(“https://mail.google.com/mail/?hl=en&tab=wm#inbox”, “InputName”); lr_output_message(“String before processing = \”%s\”", lr_eval_string(“{InputName}”)); strLastOccr(lr_eval_string(“{InputName}”), “OutputProjName”, “/”); lr_output_message(“Portion of the string after last occurance of forward-slash= %s”, lr_eval_string(“{OutputProjName}”)); return 0; } Function description void strLastOccr(char inputStr[100], char* outputStr, char *delim) { char value[100],*temp, [...]

LoadRunner: Explicitly Dealing with HTTP Redirect Requests

August 26, 2011 - 12:55 am

Posted in Uncategorized | 2,044 comments

By default, LoadRunner does not show Redirect requests in the script, though it take care of redirects during replay. This becomes an issue during transaction analysis, because all redirect requests and corresonding responses are combined into one step and shows up as one transaction in the results report. The web_url/web_custom_request/web_submit_data functions automatically detects a 302 [...]

LoadRunner: A C function to convert a floating number to string

July 19, 2011 - 11:22 pm

Posted in Uncategorized | 2,034 comments

I would like to call this function as ftoa here is the code… Note: To adjust the radix/floating point position…you will have to further customize this function. ftoa(float floatNum, char *convFloatString) {  char new[10];  float number,dTemp,temp_val;  int base, floatVal, radxFlag;  char *token;  char *temp;  char cfloatVal[10], cBase[10];  char cfloatValx[10] = “0″;    int DEBUG = [...]

LoadRunner: A C function to find substring using left and right boundaries

June 28, 2011 - 6:36 am

Posted in Uncategorized | 1,972 comments

This kind of works like the popular LoadRunenr web_reg_save_param function, hence I named it as web_reg_param_custom() void web_reg_save_param_custom(char *sourceStr, char* outpuStr, char *leftBdry, char *rightBdry) { char *st1, *st2; int result, i = 0; i=strlen(leftBdry); st1 = (char*) strstr(sourceStr, leftBdry); if (st1 != NULL){ st1 += i; st2 = (char*) strstr(st1, rightBdry); if (st2 != [...]

LoadRunner: Creating dll files and using it in LR scripts

June 22, 2011 - 3:37 am

Posted in Uncategorized | 1,731 comments

Creating DLLs have tons of advantage, especially when you want to take your scripts away from the beaten path. I won’t blabber much in this post and would like to take you people right into the topic I want to cover. In the previous post I mentioned about Search And Replace function. To serve the [...]

LoadRunner: C string function for search and replace

June 21, 2011 - 11:11 pm

Posted in Uncategorized | 1,439 comments

Example of function call: lr_save_string(“chaitanya m bhatt”, “InputName”); lr_searchReplace(lr_eval_string(“{InputName}”), “OutputProjName”, ‘ ‘, ‘+’); Note: Space – ‘ ‘ is the input character or lookup character and ‘+’ is the character which will be replaced in the place of the lookup character. Note that the input string is = “chaitanya m bhatt” . In this name [...]

Fun Script: A simple single level Web Crawler using LoadRunner

January 14, 2011 - 3:52 pm

Posted in Uncategorized | 1,547 comments

Author: Chaitanya M Bhatt //Try it out! /*Change the URL in seeder function to the desired parent URL from where you wish to start crawling.*/ char newlinkup[100]; int i; web_reg_save_param(“newlink”, “LB=href=”", “RB=”", “ORD=All”, LAST); web_reg_find(“Text=href=”, “SaveCount=xCount”, LAST); web_url(“Seeder Function”, “URL=http://www.google.com/”, “TargetFrame=”, “Resource=0″, “RecContentType=text/html”, “Snapshot=t1.inf”, “Mode=HTML”, LAST); for(i=2; atoi(lr_eval_string(“{xCount}”)); i++) { sprintf(newlinkup, “{newlink_%d}”, i); lr_save_string(lr_eval_string(newlinkup), “newlinkstring”); [...]

Software Load Test Scripting: Best Practices

November 2, 2010 - 10:38 pm

Posted in Uncategorized | 1,835 comments

1.0 Plan your Business Process scripting effort Successful performance testing relies on in-depth understanding of the application, the business requirements of the customer and careful planning of the script development phase. 1.1  Gather relevant data Make sure you get the document that describes the business objectives of the application, maps the customer environment and provides [...]

LoadRunner:Minimize your script debug time by using “On demand log functions.”

November 1, 2010 - 10:25 am

Posted in Uncategorized | 1,985 comments

More than often, I see people using Log settings available in Run-Time settings and completely ignore the function “lr_set_debug_messag(),” which I think Mercury has thoughtfully created, because it is genuinely useful in many occasions. Say, you’re dealing with a script with 5,000 lines and you have trouble correlating a certain dynamic string which you know [...]