Difference between Web(Click & Script) and Web(HTTP/HTML) protocols in load runner

1) Difference between Web(Click & Script) and Web(HTTP/HTML)
These two are designed for recording web applications. The script generated will be different for each protocol. Click and Script recording resembles QTP script as it uses qtp engine.

2) Which one shoud we use?
If you want to mimic client side java script or applets loading time then click and script would be good otherwise http/html. In click and script there is no correlation.

3) In HTTP/HTML version, which option to select between HTML and URL when generating code?
If you select HTML mode, the script generated will be less compared to URL as URL mode generates one LR funtion for each link request. You can verify this by changing the mode and regnerating the script. If you select URL mode you will get a very detailed view of the application and script is large to maintain
And if there are frames in your web application, if one page is passing some info to others, in HTML you may miss. For some of the apps I have seen this kind of behaviour and forces you to choose URL option.

4) Will I see higher times with Click & Script?
Sometimes Yes. Because it will mimic client side javascript execution also
Loadrunner - Difference between Web(HTTP/HTML) and WEB,AJAX(Click & Script) protocol in terms of virtual user

Web (HTTP/HTML) protocol script consist of series of requests. Loadrunner start processing the requests one by one, once request is completed after receiving the response, it just forget what happened and proceed with the next request, so it consume less memory and don't process any web page code.

Where as click & script protocol virtual user is a hidden browser, it works similar to the real browser by executing the web page code, so correlation is not required . By using very limited object properties, HP could implement QTP technology into this protocol. User can also access page DOM using java script similar to .Object in QTP. Naturally it consume more memory and create more load on load injectors.

If the application is using heavy AJAX and third party controls, it may consume lot of memory and CPU usage. Always monitor load generator memory and CPU usage, it should not go beyond 80%. Some time Vusers run very slowly after couple of iterations, not meeting the script expectation.
In these situation, we do have following issues when virtual users are running as "thread".
Some of the virtual users may fail with the following error message
Action.c(360): Error: C interpreter run time error: Action.c (360):  Error -- memory violation : Exception ACCESS_VIOLATION received.
Function Specific error
Action.c(360): Notify: CCI trace: Action.c(360): web_browser(0x02081b03 "Java_Script", 0x0208214f "ACTION", 0x02081292 "EvalJavaScript=igtbl_getRowById('ctl00xc...", 0x02082111 "LAST")
In-order to overcome above error, run the virtual user as "process" instead of "thread", now virtual users are stable and each is assigned separate memory.
Loadrunner create virtual user using mmdrv.exe process, if virtual users are running as process, virtual user count and mmdrv.exe process in the task manager count will be same.
Install load injectors with Windows 2003 64bit to accommodate more memory.

Web (Click and Script) VuserWeb (HTTP/ HTML) Vuser
Emulation of communication between Browser and Web Server at user action levelEmulation of communication between Browser and Web Server.
The events will be captured at the browser page GUI elements levelThe events will be captured at the HTTP Protocol level on a specific browser
The scripts contain detailed information about the GUI eventsThe scripts contain detailed information about the recorded traffic.
Some of the common functions generated on different GUI objects are:
• web_browser (for invoking the URL)
• web_edit_field (to set the value to a edit box)
• web_image_submit (to click on a image button, which will send the data to the server)
• web_image_link (to click on a image link)
• web_list ( to select an item from a list)
• web_check_box (to set on or off on a check box)
• web_radio_group (to select an item from a radio group)
Some of the common functions generated at HTML based script
• web_url (Loads the specified Web page)
• web_submit_data (Performs an "unconditional" or "contextless" form submission)
• web_reg_save_param (Registers a request to save dynamic data information to a parameter)
Support non-HTML code such as Javascript on the client side. Do not support Applets or VB ScriptAs Web (HTTP/ HTML) records at the protocol level, it doesn’t have any client side scripting dependency. So, it supports all client side scripts
Accurately emulates user actions on the Web page (the way the user does step by step) and executes the necessary Javascript codeEmulates the page submissions and HTTP traffic. Doesn’t emulate user actions as you do step by step on the GUI pages.
For each user step on the GUI, an event or function will be captured on the Vuser scriptFor each page submission or server request an event or function will be generated
Most of the dynamic data (sessions, cookies, etc.) handled automatically. The reason, the script events are captured at the GUI level. Normally the session or cookie related issues will come when the complete page data is submitted on the serverAll the dynamic data needs to be handled by way of correlations
Provides three levels of recording:
• GUI Based script,
• HTML-based script
• and URL-based script
Provides Two levels of recording:
• HTML-based script
• and URL-based script
For most applications, including those with JavaScript, use Web (Click and Script) VusersFor browser applications with applets and VB Script or for non-browser applications, use the Web (HTTP/HTML) Vuser.
Allows user to generate detailed (event specific) Business Process Reports which summarize the script.Allows user to generate page specific Business Process Reports which summarize the script.