<?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; Scripting</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/scripting/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>Tracking Transaction Response Time in GUI Vuser</title>
		<link>http://www.loadrunnertnt.com/how-tos/tracking-transaction-response-time-in-gui-vuser/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/tracking-transaction-response-time-in-gui-vuser/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 08:22:40 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[GUI Vuser]]></category>
		<category><![CDATA[Protocols]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=721</guid>
		<description><![CDATA[In our earlier post, we’ve mentioned that Quick Test Professional (QTP) scripts can be used in load testing in LoadRunner.  The scripts are developed in QTP and port into LoadRunner for usage where they are called GUI Vuser.  Executing GUI Vuser in a load test requires the GUI Vuser protocol.  One of the key features [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.loadrunnertnt.com/wp-content/uploads/2010/02/company_hp_logo2.gif"><img class="alignleft size-full wp-image-724" title="company_hp_logo" src="http://www.loadrunnertnt.com/wp-content/uploads/2010/02/company_hp_logo2.gif" alt="" width="64" height="55" /></a>In our earlier post, we’ve mentioned that <strong><a href="../concepts/using-qtp-with-loadrunner-for-load-testing/">Quick Test Professional (QTP) scripts can be used in load testing in LoadRunner</a></strong>.  The scripts are developed in QTP and port into LoadRunner for usage where they are called GUI Vuser.  Executing GUI Vuser in a load test requires the GUI Vuser protocol.  One of the key features of LoadRunner scripts is the ability to track the timing of your individual transaction in the script and generally, you will want to perform the same tracking in the GUI Vuser script.<span id="more-721"></span></p>
<p>Now, if you are proficient in LoadRunner, you may miss out on the details of how to go creating the start-stop transaction for the GUI Vuser script as the details are actually found in the QTP User Manual under the section, “Measuring Transaction” of HP Quick Test Professional User Guide – Volume 2 instead of LoadRunner manual.  In anyway, this is possible and only achievable via amending the scripts in QTP because Vugen will not be able open (read) QTP scripts.</p>
<p>Two ways you can insert a transaction.</p>
<ul>
<li>Via <strong>Keyword View</strong> – You can use <strong>Start Transaction </strong>icon <strong>&gt; Insert Transaction</strong> at the step that you want the transaction to start measuring.   Subsequently, you will use Stop Transaction icon to stop the measurement.</li>
<li>Via <strong>Expert View</strong> – You can use Services.StartTransaction &#8220;Transaction Name&#8221; and Services.EndTransaction &#8220;Transaction Name&#8221; to encapsulate where the start and end measurement.  “Transaction Name” is the name you give to defined for the transaction and this will appear when you run the GUI Vuser script in LoadRunner.</li>
</ul>
<p>With the above information, you should be slightly more familiar with <strong>Quick Test Professional (QTP)</strong> integrating with <strong>LoadRunner</strong>.  However, again there may be more things that need to be considered and I may have left out.  Do feel free to feedback and experiences and anything that I missed out when using QTP in load testing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/tracking-transaction-response-time-in-gui-vuser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to verify file downloaded</title>
		<link>http://www.loadrunnertnt.com/how-tos/how-to-verify-file-downloaded/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/how-to-verify-file-downloaded/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 06:17:15 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=586</guid>
		<description><![CDATA[Often there is a need to verify the validity of the file being downloaded by the script.  Under normal circumstances, if the file is a PDF or excel file, it will be returned/transmitted in binary (when you turned on replay log).  In this way, unlike conventional functional tool, LoadRunner is unable to verify if the [...]]]></description>
			<content:encoded><![CDATA[<p>Often there is a need to verify the validity of the file being downloaded by the script.  Under normal circumstances, if the file is a PDF or excel file, it will be returned/transmitted in binary (when you turned on replay log).  In this way, unlike conventional functional tool, LoadRunner is unable to verify if the file downloaded is valid.<span id="more-586"></span></p>
<p>In order to circumvent that, we use web_get_int_property API to retrieve the file size.  This file size will then be used to make comparison with the actual known file size on the server.  For usage of web_get_int_property, you can refer to the Function Reference available in Vugen.</p>
<p>On a brief overview, place the web_get_int_property APT after the request (web_url, web_custom_request, etc.) made for the file (PDF/excel).  I&#8217;ve extracted examples from <a href="http://tech.groups.yahoo.com/group/LoadRunner/message/23641" target="_blank">LoadRunner Yahoo Groups</a> and list them below for your convenience.</p>
<blockquote><p><strong>Example 1:</strong></p>
<p>lr_message(&#8220;%ld&#8221;,web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE));</p>
<p>web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);</p>
<p>web_get_int_property(HTTP_INFO_DOWNLOAD_TIME);</p></blockquote>
<p>Note, HTTP_INFO_DOWNLOAD_SIZE does not give the actual size of PDF file.  This HTTP_INFO_DOWNLOAD_SIZE gets the body bytes, header bytes, and chunk bytes.  Therefore, you may need to fine tune the script to determine a range value of the PDF file size due to the header and chunk bytes.</p>
<blockquote><p><strong>Example 2:</strong></p></blockquote>
<blockquote><p>float fFileDownloadSize, fFileDownloadTime, fFileDownloadRate;</p></blockquote>
<blockquote><p>funcFileDownload()<br />
{<br />
fFileDownloadSize = (web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE)/1024.);<br />
//in kilobytes<br />
fFileDownloadTime = (web_get_int_property(HTTP_INFO_DOWNLOAD_TIME)/1000.);<br />
//in seconds<br />
fFileDownloadRate = fFileDownloadSize/fFileDownloadTime; //in KB/s</p>
<p>lr_output_message(&#8220;Size of download was %.0f kilobytes; Time of download was %.3f seconds&#8221;, FileDownloadSize, fFileDownloadTime);</p>
<p>lr_output_message(&#8220;Rate of download was %.2f KB/sec&#8221;, fFileDownloadRate);</p>
<p>return 0;<br />
}</p></blockquote>
<blockquote><p><strong>Example 3:</strong></p>
<p>long DSize=0;</p>
<p>float DTime=0;</p>
<p>DSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);</p>
<p>lr_output_message(&#8220;DSize is: %.2ld Bytes&#8221;, DSize);</p>
<p>lr_output_message(&#8220;File Download size is: %.2ld KB&#8221;, DSize /1024);</p>
<p>DTime = web_get_int_property(HTTP_INFO_DOWNLOAD_TIME);</p>
<p>lr_output_message(&#8220;File Download Time is:%.2f Seconds&#8221;, DTime / 1000);</p></blockquote>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/how-to-verify-file-downloaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function web_reg_save_param and arrays</title>
		<link>http://www.loadrunnertnt.com/how-tos/130/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/130/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 14:10:43 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[web_reg_save_param]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=130</guid>
		<description><![CDATA[There are always situations that required us to work with dynamic data returned by the server through correlation and stored in array.  That is where web_reg_save_param comes into play of capturing a value or list of values based on a defined left boundary and right boundary.  To fully appreciate the power of LoadRunner, VUGen, is to [...]]]></description>
			<content:encoded><![CDATA[<p>There are always situations that required us to work with dynamic data returned by the server through correlation and stored in array.  That is where <strong>web_reg_save_param</strong> comes into play of capturing a value or list of values based on a defined left boundary and right boundary.  To fully appreciate the power of <strong>LoadRunner</strong>, VUGen, is to at best refrain from using those GUI features such as Correlation Studio or Runtime Viewer/Browser.<span id="more-130"></span>Let&#8217;s recap the syntax of web_reg_save_param (also available in Function Reference, &#8220;F1&#8243; key) which looks like the following:</p>
<p>web_reg_save_param(&#8220;p_EmpID&#8221;,<br />
&#8220;LB=Emp_ID=&#8221;,<br />
&#8220;RB=\&#8221;",<br />
&#8220;Ord=ALL&#8221;,<br />
&#8220;RelFrameId=1&#8243;,<br />
&#8220;Search=Body&#8221;,<br />
&#8220;IgnoreRedirections=Yes&#8221;,<br />
LAST);</p>
<p>This is familiar coding where p_EmpID will be captured with LB of EMP_ID= and RB of &#8220;.  However, another parameter to note in <strong>web_reg_save_param</strong> is the ORD, or Ordinal.  This specifies the locaiton of the value to capture if multiple occurrences of LB and RB exists.  By default, the value is ORD=ALL which meant that all occurrences will be captured.  When all occurances are captured, they are stored in an array.  The total number of values captured can be accessed by placing a _count suffix after the parameter name.  Example (note, Total_Employees have to be defined as an integer in the script):</p>
<p>Total_Employees=atoi(atoi(lr_eval_string(&#8220;{p_EmpID_count}&#8221;­));</p>
<p>While to access a specified value in the array, you will put an index after the parameter in _{index} format.  Example illustrates reading the 2nd Employee ID in the array:</p>
<p>Current_EmployeeID=atoi(lr_eval_string(&#8220;{p_Emp_ID_2}&#8221;­));</p>
<p>Of course, these are just methods to read the values extracted for your scripting work.  Hopefully, you will find it easier when you are performing scripting work.</p>
<p>NOTE (21 Oct 2008):  Corrections to the default value of the Ordinal parameter.  It should be ORD=1, meaning the first occurence, instead of ORD=ALL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/130/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Setting debugging mode on the fly!</title>
		<link>http://www.loadrunnertnt.com/how-tos/setting-debugging-mode-on-the-fly/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/setting-debugging-mode-on-the-fly/#comments</comments>
		<pubDate>Sun, 18 May 2008 13:22:54 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=110</guid>
		<description><![CDATA[Most of the time, we need to know the data that is being transmitted to and back from the server in the Replay Log to troubleshoot the scripts. And what we usually do, is to configure the settings in the Runtime Settings through the following options:

Parameter substitution
Advance Trace
Data Returned by Server

By doing this, there will [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time, we need to know the data that is being transmitted to and back from the server in the Replay Log to troubleshoot the scripts. And what we usually do, is to configure the settings in the <em>Runtime Settings</em> through the following options:</p>
<ul>
<li>Parameter substitution</li>
<li>Advance Trace</li>
<li>Data Returned by Server</li>
</ul>
<p><span id="more-110"></span>By doing this, there will be a tremendous amount of logging data being captured in the Replay Log. And sometimes, it&#8217;s overwhelming and redundant&#8230; And at times, the error could just be reduced to a small area of the script and you to go through the entire script to reach the log entry that is useful to you. Or you have to spend ineffective time waiting for the entire script to complete while it builds the big chunk of logging data during replay.</p>
<p>Let&#8217;s make things a lot more simpler&#8230; we just want to view the data when the error occurs on certain API calls and reduce the amount of data generated to the <em>Replay Log</em>. How do we do it? We can use the <em>lr_set_debug_message</em> to display only a certain portion of the log generated. What <em>lr_set_debug_message </em>does is to set the message level for the script execution during runtime.</p>
<p>Place the <em>lr_set_debug_message</em> before the codes that you want the replay log to receive and close it again as per your requirement. The syntax is as followed and more information can be consulted in the <em>Function Reference</em>.</p>
<blockquote><p>Action()<br />
{</p>
<p>// Turn on Extended Log logging for &#8220;Data returned by server&#8221;, &#8220;Parameter substitution&#8221;         and &#8220;Advanced Trace&#8221;</p>
<p>lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_RESULT_DATA | LR_MSG_CLASS_PARAMETERS | LR_MSG_CLASS_FULL_TRACE,LR_SWITCH_ON);</p>
<p>/*</p>
<p>…. Actions &#8230;</p>
<p>*/</p>
<p>// Turning off the Extended Log for all settings</p>
<p>lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_RESULT_DATA | LR_MSG_CLASS_PARAMETERS | LR_MSG_CLASS_FULL_TRACE,LR_SWITCH_OFF);</p>
<p>}</p></blockquote>
<p>As you can see from the above example, it is possible to mix and match the combinations of the message_level (i.e. LR_MSG_EXTENDED_LOG) with other message_levels in the API to suit your needs. Below is the relation of the message_level with the actual settings found from the GUI itself.</p>
<div><strong> Table 1: Log level and relation with the Run-time Setttings</strong></p>
<table style="background-color: #eeeeed; height: 416px;" border="1" width="643">
<tbody>
<tr>
<td style="width: 309px;"><strong> Type</strong></td>
<td style="width: 373px;"><strong> Description</strong></td>
</tr>
<tr>
<td style="width: 373px;" colspan="2"><strong>Generic Logging Settings</strong></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_DISABLE_LOG</td>
<td style="width: 373px;">Flag for unchecking <em>Enable Logging</em> in the Runtime settings.</td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_BRIEF_LOG</td>
<td style="width: 373px;">Flag for <em>Standard Log.</em></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_EXTENDED_LOG</td>
<td style="width: 373px;">Flag for <em>Extended Log.</em></td>
</tr>
<tr>
<td style="width: 373px;" colspan="2"><strong>Additional Settings for Extended Log</strong></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_RESULT_DATA</td>
<td style="width: 373px;">Flag for <em>Data returned by server.</em></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_PARAMETERS</td>
<td style="width: 373px;">Flag for <em>Parameter substitution.</em></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_FULL_TRACE</td>
<td style="width: 373px;">Flag for <em>Advanced Trace.</em></td>
</tr>
<tr>
<td style="width: 373px;" colspan="2"><strong>Log Options</strong></td>
</tr>
<tr>
<td style="width: 309px;">LR_MSG_CLASS_JIT_LOG_ON_ERROR</td>
<td style="width: 373px;">Only on error. Which messages sent on error depends on other settings; relates to &#8220;Send messages only when an error occurs&#8221;.</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/setting-debugging-mode-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Which protocol to use?</title>
		<link>http://www.loadrunnertnt.com/concepts/which-protocol-to-use/</link>
		<comments>http://www.loadrunnertnt.com/concepts/which-protocol-to-use/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 05:33:52 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Protocols]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=305</guid>
		<description><![CDATA[Typically for newbies, the question after getting their first copy of LoadRunner and installation of Vugen will be, “Which protocol to use?”. They post online or to the support to ask, “I’ve got a Java/.NET applicaton, and there are many protocols from the list of Vugen. Which Protocol should I choose ” or “…can you [...]]]></description>
			<content:encoded><![CDATA[<p>Typically for newbies, the question after getting their first copy of <strong>LoadRunner</strong> and installation of Vugen will be, “Which protocol to use?”. They post online or to the support to ask, “I’ve got a <strong>Java/.NET</strong> applicaton, and there are many protocols from the list of Vugen. Which Protocol should I choose ” or “…can you advise on the protocol to use?”.</p>
<p>The fact is that it doesn’t really matter the type of language that was used to developed the application, but rather the type of communication method or protocol that the application is talking to the server. Previously, in <a title="What’s LoadRunner?" href="http://www.loadrunnertnt.com/?p=17" target="_blank">&#8220;What&#8217;s LoadRunner?&#8221;</a>, we mentioned that the tool captures network traffic while recording which is the core understanding that we must align when using this tool.<span id="more-305"></span></p>
<p>For example, an application can be developed using <strong>.NET 2.0</strong> framework, is window-based (<strong>Win32</strong>). This application can be part of a N-Tier architecture that utilizes <strong>HTTP</strong> or <strong>HTTPS</strong> to communicate to the middle-tiers or a 2-Tier architecture that talks to the database directly using <strong>ODBC</strong>,<strong> ADO</strong> or <strong>JDBC-ODBC</strong>.</p>
<p>Similarly, an application can be developed using Java, but it talks to the middle-tier using <strong>RMI-Java</strong> or <strong>HTTP</strong>, or to its database using <strong>JDBC</strong>.</p>
<p>Despite the language or the type of of Applications (Java or <strong>Win32</strong>, etc.), the Load Tester must understand the communication method in order to determine the protocol to be used. This is done by consulting the development team of the application (which usually the Load Tester do not have such knowledge).</p>
<p>To understand the protocol used by the application (client to server), you can do the following.</p>
<p>1. The easiest way, check with the application team or vendor, particularly the software architects and the developers. They should be able to provide such information. If they don’t, it ’s time to doubt the experiences of the application team.</p>
<p>2. Use <a title="WireShark Network Analyzer" href="http://www.wireshark.org/" target="_blank">WireShark Network Analyzer</a> to sniff the traffic communication when the application is running. More details of the usage can be found in the provider’s site. You should be able to see the protocols under the protocol column after you start capturing the traffic.</p>
<p>3. Use <strong>netstat -a</strong> to determine the protocol and port number. For example, the protocol is TCP and port number is 80, it could signifies HTTP. The caveat for this is that netstat -a only display protocol in <strong>IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP</strong>, or <strong>UDPv6</strong> (/? help for more information), which means you may need to guess the protocol according to the protocol (TCP) and port number.</p>
<p>4. Use <strong>Winsock</strong> protocol to determine the protocol via the data files. Winsock captures all traffic of any type at the socket level and writes it to the data file. From the data file, you will then find signatures of the protocol such as <strong>HTTP requests</strong> and <strong>responses</strong> in the context of HTTP.</p>
<p>Hopefully this methods are sufficient for you to determine the protocol used. Feel free to comment if you have a better method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/which-protocol-to-use/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Are client activities recorded by Vugen?</title>
		<link>http://www.loadrunnertnt.com/concepts/are-client-activities-recorded-by-vugen/</link>
		<comments>http://www.loadrunnertnt.com/concepts/are-client-activities-recorded-by-vugen/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 05:54:05 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Vugen]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=307</guid>
		<description><![CDATA[Vugen is NOT designed to record client-side activities. The main functionality of LoadRunner is to load test a server, a SUT (System Under Test), through emulating network traffic to load against the SUT. The network traffic is as mentioned previously in earlier posts, captured (sniffed) and replayed during the script creation. Client activity exist only [...]]]></description>
			<content:encoded><![CDATA[<p>Vugen is NOT designed to record client-side activities. The main functionality of <span style="font-weight: bold;">LoadRunner</span> is to load test a server, a <span style="font-weight: bold;">SUT (System Under Test)</span>, through emulating network traffic to load against the SUT. The network traffic is as mentioned previously in earlier posts, captured (sniffed) and replayed during the script creation. Client activity exist only on the client machine and does not contributes to the network traffic loading on the SUT. With no traffic being generated, Vugen will not be able to record anything and of course not replayed as no traffic is generated.</p>
<p><a href="http://support.openview.hp.com/" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;"><span id="more-307"></span>Mercury/HP Support</span></span></a> have provided some information on this particular topic in <a href="http://support.openview.hp.com/selfsolve/document/KM190712" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">Document ID 3803 &#8211; Nothing gets recorded while performing some client side activity</span></span></a> and <a href="http://support.openview.hp.com/selfsolve/document/KM195129" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">Document ID 42319 &#8211; VuGen is not replaying the rendering of an Excel file in the browser’s MS Excel plug-in</span></span></a>. In both articles, it just merely describes what is client side activity and it cannot be recorded. (Take note that you required a valid login to the support website to access the article.)</p>
<p>At the release of <span style="font-weight: bold;">LR 8.1 FP3</span>, a new protocol called <span style="font-weight: bold;">Web (Click &amp; Script)</span> was introduced. <a href="http://support.openview.hp.com/selfsolve/document/KM201537" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">Document ID 48261 &#8211; New Features/Enhancements for the Web Click and Script protocol in LoadRunner 8.1 Feature Pack 4</span></span></a> provides more details in it as an enhanced released of<span style="font-weight: bold;"> FP4</span>. This protocol “promises” that the scripting will be make easy and it will resolve some of the client-side activities such as <span style="font-weight: bold;">Javascripts</span>. However, to my experience, I wasn’t successful in using it (or maybe I missed out some steps concerning this new protocol)… anyway… you can give it a try in recording those web applications with Javascripts/<span style="font-weight: bold;">AJAX</span> or similar components embedded into the web application (if you have intentions in recording the client-side activities). I would be more concerned with actual load been generated to the SUT and will use the conventional <span style="font-weight: bold;">Web (HTTP/HTML</span>). Similarly, there is an AJAX protocol that was introduced in <span style="font-weight: bold;">LR 9</span> to record <strong>AJAX</strong> applications.</p>
<p>Having the concept in mind, I would like to go a little further with the following example.</p>
<p style="float: right; margin-right: 8px;">
<p>For activities such as, opening of file, editing in <span style="font-weight: bold;">Excel sheet</span>, or <span style="font-weight: bold;">bat</span> files performing copying operations are considered to be <span style="font-weight: bold;">client-side</span> activities. Think about it, do they generate any network traffic (unless you the activities really have a network call to a remote server)?</p>
<p>Another example is that if a web application allows opening of files such as documents over the browser (e.g.<span style="font-weight: bold;"> Sharepoint</span>). The underlying mechanism for the file opening operation still requires a client installation of the program (e.g. <span style="font-weight: bold;">MS Word</span>), and subsequent activities are done locally on the client machine even though it exist in a browser. This of course is also considered as a <span style="font-weight: bold;">client-side</span> activity.</p>
<p>So, before recording the application, please ensure that you know the functionality of the Business Process that you are recording and determine if it is a client or server activity. This will greatly reduce the unneccessary effort in scripting and later realizing that it is client activity. If it is a client activity, a no-go, wrong tool for the job! It served no purpose of the tool to conduct non-performance tests. Consider other tools such as <span style="font-weight: bold;">Quick Test Professional </span>or <span style="font-weight: bold;">Silk Test</span> for functional testing client-activities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/are-client-activities-recorded-by-vugen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Should I configure Step Download Timeout?</title>
		<link>http://www.loadrunnertnt.com/concepts/should-i-configure-step-download-timeout/</link>
		<comments>http://www.loadrunnertnt.com/concepts/should-i-configure-step-download-timeout/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 05:21:51 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Step Download Timeout]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=297</guid>
		<description><![CDATA[Previously, in article, “Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s) [MsgId: MERR-27728]” for Step Download Timeout error and the referencing materials that can be useful to you. Here, we are going to touch on the “What should I do?” question.
1. Tell your clients/users that the application failed to respond in [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, in article, <span style="text-decoration: underline;"><span style="color: #0066cc;"><a href="http://www.loadrunnertnt.com/?p=142" target="_blank">“Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s) [MsgId: MERR-27728]”</a> </span></span>for <span style="font-weight: bold;">Step Download Timeout </span>error and the referencing materials that can be useful to you. Here, we are going to touch on the “What should I do?” question.<span id="more-297"></span></p>
<p><span style="text-decoration: underline;">1. Tell your clients/users that the application failed to respond in the 120 secs time frame</span></p>
<p>Well, straight-forward. This is because it failed the <span style="font-weight: bold;">120 secs benchmark</span>, an equivalent of <span style="font-weight: bold;">2 mins</span>. Imagine a normal application not responding within 2 minutes is serious where we are anticipating an average respond time of 10 secs!. However, take note that if your application can respond more than 120 sec, then consider the next suggestion.</p>
<p><a href="http://www.useit.com/papers/responsetime.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: Jakob Nielsen, Response Times: The Three Important Limits)</span></span></a></p>
<p><span style="text-decoration: underline;">2. Set the Step Download Timeout to 999 secs </span></p>
<p>This was brought out in the <a href="http://groups.yahoo.com/group/loadrunner" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">LoadRunner Yahoo Group</span></span></a>. <strong>Why 999 secs?</strong> The benefit of doing this is that you are able to determine the response time from the application in the 999 seconds limit without allowing it to fail. This is good when you want to measure the<span style="font-weight: bold;"> actual timing</span> without defining a benchmark.</p>
<p><span style="text-decoration: underline;">3. Limit the Step Download Timeout to the expected response time</span></p>
<p>For this, discuss with your clients/users about the requirements for expected response time. Once you gotten the information, configure the <span style="font-weight: bold;">Step Download Timeout</span> accordingly to the expected response time. In this way, you are able to tell if the application pass or fail immediately against the <span style="font-weight: bold;">expected response time</span>. But if your clients/users wants to know the actual time taken, then it would be advisable to follow the suggestion in point [2].</p>
<p>Hope this will help you have a better understanding on the impact when you configured the Step Download Timeout and assist you in your followup actions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/should-i-configure-step-download-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between HTML-mode, URL-mode and GUI-mode recording</title>
		<link>http://www.loadrunnertnt.com/concepts/difference-between-html-mode-url-mode-and-gui-mode-recording/</link>
		<comments>http://www.loadrunnertnt.com/concepts/difference-between-html-mode-url-mode-and-gui-mode-recording/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 05:13:45 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=292</guid>
		<description><![CDATA[When you are starting to record a web application, you should be aware of the HTML-mode and URL-mode recording that a Web (HTTP/HTML) protocol has to offer. Today, we will just briefly talk about the differences (in general) and how it applies to your script.
HTML-mode
HTML-mode recording is the default and recommended recording mode. It records [...]]]></description>
			<content:encoded><![CDATA[<p>When you are starting to record a web application, you should be aware of the <strong>HTML-mode</strong> and <strong>URL-mode</strong> recording that a <strong>Web (HTTP/HTML) protocol</strong> has to offer. Today, we will just briefly talk about the differences (in general) and how it applies to your script.<span id="more-292"></span></p>
<p><span style="text-decoration: underline;">HTML-mode</span></p>
<p><strong>HTML-mode recording</strong> is the default and recommended recording mode. It records HTML action in the context of the <strong>current</strong> Web page (which means everything you see on the web page will be recorded in a single function). However, having mentioned the above, it can be configured to your needs on the level of resources you want to record (Refer to Vugen User Guide, “Setting Recording Options for Web Vusers” for more information).</p>
<p><a href="http://tech.groups.yahoo.com/group/LoadRunner/message/23865" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: LoadRunner Yahoo Group)</span></span></a><br />
<!--adsensestart--><br />
The advantage of this mode is that it generates a script that is intuitive to the reader in terms of what is the form requesting (in a form of entire web page). Readers of the scripts will then be able to recognize each “logical” requests/call made to the server, making amendments to the script easily.</p>
<p><span style="text-decoration: underline;">URL-mode</span></p>
<p>The <strong>URL-mode</strong> option instructs <strong>VuGen</strong> to record all requests and resources from the server. It automatically records every <strong>HTTP</strong> resource as <strong>URL</strong> steps. This recording mode captures even <strong>non-HTML</strong> applications such as applets and non-browser applications.</p>
<p><a href="http://tech.groups.yahoo.com/group/LoadRunner/message/23865" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: LoadRunner Yahoo Group)</span></span></a></p>
<p>The advantage of this mode is that it generates a script that has all known resources downloaded for your viewing. This works good with non-HTML applications such as <strong>applets</strong> and <strong>non-browser</strong> applications (e.g. Win32 executables). But having everything together creates another problem of overwhelming low-level information and making the script unintuitive.</p>
<p>When there are unrecognizable requests made to the server in <strong>Web (HTTP/HTML)</strong> protocol, they are recorded as <strong>web_custom_request</strong>. However, in URL-mode, this can be selected to allow recording to default to web_custom_request.</p>
<p><span style="text-decoration: underline;">GUI-mode</span></p>
<p>This is introduced with <strong>Web (Click &amp; Script)</strong> protocol. The <strong>GUI-mode</strong> option instructs VuGen to record all editable fields in an object or non-browser applications. What it does is to detect the fields that have been edited and generate the scripts accordingly. The concept is similar to <strong>functional testing</strong> when objects are detected at the <strong>GUI-level</strong>. When reading the script, it allows easier reading as the script is based on the GUI presented to the real user.</p>
<p align="center"><strong>Different modes of recording in LoadRunner</strong></p>
<p align="center"><strong><img class="aligncenter" title="Different modes of Recording" src="http://loadrunnertnt.com/images/Different_modes_of_recording.JPG" alt="" width="440" height="210" /><br />
</strong></p>
<p>Hope that helps give an overview of what and how you should choose in recording the Web (HTTP/HTML) protocol. My recommendation is to stick with the defaults unless you are facing issues with recording and if the application you are working with is not of browser natural.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/difference-between-html-mode-url-mode-and-gui-mode-recording/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Configuring Real User Behavior in LoadRunner &#8211; Time</title>
		<link>http://www.loadrunnertnt.com/concepts/configuring-real-user-behavior-in-loadrunner-time/</link>
		<comments>http://www.loadrunnertnt.com/concepts/configuring-real-user-behavior-in-loadrunner-time/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 05:02:05 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=286</guid>
		<description><![CDATA[In Loadrunner, there are features to emulate real user behavior and in today’s article, we will briefly touch on the type of configuration/techniques available. Take note that we are not covering the emulation of locality and network-related issues. These will be covered in subsequent articles. Configurables for user behavior in Vugen are as followed:
1. Think [...]]]></description>
			<content:encoded><![CDATA[<p>In <strong>Loadrunner</strong>, there are features to emulate real user behavior and in today’s article, we will briefly touch on the type of configuration/techniques available. Take note that we are not covering the emulation of locality and <strong>network-related</strong> issues. These will be covered in subsequent articles. Configurables for user behavior in <strong>Vugen</strong> are as followed:<span id="more-286"></span></p>
<p>1. Think Time</p>
<p>2. Action Blocks</p>
<p>3. Pacing</p>
<p>4. Iteration</p>
<p>Configurables for user behavior in <strong>Controller</strong> are as followed:</p>
<p>5. Ramp-up and Ramp-down rate</p>
<p>6. Rendezvous</p>
<p>We will go through the details of the configuration in future posts. Do stay tuned to it. For the purpose of the discussion, we will relate to a <strong>web application</strong> with form submission ability.</p>
<p><span style="text-decoration: underline;">[1] Think Time</span></p>
<p><strong>Think Time</strong> is a value that emulates the time the real user is thinking, performing an action or doing nothing at all. This value is being recorded as it is during the recording process.</p>
<p>Why do we need Think Time? Think time represent the real time used by the <strong>user</strong> perform their daily task. Note that when Vugen records, it records network traffic. During replay, it merely runs the script to re-generate <strong>network traffic</strong>. In this way, if think time is not included in the replay, the script will run without any delay (consideration of the time needed by users to think, act and wait) which will replay as a more like a robot than human.</p>
<p>E.g.</p>
<p>You want to <strong>emulate</strong> the user typing and reading the form before the submission which may take approximately 20secs.</p>
<p><span style="text-decoration: underline;">[2] Action Blocks</span></p>
<p><strong>Action Blocks</strong> allow different <strong>activities</strong> to be performed either concurrently or mutually exclusively. This is useful when you define the <strong>virtual user</strong> to be more humane as it has more “options/choices” to execute its activity.</p>
<p>E.g</p>
<p>You want to <strong>emulate</strong> the user to perform submission for 7 times. After the 7th submission, you want the user to review the submitted forms.</p>
<p><span style="text-decoration: underline;">[3] Pacing</span></p>
<p><strong>Pacing</strong> is the <strong>time interval</strong> between <strong>Action Blocks</strong>. This may be needed when you want to have a delay between the actions you’ve created, creating a more realistic replay. As mentioned in <strong>Think Time</strong>, if no delay is involved, the script will replay excatly like a robot.</p>
<p>E.g.<br />
You want to emulate the user having delays from the 1st form submission to the Nth form submission as the user maybe running some other errands between each submissions. This delay is then configured to the estimated errand time.</p>
<p><span style="text-decoration: underline;">[4] Iteration</span></p>
<p><strong>Iteration</strong> allows the action block to be repeated per script. This is useful when the real user accessing the application maybe performing a particular action more than once.</p>
<p>E.g.<br />
You want to emulate the user performing same submissions for 20 times.</p>
<p><span style="text-decoration: underline;">[5] Ramp up and Ramp-down Rate</span></p>
<p>This is the <strong>rate</strong> at which you are emulating the users to access the application. In a <strong>real world scenario</strong>, users will access the system at different timing of the day. As such, <strong>ramp-up</strong> rate helps to <strong>emulate</strong> such behavior. This is the same as for ramp-down where you configure the rate the virtual users to exit the application.</p>
<p>E.g.<br />
You want to emulate the users accessing the application at 9am, 9:15am, 9:30am, 9:45am and 10am at a rate of 5 users in each 15min interval.</p>
<p><span style="text-decoration: underline;">[6] Rendezvous</span></p>
<p>When you want to <strong>emulate</strong> a certain amount of users accessing the application at the same time, <strong>Rendezvous</strong> point becomes useful in consolidating the users to a certain time and releasing them accordingly to your configuration.</p>
<p>E.g.<br />
You want to emulate 10 users reviewing the submitted form at the same time after submission at the same time. In <strong>Vugen</strong>, you define the point in the script where the virtual users will wait for 10 users to arrive at the same point before continuing the business process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/configuring-real-user-behavior-in-loadrunner-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Java recording in LoadRunner!</title>
		<link>http://www.loadrunnertnt.com/concepts/introducing-java-recording-in-loadrunner/</link>
		<comments>http://www.loadrunnertnt.com/concepts/introducing-java-recording-in-loadrunner/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:50:50 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=277</guid>
		<description><![CDATA[LoadRunner provides the capability of load testing Java-related applications. If you are new and unfamiliar with how LoadRunner works and the relations with protocols, I would recommend to review &#8220;What&#8217;s LoadRunner?&#8221; and &#8220;Which protocol to use?&#8221; to have an understanding before proceeding. In this article, we will provide a brief introduction to working with Java-related [...]]]></description>
			<content:encoded><![CDATA[<p>LoadRunner provides the capability of load testing Java-related applications. If you are new and unfamiliar with how LoadRunner works and the relations with protocols, I would recommend to review <a title="What’s LoadRunner?" href="http://www.loadrunnertnt.com/?p=17" target="_blank">&#8220;What&#8217;s LoadRunner?&#8221;</a> and <a title="Which protocol to use?" href="http://www.loadrunnertnt.com/?p=305" target="_blank">&#8220;Which protocol to use?&#8221;</a> to have an understanding before proceeding. In this article, we will provide a brief introduction to working with Java-related applications in LoadRunner that you will have to take note.<span id="more-277"></span></p>
<p><span style="text-decoration: underline;">1. Introduction</span></p>
<p>Before we start choosing Java-related protocols to perform recording, you will need to understand the protocol that the Java application is using to communicate with the server. It maybe the case where the Java application is communicating via <strong>HTTP</strong> rather than <strong>RMI-Java</strong>, etc… If you have identified that the application is communicating with a Java related protocol, you can safely proceed to choose the relevant Java protocol.</p>
<p style="float: right; margin-right: 8px;">
<p>For Java-related protocol, the recording works in the same way as <strong>.NET</strong> and <strong>COM/DCOM</strong> protocol. All of them share the same characteristics but I will specify to just Java and only Java recording. Pure Java <strong>scripting</strong> will be excluded in this article.</p>
<p>Unlike .NET and COM/DCOM, Vugen provides an interface to manage and <strong>filter</strong> the classes and methods via the GUI which is very convenient to the user. Hopefully, Mercury/HP may consider that in future.</p>
<p><span style="text-decoration: underline;">2. Classes and Methods</span></p>
<p>You will need the knowledge of the <strong>classes</strong> and <strong>methods</strong> prior recording; and usually this information is held by the developers. The need to know the classes and methods is crucial because, <strong>LoadRunner (Vugen)</strong> implements a <strong>hooking mechanism</strong> to hook the traffic on the classes.</p>
<p style="float: right; margin-right: 8px;">
<p>If you do not know what classes are needed for the load test, and allow LoadRunner to capture all <strong>traffic</strong> on the classes, you may result in excessive capturing such as <strong>GUI</strong> clicks or <strong>client activities</strong>. On the other hand, if you did not specify the actual classes involve in the load test, you may miss out on the real class being used.</p>
<p>The above mention is based on the default Java hooking mechanism that LoadRunner implements. But if you required to have additional classess you need to record, you will need to configure the hooking mechanism that will be covered in subsequent post. This is also the reason the knowledge of the classes and methods come in important.</p>
<p><span style="text-decoration: underline;">3. JDK and JRE</span></p>
<p>Other than the knowledge of the <strong>classess</strong> and <strong>method</strong>, you will need to know the JDK of the application. By default, Sun Microsystems <strong>JDK</strong> (SDK) works with LoadRunner.</p>
<p>There will be scenarios that your application is not using te Sun JDK such as <strong>IBM JDK</strong>. If that is the case, my advise is to check with Mercury/HP on the <strong>compatibility</strong> level and this will save you lots of effort. In my experience, usually they are not as fully supported as compared to Sun JDK.</p>
<p>The minimum supported JDK is JDK 1.3 for <strong>LoadRunner 8.1</strong> as of this writing. Take note that the recording is still very dependant on the JDK version installed. That is, if your application is JDK 1.6, you will have to install this version on the recording machine.</p>
<p>Lastly, <strong>JRE</strong> is insufficient for the recording to be successful. Ensure that JDK is installed.</p>
<p><span style="text-decoration: underline;">4. Recording-specified</span></p>
<p style="float: right; margin-right: 8px;">
<p><strong>LoadRunner Vugen</strong> implements an API that hooks into the selected classes and record the traffic. Therefore, as pointed earlier, knowing the correct <strong>classes</strong> to hook is crucial.</p>
<p>With the hooking in place, GUI classes or client-side activities maybe recorded via the hook. However, this is not recommended as it does not contribute to the load generation towards the server. I will share with you the recording details in another article. Do stay tuned for it.</p>
<p><span style="text-decoration: underline;">5. Scenario Execution</span></p>
<p>Prior the scenario execution in the <strong>Controller</strong>, ensure that <strong>JDK</strong> have be installed on the Load Generators. The scripts sent (refer to the article,<a title="4 Points to note for Scenario Execution!" href="http://www.loadrunnertnt.com/?p=279" target="_blank">&#8220;4 points to note for Scenario Execution&#8221;</a> for more information) are Java scripts, and require <strong>JVM</strong> to run.</p>
<p><span style="text-decoration: underline;">6.Documentations</span></p>
<p>If you like to know more information from the official provider, you can refer to the <strong>Vugen User Guide</strong> that is provided in each installation of <strong>LoadRunner</strong> in PDF format. Specifically the following chapters:</p>
<ul>1. All chapters in Part II: Working with Java Language Protocols<br />
2. Chapter 18: Developing Corba-Java Vuser Script<br />
3. Chapter 19: Developing RMI-Java Vuser Scripts.</ul>
<p><span style="text-decoration: underline;">7. Samples</span></p>
<p>Also, if you like to get a feel of working with <strong>Java protocol</strong>, I would recommend using the sample example provided with every installation of LoadRunner. It will at least get you understand what will happened and the expected output when recording Java language applications.</p>
<p>That comes to the end of the introduction of the workings of <strong>Java language protocol</strong> in LoadRunner, things to watch out and additional resources to pertaining to the topic. Do take note that Java is not as straight-forward as Web(HTTP/HTML) and therefore give it additional attention when working on such load testing projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/introducing-java-recording-in-loadrunner/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

