<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LoadRunner TnT &#187; HTTP/HTML</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/httphtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.loadrunnertnt.com</link>
	<description>Performance Testing, LoadRunner Tips &#38; Tricks</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:57:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Difference between WinINet and Socket Level</title>
		<link>http://www.loadrunnertnt.com/concepts/difference-between-wininet-and-socket-level/</link>
		<comments>http://www.loadrunnertnt.com/concepts/difference-between-wininet-and-socket-level/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:30:56 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[HTTP/HTML]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Socket]]></category>
		<category><![CDATA[WinINet]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=260</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>The <span style="font-weight: bold;">Windows Internet (WinInet)</span> application programming interface (API) enables applications to interact with <span style="font-weight: bold;">Gopher</span>, <span style="font-weight: bold;">FTP</span>, and <span style="font-weight: bold;">HTTP</span> 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, <a href="http://msdn2.microsoft.com/en-us/library/aa383630.aspx" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">“About WinINet”</span></span></a> at Microsoft. Whereas for <span style="font-weight: bold;">Socket Level</span>, it is a proprietary API that Mercury/HP LoadRunner implements.<span id="more-260"></span></p>
<p>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)?</p>
<p>By configuring Vugen record at WinINet level, simply means to instruct <span style="font-weight: bold;">Vugen</span> 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.</p>
<p>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, <span style="font-weight: bold;">LoadRunner</span>, attempts to capture the traffic on the socket-level at a specified port, bypassing any WinINet API (if there is any).</p>
<p>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 <span style="font-weight: bold;">Vugen</span> 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 <a href="http://support.openview.hp.com/selfsolve/document/KM169568" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">Document ID 10735 &#8211; What is “WinINet instead of Sockets” for</span></span></a> at the <a href="http://support.openview.hp.com/" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">support website</span></span></a> that reiterates the above but worth taking a look. A valid account will be required to login to access the article.</p>
<p>So, when do you configure <span style="font-weight: bold;">WinINet</span> or <span style="font-weight: bold;">Socket-level</span>? 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 <a title="Quick-and-Dirty Recording Techniques for Web (HTTP/HTML)" href="http://www.loadrunnertnt.com/?p=104" target="_blank">&#8220;Quick-and-Dirty Recording Techniques for Web (HTTP/HTML)&#8221;</a>.</p>
<p style="float: right; margin-right: 8px;">
<p>Lastly, a point to note that <span style="font-weight: bold;">Internet Explorer</span> browser&#8217;s API may change over time due to version upgrades (e.g. <span style="font-weight: bold;">IE 6</span> to <span style="font-weight: bold;">IE 7</span>) 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.</p>
<p>Hope all the above are sufficient for you to understand the WinINet and Socket-level recording and replaying in <span style="font-weight: bold;">LoadRunner</span> context.</p>
<p><span><br />
</span></p>
<p><!-- Additional Items for the post:Start --><!-- Additional Items for the post:End --><!-- Social Networks --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/difference-between-wininet-and-socket-level/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick-and-Dirty Recording Techniques for Web (HTTP/HTML)</title>
		<link>http://www.loadrunnertnt.com/how-tos/quick-and-dirty-recording-techniques-for-web-httphtml/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/quick-and-dirty-recording-techniques-for-web-httphtml/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:15:03 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[HTTP/HTML]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=104</guid>
		<description><![CDATA[There are situations where recording application using protocol Web (HTTP/HTML) encounters problem such as (1) not recording events, (2) not launching or (3) crashing. The context may deviate however the below list aims to provide a quick-and-dirty resolution to the problems. Obviously, the quick-and-dirty may work/not work in different environment and situations, however it will [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="HP" src="http://loadrunnertnt.com/images/company_hp_logo.gif" alt="" width="64" height="55" />There are situations where recording application using <span style="font-weight: bold;">protocol Web (HTTP/HTML)</span> encounters problem such as <span style="font-weight: bold;">(1) not recording events</span>,<span style="font-weight: bold;"> (2) not launching </span>or <span style="font-weight: bold;">(3) crashing</span>. The context may deviate however the below list aims to provide a <span style="font-weight: bold;">quick-and-dirty</span> resolution to the problems. Obviously, the quick-and-dirty may work/not work in different environment and situations, however it will help you scope down the problem in a sequential and logical manner.<span id="more-104"></span></p>
<ol>
<li>Use another machine to record</li>
<li>Use<span style="font-weight: bold;"> web_custom_request</span></li>
<li>Configure <span style="font-weight: bold;">Port Mappings</span> using <span style="font-weight: bold;">“WinInetlevel data”</span> or <span style="font-weight: bold;">“Socket level and WinInet level data”</span>. And if necessary, define the port and certs.</li>
<li>Use <span style="font-weight: bold;">Older Recording Engine</span></li>
<li>Use <span style="font-weight: bold;">LoadRunner</span> as <span style="font-weight: bold;">Proxy Server</span> on <span style="font-weight: bold;">port 7777</span> for Recording (For Older Recording Engine)</li>
<li>Determine OS Support Status and application type</li>
<li>Determine the actual protocol and port number using <span style="font-weight: bold;">Winsock</span> protocol or <span style="font-weight: bold;">network sniffing</span> tools (<a href="http://www.ethereal.com/"><span style="font-weight: bold;"><span style="text-decoration: underline;"><span style="color: #0066cc;">WireShark Network Analyzer</span></span></span></a>)</li>
</ol>
<p>I’m leaving out the details at this juncture so that you can have an overview steps of what to do when Vugen is not recording any <span style="font-weight: bold;">HTTP</span> events emitting from your HTTP application. I will detailed the steps and reason in the subsequent post; so stay tuned!</p>
<p>Ok, let’s move to the details on the rationals and steps required to get your HTTP application recorded!</p>
<p><strong><span style="text-decoration: underline;">[1] Use another machine to record</span></strong></p>
<p>Install <span style="font-weight: bold;">VuGen</span> on another machine and proceed with recording. What we are doing here, is to differ a problematic machine to a working one (at a machine-level troubleshooting). The existing machine may have problems due to a <span style="font-weight: bold;">clone image</span>, <span style="font-weight: bold;">restricted privileges</span> or previous <span style="font-weight: bold;">installation</span> of programs (unless you are pretty sure that your machine is fully workable with Vugen).</p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration: underline;">[2] Use web_custom_request</span></strong></p>
<p>Use the basic web request methods for communicating to the server. This is needed when Vugen (sometimes) is unable to recognise the <span style="font-weight: bold;">HTTP</span> traffic and compose into <span style="font-weight: bold;">web_submit_data</span> <span style="font-weight: bold;">APIs</span>. Therefore, by instructing VuGen to record using <span style="font-weight: bold;">web_custom_request</span> only, this will detect all unknown communications been used in a HTTP mode to be recorded but in a more unreadable or unfriendly web_custom_request script.</p>
<p>1.1 Create a new <span style="font-weight: bold;">Multi-Protocol Web (HTTP/HTML)</span> script; do not create a <span style="font-weight: bold;">Single Protocol</span> script.</p>
<p>1.2 In the recording options, select recording to be <span style="font-weight: bold;">URL-based script (not HTML mode)</span> and select “Use web_custom_request only”. Proceed with the recording.</p>
<p><strong><span style="text-decoration: underline;">[3] Configure Port Mapping</span></strong></p>
<p>Some applications may use ports that are different from the browser. The default <span style="font-weight: bold;">HTTP</span> port is <span style="font-weight: bold;">80</span> by most application but this may not be used by the application that you are recording against. In such situation, you may need to configure <span style="font-weight: bold;">Vugen</span>to capture the HTTP traffic by mapping the ports to the service type. The service type other than HTTP are <span style="font-weight: bold;">FTP</span>, <span style="font-weight: bold;">Socket</span>, etc depending on your application needs. In this way, Vugen will become a proxy and capture traffic on the defined port.</p>
<p>1.1 In <span style="font-weight: bold;">Recording Options</span> ensure that you are already using <span style="font-weight: bold;">web_custom_request only</span> as stated in the previously.</p>
<p>1.2 Go to <span style="font-weight: bold;">Port Mappings</span>, remove all registered Entry and add <span style="font-weight: bold;">New Entry</span> with the known information (such as port number and target server). Note that there should not be any duplicate port numbers.</p>
<p>1.3 If 1.2 didn’t resolve the problem, try using <span style="font-weight: bold;">“WinInet Level data” </span>for the <span style="font-weight: bold;">Capture Level</span> and record the application.</p>
<p>1.4 If 1.3 didn’t resolve the problem, try using “<span style="font-weight: bold;">Socket level and WinInet level data”</span> for the Capture Level and record the application.</p>
<p>1.5 If the above didn’t resolve the problem, edit the port mapping entry; change the <span style="font-weight: bold;">“Record Type”</span> to <span style="font-weight: bold;">“Direct”</span> and to <span style="font-weight: bold;">“Proxy”</span> if you using <span style="font-weight: bold;">SSL</span>. If you know the ciphers used and type, you can configure it here.</p>
<p>1.6 For SSL, either client-side or server-side, refer to <span style="font-weight: bold;">“Configuring the Port Mappings”</span> of the <span style="font-weight: bold;">Vugen User Guide</span> for the detailed information. You will have to provide the certificates in either <span style="font-weight: bold;">Base64</span> or <span style="font-weight: bold;">PEM</span> format. PEM format can be converted with a tool called <span style="font-weight: bold;">openssl.exe</span> availablie with the installer as well as online search.</p>
<p><strong><span style="text-decoration: underline;">[4] Use Older Recording Engine</span></strong></p>
<p>This is to utilize the old <span style="font-weight: bold;">recording engine</span> prior version <span style="font-weight: bold;">8.1</span>. The old version records at the proxy level whereas the new engine records on the process level.</p>
<p><strong><span style="text-decoration: underline;">[5] Use LoadRunner as Proxy Server for Recording (For Older Recording Engine)</span></strong></p>
<p>If [4], didn’t work out right, you have to specifically configure LoadRunner as a proxy to record all communication via port <span style="font-weight: bold;">7777</span>. Take note that this is in the old recording engine.</p>
<p>1.1 In <span style="font-weight: bold;">Recording Options</span>, under Browser, set the application to launch manually with “Manually launch an application”</p>
<p>1.2 Under <span style="font-weight: bold;">Recording Proxy</span>, select <span style="font-weight: bold;">“No Proxy”</span>.</p>
<p>1.3 On a separate machine (e.g. Machine A), set the Proxy to the <span style="font-weight: bold;">LoadRunner</span> machine with port 7777. (NOTE: Proxy server can be configured on the LR machine itself).</p>
<p>1.4 Start recording on LoadRunner machine.</p>
<p>1.5 Invoke the application on Machine A.</p>
<p>1.6 You should be seeing events counted on the LoadRunner machine. It means the target application accesses the LR machine and LR is recording it.</p>
<p><strong><span style="text-decoration: underline;">[6] Determine OS Support Status and application type</span></strong></p>
<p>At this point, you have tried almost everything (and have come to theend of the road/solutions). My recommendation is to check out with Mercury/HP support, on the support level of the target application. Also check them out if they had encountered such problems before.</p>
<p><span style="text-decoration: underline;">[7] Use Winsock protocol or network sniffing tools</span></p>
<p>Using <strong>WinSock protocol</strong>, you can determine the actual communication method by the client to the server. With this evidence, you can bring forward a discussion with your client on the unknown communication method. Another good tool to use is the WireShark Network Analyzer (formerly known as Ethereal Network Analyzer) to identify the communication and port being used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/quick-and-dirty-recording-techniques-for-web-httphtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combining non-standard protocols in a single script that are not listed in Multi-Protocol selection</title>
		<link>http://www.loadrunnertnt.com/how-tos/combining-non-standard-protocols-in-a-single-script-that-are-not-listed-in-multi-protocol-selection/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/combining-non-standard-protocols-in-a-single-script-that-are-not-listed-in-multi-protocol-selection/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 01:37:30 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[HTTP/HTML]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[MMS]]></category>
		<category><![CDATA[Protocols]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=91</guid>
		<description><![CDATA[Have you ever wanted a combination of two separate protocols that were unavailable in the list of multi-protocol? For example, part of the web application has streaming video component and the activities to be recorded requires you to login, conduct some verification before you have the video link for the user to click. If you [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted a combination of two separate protocols that were unavailable in the list of multi-protocol? For example, part of the web application has streaming video component and the activities to be recorded requires you to login, conduct some verification before you have the video link for the user to click. If you need to test the entire flow, you may want to have <strong>Media Player (MMS)</strong> with <strong>Web (HTTP/HTML)</strong> combined together to emulate the activities.<span id="more-91"></span></p>
<p>By default, when you are about to select the protocols from Multi-Protocol selection, you won’t be able to combine both of them together as illustrated below. (Click on image to enlarge).</p>
<p><img class="aligncenter" title="New Multiple Protocol" src="http://loadrunnertnt.com/images/new_multi_protocol.png" alt="" width="593" height="412" /></p>
<p>However, there are means to do that! Basically, what you need to do is to enable the protocol to be displayed in the <em>“New Multiple Protocol Script”</em> list when creating a <em>“New Virtual User”</em>. Let’s go through the technical overview:</p>
<ul>1. Go to {installation}\dat\protocols. By default, it’s C:\Program Files\LoadRunner\dat\protocols<br />
2. Open the desired protocol file that has the<em>.lrp</em> file extension. (E.g. <em>mms.lrp</em>)<br />
3. Amend parameter, <em>Multi</em> in the .lrp file from <em>0</em> to <em>1</em>. E.g. <em>Multi=0</em> to <em>Multi=1</em><br />
4. Open Vugen for a new vuser script and you should be able to see the enabled protocol in the list “New Multiple Protocol Script”.</ul>
<p>You should be able to see the enabled protocol similar to the following screenshot. (Click on image to enlarge).</p>
<p><img class="aligncenter" title="New Multiple Protocol Amended" src="http://loadrunnertnt.com/images/new_multi_protocol_amended.png" alt="" width="593" height="412" /></p>
<p>Click on the link if you need a sample of the files; You need to rename the file to <em>mms.lrp</em> and place it in <em>{installation}</em>\dat\protocols if you want to use it</p>
<ul>
<li><a href="downloads/mms-original.lrp" target="_blank"><span style="color: #800080;"><span style="text-decoration: underline;">Original <em>mms.lrp</em> file </span></span></a></li>
<li><a href="downloads/mms-amended.lrp" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">Amended <em>mms.lrp</em> file<br />
</span></span></a></li>
</ul>
<blockquote><p>Note:</p>
<p>Having provided the above, you will still need a basic understanding on how the combined script will be executed. Both protocol will execute as it is of it’s own where (1) <strong>Web (HTTP/HTML)</strong> will still allow the <strong>HTTP</strong> sends and receives when the Web (HTTP/HTML) APIs are executed and (2) Media Player (MMS) will make a direct connection to the Media Server (or publishing point) that will stream the video down when executing the <strong>Media Player (MMS)</strong> APIs. HTTP communication will stop from there till the streaming completes. You can refer to a previous article, &#8220;<a title="Introducing Media Player (MMS) protocol in LoadRunner!" href="http://www.loadrunnertnt.com/?p=267" target="_blank">Introducing Media Player (MMS) protocol in LoadRunner!</a>&#8220;.</p></blockquote>
<p>I’ve only tried with Web (HTTP/HTML) and Media Player (MMS). I’ve yet to try other combination of protocols. If you do have given a try before, it will be great to hear from too! As for the licensing, I’m not too sure if this is a breach in the <strong>license</strong>. Will be great to hear from the experts or vendor on this!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/combining-non-standard-protocols-in-a-single-script-that-are-not-listed-in-multi-protocol-selection/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
