HTML Mode Vs URL mode of recording in HTTP/HTML protocol

There are two recording modes available in LoadRunner to record the user actions of a Web Application. These are:
  • HTML mode
  • URL Mode

HTML mode – In this mode of recording, each USER ACTION is recorded as a separate request.  This is also called as Context based recording of the Web Application.
Assume a case where you are given a step by step document that has to be followed. The steps can be like launch the web Application  –> Enter the user name and password and click on Log in  –> Click “View Demo” link –> enter the personal details and click on submit –> View the Demo –> Log out.
An actual novice user would start browsing through the steps 1, 2 and stop if they didn’t find the link “view Demo”.  A actual user (human) can apply his intelligence and probably assume that “click here to get the demo” is same as “View Demo”, but a tool would not – causing the script to be terminated
This is the case case where the tool has to enter some data in a form and if the form is not found, the tool will halt the execution of the script.  Every request is directly dependent on the previous request’s response and has high chances of failure with the UI changes to the web application
The advantages of using the HTML recording mode is that the size is very compact and the customization efforts reduced.   However, with UI changes to the web applications the scripts would require much higher maintenance costs.
URL Mode: In this mode of recording each resource requested by the user is recorded as a separate request.  When a web site is launched apart from the HTML content, there will be images, java script files, CSS files an other resources downloaded extenze information. Each of these resources is recorded as a separate request.
URL mode is also called a context less recording because this mode does not depend on the UI of the application, rather the actions associated with the user actions performed on UI. As each resource is recorded the size of the script is large.  This means that a large amount of customization is also required. The benefit of having scripts with URL recording mode is that the maintenance cost associated with these are reduced and can be used across various releases of the product making the script less susceptible to changes in the UI .
URL mode of recording is usually used with Non –browser applications e.g. Any thick client activity is generally recorded using the URL mode.
The Trade off – with the HTML recording mode, another option is available under “Advanced options” of HTML mode  is Explicit URLs only mode.
The benefits of the HTML mode and URL mode are cobbled together in HTML  -  Explicit URLs only. With this mode, the size of the script is compact (as only the user action are recorded as requests, not at the UI level but at the request level).  This requires more customization effort, but has the advantage of high maintainability for longer durations. This is generally the most commonly used and recommended recording method for web applications where the scripts have to be maintained for longer durations
Tip: If  you have forgotten to record the script using HTML –> Explicit URLs mode? Then change the recording options to HTML –> Explicit URLs only, navigate to Tools –> Regenerate script. The regenerated script is as fresh as a recorded script using HTML Explicit URL’s only mode. Note:: Whatever any change made to the script previously will be lost when the script is regenerated.

No comments:

Post a Comment