Thursday 7 December 2017

How to Handle SSL Issue in Scripting and Execution.




How to Handle SSL Issue in Scripting and Execution.

1.Shut connection during attempt to negotiate SSL session.

When this error occurs first verfiy the

1.web_set_sockets_option("SSL_VERSION","TLS");
try different options like TLS1.2,2,3,2&3.

2. Go to RUN-TIMESETTINGS

preferences ---> options---> Authatication and keep 1. Enable integrated authacation as YES.

And Use latest version of Load-generator only.
version impact should be there.

Add Parameter Name in the Transaction Name

It was just a case of using  lr_eval_string in the call to the transaction wrapper.


1. lr_start_transaction(lr_eval_string("Do something {piteration}"));
......................................

lr_end_transaction(lr_eval_string("Do something {pIteration}"),LR_AUTO);



you have to be careful above to make sure that start and end transactions names are the same. To overcome that problem I created a string variable to hold loadrunner transaction name.


char sTranName[20];
........

sprint(sTranName,lr_eval_string("TransactionA_{pIteration}"));

 lr_start_transaction(sTranName);
...........................

lr_end_transaction(sTranName,LR_AUTO);

 

Monday 4 December 2017

How to handle java script generated Session ID in Vugen using Load runner

A session id (GUID) is generated on client side via a javascript and sent to the server. This cannot be correlated because it doesn’t come from the server.

You will need to figure this out from the page source. In my case, the sessionID is assigned a value of window.SessionId where window.SessionID = NewGuid()

The body of NewGuid() is -

function NewGuid() {
-------

-Creates a new pseudo GUID.
------

var guid = ‘xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx’.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == ‘x’ ? r : (r & 0×3 | 0×8);
return v.toString(16);
});
return guid;

}



This generates a session ID like : 3f58555c-d6f4-4b1e-ac2a-b89f5d173944

then Use web_js_run() function.
Save the above javascript code with .js extension in the script folder.
Add the script under Extra files via Add Files option
Go to RunTimeSettings -Preferences-Options-Web Javascript header-Enable running javascript code == change the value to Yes
Write the following function.the the result is stored in param1