Wednesday 26 January 2022

java.util.prefs.WindowsPreferences WARNING: Could not open/create prefs root node Software\JavaSoft\Prefsat root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

This error is because java.util.prefs.WindowsPreferences is trying to save information in HKEY_LOCAL_MACHINE\Software\JavaSoft\Prefs instead of under HKEY_CURRENT_USER\Software\JavaSoft\Prefs.

Open JMeter.bat file as the administrator and so it creates the key HKEY_LOCAL_MACHINE\Software\JavaSoft\Prefs. Hope this resolves the issue.

Wednesday 5 January 2022

How to correlate Cookies in LoadRunner? or Vugen?

An HTTP cookie (also known as a web cookie or browser cookie) is a small piece of data sent by a server to a web browser. The cookie may be saved by the browser and sent back to the same server with subsequent requests. An HTTP cookie is typically used to determine if two requests originate from the same browser, such as to keep a person logged in. For the stateless HTTP protocol, it remembers stateful information.

It's crucial to think about whether you need to correlate cookies or not when recording/scripting. Simply keep track of your business actions and observe if any web_add_cookie() calls were made to the website. If there are any calls, you must correlate it.

Cookies are of 2 types.
Client send cookies and 
Server send cookies.
If you need to correlate server side cookies,then you Identify the request for which the server sends the desired cookies.Then correlate the cookie.
--> If the value appears in header,use web_reg_save_param(""); In attributes use "Search=Headers".
-->> If the value appears in Cookies,use
web_reg_save_param_ex(“ParamName=Cookie”,“LB=Airshixtf245”,“RB=*!@>”,“Ordinal=1”,SEARCH_FILTERS,“Scope=COOKIES”,LAST);

If the cookie to be correlated is a Client side cookie generated by Java code then you need to understand the logic behind the cookie generation.Then try to write a C program that generate a similar cookie.