Absent Member.. Absent Member..
Absent Member..

Diference between WinINet and Socket level in LoadRunner.

The Windows Internet (WinInet) application programming interface (API) enables applications to interact with Gopher, FTP, and HTTP protocols to access Internet resources. As standards evolve, these functions handle the changes in underlying protocols, enabling them to maintain consistent behavior. If you want detailed information on the APIs of WinInet, you can find them in the article, “About WinINet” at Microsoft. Whereas for Socket Level, it is a proprietary API that Mercury/HP LoadRunner implements.

So what’s the difference between the two in LoadRunner context? And what does it mean by setting the recording level in Port Mapping of the Recording Options and replay for RTS (Runtime Settings)?

By configuring Vugen record at WinINet level, simply means to instruct Vugen to record using the WinINet API. Vice versa, by configuring the Socket level, you are instructing Vugen to record using the proprietary API. By default, it is Socket level.

When the recording level is configured to record at WinINet API, LoadRunner records traffic that is generated by the application which uses the WinINet API to communicate to the servers; meaning it attempts to capture traffice at the WinINet level. For Socket, LoadRunner, attempts to capture the traffic on the socket-level at a specified port, bypassing any WinINet API (if there is any).

For replay, the principle applies where WinINet will be replaying using WinINet API else it will be replaying via the default Socket level API; meaning defining the WinINet replay, instructs Vugen to replay the script passing through the WinINet API while the default Socket replay will be bypasing the WinINet API. There is a small description of Document KM169568 - What is “WinINet instead of Sockets” for at the support website that reiterates the above but worth taking a look. A valid account will be required to login to access the article.

So, when do you configure WinINet or Socket-level? Sometimes web applications maybe designed in WinINet while at times it does not require WinINet as often and Socket level will be sufficient. How do we know which option to choose then? This will be a little tricky here but it will most probably end up in a series of trial-and-error. When an application fail in recording and replaying you can try by switching between the two modes which was also documented as part of the recording solution in “Quick-and-Dirty Recording Techniques for Web (HTTP/HTML)”.

Lastly, a point to note that Internet Explorer browser’s API may change over time due to version upgrades (e.g. IE 6 to IE 7) which may inherently cause the replay to be successful or fail. As mentioned, try switching the modes (after getting the necessary patches for IE7 if applicable) when you encountered problems in recording or replaying.

Hope all the above are sufficient for you to understand the WinINet and Socket-level recording and replaying in LoadRunner context.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.