<?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>ASI &#187; Tools</title>
	<atom:link href="http://www.asi-test.com/ASI/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.asi-test.com/ASI</link>
	<description>Automated Solutions, Inc. - Leadership in Software Development, Testing &#38; Test Automation</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:38:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>QTP &#8211; Saving your test run data</title>
		<link>http://www.asi-test.com/ASI/qtp-saving-your-test-run-data/</link>
		<comments>http://www.asi-test.com/ASI/qtp-saving-your-test-run-data/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 16:58:02 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[data table]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[exportsheet]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[test results]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=845</guid>
		<description><![CDATA[You can&#8217;t actually modify the data permanently in the datatable associated with the test script during a test run but there are two approaches you can take in order to save the data into an external file that you can use later.  During &#8220;run-time&#8221; a copy of the datatable is created as the &#8220;run-time datatable&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>You can&#8217;t actually modify the data permanently in the datatable associated with the test script during a test run but there are two approaches you can take in order to save the data into an external file that you can use later. <span id="more-845"></span> During &#8220;run-time&#8221; a copy of the datatable is created as the &#8220;run-time datatable&#8221; and anything you write to the datatable is actually stored in this &#8220;run-time table&#8221; which is actually another instance of the datatable saved with the Test Run.  This has its Pros and Cons depending on how you look at it.  Regardless of your view if you want to permanently save your test data then you basically have two choices:</p>
<ol>
<li>You can use the &#8220;DataTable.Export&#8221; method or &#8220;DataTable.ExportSheet&#8221; method to literally create a new .xls file of the workbook or specified worksheet, and have this new file saved in your file system (locally or on the network).  With this approach you can then use that datatable/spreadsheet however you want including importing it into the permanent datatable attached to the test script if you want.<br />
<img class="aligncenter size-full wp-image-846" title="QTP Export Method for use with the DataTable" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/ExportMethod.png" alt="QTP Export Method for use with the DataTable" width="560" height="445" /><br />
<img class="aligncenter size-full wp-image-847" title="QTP ExportSheet Method for use with the DataTable" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/ExportSheet.png" alt="QTP ExportSheet Method for use with the DataTable" width="560" height="593" /></li>
<li>Also keep in mind that your Test Results Report will show you the data used and created during the test run.  You can view this in the &#8220;Data Table&#8221; in the test report itself.<br />
<img class="aligncenter size-full wp-image-849" title="QTP Test Report showing the Run-Time Data Table" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/TestReport1.png" alt="QTP Test Report showing the Run-Time Data Table" width="587" height="646" /><br />
You can then export that data into an external file too, from the report.  The steps are slightly different depending on the version of QTP you are using, but from QTP v11 you would simply select &#8220;File &gt; Export to File&#8230;&#8221; and then select &#8220;Data Table&#8221; from the &#8220;Report type&#8221; drop-down list.  When you click the &#8220;Export&#8221; button you can then specify a new name and location for the data file (.xls).  This will export ALL the data in the datatable (all the worksheets will be exported this way).  Like the previous approach, you now have an external .xls file that you can now do whatever you want with it, including importing it back into the permanent datatable attached to the test script.</li>
</ol>
<p><img class="aligncenter size-full wp-image-848" title="QTP Test Report Export option to save off the run-time data table" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/TestReport_Export.png" alt="QTP Test Report Export option to save off the run-time data table" width="408" height="298" /></p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/qtp-saving-your-test-run-data/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/qtp-saving-your-test-run-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QTP &#8220;AddWastedTime&#8221; function</title>
		<link>http://www.asi-test.com/ASI/qtp-addwastedtime-function/</link>
		<comments>http://www.asi-test.com/ASI/qtp-addwastedtime-function/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 17:25:30 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[addwastedtime]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=825</guid>
		<description><![CDATA[QuickTest Pro Tips &#38; Tricks: This article compliments the post &#8220;QTP Performance Testing for a Single User&#8221; found on my website.  During the process of logging how long a process takes, you may know that you have some processing time that you do not want to take into account.  You may have some &#8220;wait&#8221; statements [...]]]></description>
			<content:encoded><![CDATA[<p>QuickTest Pro Tips &amp; Tricks: This article compliments the post &#8220;<a title="&quot;QTP Performance Testing for a Single User&quot;" href="http://www.asi-test.com/ASI/qtp-performance-testing/">QTP Performance Testing for a Single User</a>&#8221; found on my website.  During the process of logging how long a process takes, you may know that you have some processing time that you do not want to take into account.  You may have some &#8220;wait&#8221; statements in your test script to create some delays for the automation script or potentially a side process that you don&#8217;t want to include in the overall timing.  In this case you would want to use the function &#8220;AddWastedTime&#8221; to your test script. <span id="more-825"></span> This will enable you to either specify a specific amount of time that you want logged as &#8220;Wasted Time&#8221; or you can use the &#8220;MercuryTimers&#8221; to record how long a section of code takes and that is the time you wanted recorded as the &#8220;Wasted Time&#8221;.  Here&#8217;s a simple example of using the &#8220;AddWastedTime&#8221; with the &#8220;Start/End Transaction&#8221; functions and the &#8220;MercuryTimers&#8221;.</p>
<p><img class="aligncenter size-full wp-image-826" title="Example Code1" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/Example-Code1.png" alt="QuickTest Pro AddWastedTime function" width="590" height="611" /></p>
<p>Let&#8217;s breakdown this simple script, I have three transaction times being recorded &#8211; &#8220;trans1&#8243;, &#8220;trans2&#8243; and &#8220;trans3&#8243;.  &#8220;trans1&#8243; encapulates &#8220;trans2&#8243;, and &#8220;trans3&#8243; logs its own time at the end of the script.</p>
<p><img class="aligncenter size-full wp-image-827" title="Example Code2" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/Example-Code2.png" alt="QuickTest Pro AddWastedTime function" width="590" height="611" /></p>
<p>The timers and duration times breakdown as follows:</p>
<p>&#8220;trans2&#8243; &#8211; this transaction actually completes before the &#8220;trans1&#8243; because it is contained within the &#8220;trans1&#8243; wrapper (nested within the &#8220;trans1&#8243; code), so if we look at the results for &#8220;trans2&#8243; you will see that it contains a &#8220;wait 3&#8243; statement and an &#8220;AddWastedTime&#8221; of 1000 milliseconds (which is 1 second).  In looking at the test results report you can see that the &#8220;Total Duration&#8221; time is 3.0300 seconds (the 3 seconds from the &#8220;wait&#8221; statement and a slight delay for the execution of the statements themselves) and it also logs the &#8220;Wasted Time&#8221; of 1 second.</p>
<p><img class="aligncenter size-full wp-image-829" title="trans2results" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/trans2results.png" alt="QuickTest Pro AddWastedTime function Test Results" width="593" height="524" /></p>
<p>&#8220;trans1&#8243; &#8211; this has a total duration time of approximately 12 seconds.  Simply add up the &#8220;wait&#8221; statements contained within the &#8220;trans1&#8243; transaction wrapper and add a slight delay for the execution of the statements themselves.  As you can see in this image the &#8220;Total Duration&#8221; time is 12.1080 seconds.  Now the &#8220;Wasted Time&#8221; is all the &#8220;AddWastedTime&#8221; statements contained within the &#8220;trans1&#8243; wrapper, so this includes the &#8220;Services.AddWastedTime MercuryTimers(&#8220;timer1&#8243;).Stop&#8221; statement (which is a dynamic statement based on the &#8220;MercuryTimers(timer1)&#8221; wrapper around a subset of code (the &#8220;wait 4&#8243; statement in this case &#8211; however this would normally be a real chunk of code)) and the &#8220;Services.AddWastedTime 1000&#8243; which is a hardcoded value where we are saying that &#8220;we want to reduce the time by 1 second&#8221;.  Added together this is 5 seconds with a slight delay for the execution of the statements themselves &#8211; which as you can see in the test results report is 5.0190 seconds of &#8220;Wasted Time&#8221;.</p>
<p><img class="aligncenter size-full wp-image-828" title="trans1results" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/trans1results.png" alt="QuickTest Pro AddWastedTime function Test Results" width="593" height="524" /></p>
<p>&#8220;trans3&#8243; &#8211; Finally we have the last transaction time being recorded and notice it is outside of the &#8220;trans1&#8243; wrapper.  So this is self-contained code at the end of the script and logs its own time which in this case is a hardcoded 1 second using the &#8220;Services.AddWastedTime 1000&#8243; statement.  Notice the timers from above do not affect this timer.</p>
<p><img class="aligncenter size-full wp-image-830" title="trans3results" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/trans3results.png" alt="QuickTest Pro AddWastedTime function Test Results" width="593" height="524" /></p>
<p>As you can see the &#8220;Wasted Time&#8221; is logged in the Test Results for a normal QTP test process, and realize it is also integrated with LoadRunner and the Business Process Monitor.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/qtp-addwastedtime-function/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/qtp-addwastedtime-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VBScript InputBox function</title>
		<link>http://www.asi-test.com/ASI/vbscript-inputbox-function/</link>
		<comments>http://www.asi-test.com/ASI/vbscript-inputbox-function/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 18:23:42 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[inputbox]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=816</guid>
		<description><![CDATA[QuickTest Pro Tips &#38; Tricks: You can spawn an Edit Box from within your QuickTest Pro test script using the &#8220;InputBox&#8221; VBScript function.  This function will open up an Edit box where you can type in a value.  The help syntax is as follows: Be aware that there are Pros and Cons to using this function [...]]]></description>
			<content:encoded><![CDATA[<p><strong>QuickTest Pro Tips &amp; Tricks:</strong> You can spawn an Edit Box from within your QuickTest Pro test script using the &#8220;<strong>InputBox</strong>&#8221; VBScript function.  This function will open up an Edit box where you can type in a value.  The help syntax is as follows: <span id="more-816"></span></p>
<p><img class="aligncenter size-full wp-image-820" title="HelpSyntax" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/HelpSyntax.png" alt="VBScript InputBox Help Syntax" width="600" height="623" /></p>
<p>Be aware that there are <em><span style="text-decoration: underline;">Pros</span> and <span style="text-decoration: underline;">Cons</span></em> to using this function in a QuickTest Pro automation script.</p>
<p><span style="text-decoration: underline;"><strong>Pro:</strong></span> Using this function you can define an Edit box to appear that you can prompt for a value from the user that you can then use in your test script.  The function has several parameters but the most common parameters used are the &#8220;prompt&#8221; (which is the only required parameter), title and default (which is the default value to automatically pre-populate if you want).  The other parameters are used less often.  The value that is entered is then passed back to the script as a return value and can be captured in a variable to be used within your test script.  Here is an example of using it to retrieve a security code during test execution.</p>
<p><img class="aligncenter size-full wp-image-817" title="VBScript Input Box example" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/Example1.png" alt="VBScript Input Box example" width="626" height="722" /></p>
<p>Notice in this image how the statement generates this edit box.  You can then enter a value in the edit field to be passed back to the script like in this image.  Notice the value entered into the edit field, it will be passed back as the return value and in this example it will get stored in the variable &#8220;vReturnValue&#8221; based off the example in this image.</p>
<p><img class="aligncenter size-full wp-image-818" title="VBScript Input Box example with value" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/Example2.png" alt="VBScript Input Box example with value" width="626" height="722" /></p>
<p>Notice in this final image, the InputBox statement has been executed and we are now paused on the wait statement so that we can examine the variables.  In looking at the variable in the Debug Viewer, notice how the variable has the value that was entered in the edit box.</p>
<p><img class="aligncenter size-full wp-image-819" title="VBScript Input Box example with return value" src="http://www.asi-test.com/ASI/wp-content/uploads/2012/01/Example3.png" alt="VBScript Input Box example with return value" width="626" height="437" /></p>
<p><span style="text-decoration: underline;"><strong>Con:</strong></span> The con to using this function in a QuickTest Pro automation script is that it requires interaction from a user.  The biggest goal that you are always trying to achieve with test automation is to get &#8220;long term unattended testing&#8221; which means your script needs to be able to execute without any user interaction.  This function requires a response from a user and will just sit there forever until it gets a response.  So be careful on using this.  If you really want to use this function then I would recommend putting it at the very beginning of any automated process so that you could enter in all the values immediately and then be able to walk away from the process and let it run independently from you.  However my recommendation on better options for getting a value for your automation is to have this value retrieved from one of these options, retrieve it from:<br />
- a variable or constant from within your test script<br />
- from a text file that the script opens and reads from<br />
- from an environment variable<br />
- or from a parameter passed in from another script</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/vbscript-inputbox-function/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/vbscript-inputbox-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QTP Performance Testing for a Single User</title>
		<link>http://www.asi-test.com/ASI/qtp-performance-testing/</link>
		<comments>http://www.asi-test.com/ASI/qtp-performance-testing/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 18:01:02 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[timers]]></category>
		<category><![CDATA[transaction]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=802</guid>
		<description><![CDATA[Performance testing can be done with QTP, but in a limited scope &#8211; only from a single user standpoint, for functional testing.  Years ago when the &#8220;QTP VUser&#8221; for LoadRunner was introduced they incorporated the &#8220;start_transaction&#8221; &#38; &#8220;end_transaction&#8221; functions.  These are used by LoadRunner for tracking performance timings for load testing, but you can also [...]]]></description>
			<content:encoded><![CDATA[<p>Performance testing can be done with QTP, but in a limited scope &#8211; only from a single user standpoint, for functional testing.  Years ago when the &#8220;QTP VUser&#8221; for LoadRunner was introduced they incorporated the &#8220;start_transaction&#8221; &amp; &#8220;end_transaction&#8221; functions.  These are used by LoadRunner for tracking performance timings for load testing, but you can also use them in a regular QTP test script for functional testing. <span id="more-802"></span>  These statements have been updated to &#8220;Services.StartTransaction &#8220;&lt;transaction name&gt;&#8221; &#8221; and &#8220;Services.EndTransaction &#8220;&lt;same transaction name&gt;&#8221; &#8220;.</p>
<p style="text-align: center;"><img class="size-full wp-image-809 aligncenter" title="StepGenerator" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/StepGenerator1.png" alt="QTP Step Generator for StartTransaction" width="356" height="491" /></p>
<p>These statements will log the duration time to the Test Results Report, which will tell you how long the &#8220;process&#8221; that resides between the two statements took to execute.  Typically what you would do is wrap a submission or transaction process to see how long it is taking; like submitting an order or new user profile.  In using the QTP training application we will time the submission of the order, so find the &#8220;Insert Order&#8221; button statement and your synchronization statement to know when the insert process has completed. </p>
<p><img class="aligncenter size-full wp-image-805" title="Test Script" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/Script1.png" alt="QTP Test Script" width="592" height="535" /></p>
<p>So just before the &#8220;Insert Order&#8221; button you would put a Services.StartTransaction &#8220;InsertOrder&#8221; statement and once you are synchronized on the success of the submission of the order you will have an Services.EndTransaction &#8220;InsertOrder&#8221; statement (placed right after the sychronization statement).</p>
<p><img class="aligncenter size-full wp-image-806" title="Script with Transaction statements" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/Script2.png" alt="QTP Test Script with Transaction statements" width="592" height="501" /></p>
<p>This will tell you how long it took to insert a new order and you can pass or fail this test step based on your functional requirements as to how long is an acceptable timeframe.  These statements will log the results to the Test Results Report directly and appear like this:</p>
<p><img class="aligncenter size-full wp-image-803" title="QTP Test Results" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/Results1.png" alt="QTP Test Results for Transaction statements" width="631" height="615" /></p>
<p>The disadvantage of this statement is that it only logs the results to the Test Results Report, so you don&#8217;t have the actual time within the test script in order to code your own logic on passing or failing the statement.  People complained about this for many years and finally they came out with a new function prior to the sale of &#8220;Mercury Interactive&#8221; to &#8220;HP&#8221;, so the function name actually has the old company name contained in it.  The functions are &#8220;MercuryTimers(&#8220;&lt;timer name&gt;&#8221;).Start&#8221; and &#8220;MercuryTimers(&#8220;&lt;timer name&gt;&#8221;).Stop&#8221;.  The Stop function returns the duration time as a return code so you can use it within your test script.  You would use this function the same as the StartTransaction statements; identify were in the test script you want the statements and then type these statements in (note that using the Step Generator will produce the wrong syntax so it is best to just manually type the statement in your test script in the Expert View.</p>
<p><img class="aligncenter size-full wp-image-807" title="ScriptTimers" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/ScriptTimers.png" alt="QTP Test Script showing the use of the Timers functions" width="592" height="541" /></p>
<p>Notice that I added a &#8220;msgbox&#8221; statement to display the duration time so that you can see how it is returned as a return value into a variable and can be used in the test script.  Notice that the time is returned in milliseconds.</p>
<p><img class="aligncenter size-full wp-image-811" title="Timing Run" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/TimingRun1.png" alt="QTP Test Script using Timers and displaying the returned time value" width="603" height="721" /></p>
<p>The odd thing is that when Mercury added this function to QTP in order to provide you with the duration time as a return code within the script, they didn&#8217;t keep the feature of also logging it to the Test Results Report.  Notice in this image that there is no reference to the fact that the &#8220;MercuryTimers&#8221; function was executed. </p>
<p><img class="aligncenter size-full wp-image-810" title="Timing Report" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/TimingReport.png" alt="QTP Test Results Report showing no log of the Timers function" width="631" height="615" /></p>
<p>So if you want to log the time to the Test Results Report (which I highly recommend so that you have a log of the duration time) then you will want to add your own &#8220;Reporter.ReportEvent&#8221; statement.</p>
<p><img class="aligncenter size-full wp-image-808" title="Script Timers" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/ScriptTimers2.png" alt="QTP Test Script using Timers in a conditional statement" width="595" height="541" /></p>
<p>And then the report will have entries for each timing and because I used a conditional statement to verify the duration time against the functional requirement of taking less than 6 seconds, I can then pass and fail the statement automatically.</p>
<p><img class="aligncenter size-full wp-image-804" title="Results Timer" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/12/Results2Timer.png" alt="QTP Test Results showing the log of the timers value using the Reporter.ReportEvent statements" width="631" height="486" /></p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/qtp-performance-testing/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/qtp-performance-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing Test Settings During Test Execution</title>
		<link>http://www.asi-test.com/ASI/changing-test-settings/</link>
		<comments>http://www.asi-test.com/ASI/changing-test-settings/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 18:15:06 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[ASI General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[iteration]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[timeout]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=756</guid>
		<description><![CDATA[QTP Coding Tip: There are a variety of test setting in QuickTest Pro, and you can change the Test Settings in QuickTest Pro from within your test script during test execution if you have a need to.  Some examples are as follows. Changing Object Synchronization Timeout from within a QTP script: oldTimeout=Setting("DefaultTimeOut") Setting("DefaultTimeOut")="19000" currTimeout=Setting("DefaultTimeOut") msgbox [...]]]></description>
			<content:encoded><![CDATA[<p>QTP Coding Tip: There are a variety of test setting in QuickTest Pro, and you can change the Test Settings in QuickTest Pro from within your test script during test execution if you have a need to.  Some examples are as follows.</p>
<p>Changing Object Synchronization Timeout from within a QTP script: <span id="more-756"></span></p>
<table width="680" border="2" align="center" bgcolor="silver">
<tbody>
<tr>
<td><code><span style="color: #000000;">oldTimeout=Setting("DefaultTimeOut")<br />
Setting("DefaultTimeOut")="19000"<br />
currTimeout=Setting("DefaultTimeOut")<br />
msgbox ("old timeout="&amp; oldTimeout&amp;" and the current timeout is: "&amp;currTimeout)</span><br />
</code></td>
</tr>
</tbody>
</table>
<p>To figure out the setting name of other items that you can change, simply open the Test &gt; Settings window and click the Generate script button. This will produce a text file that can be used to launch your QTP instance from a script (basically using the QTP API). We are not going to execute the script but use it to get the proper setting names for the various settings that we can change from within our test script. Open the file in notepad and look at the names. The file should look similar to this:</p>
<table width="680" border="2" align="center" bgcolor="silver">
<tbody>
<tr>
<td><code><span style="color: #000000;">Dim App 'As Application</span><br />
<span style="color: #000000;">Set App = CreateObject("QuickTest.Application")</span><br />
<span style="color: #000000;">App.Launch</span><br />
<span style="color: #000000;">App.Visible = True</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Web").Active = True</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Web").Browser = "IE"</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Web").Address = "http://www.asi-test.com"</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Web").CloseOnExit = False</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Windows Applications").Active = True</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Windows Applications").RecordOnQTDescendants = True</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Windows Applications").RecordOnExplorerDescendants = False</span><br />
<span style="color: #000000;">App.Test.Settings.Launchers("Windows Applications").RecordOnSpecifiedApplications = True</span><br />
<span style="color: #000000;">App.Test.Settings.Run.IterationMode = "rngAll"</span><br />
<span style="color: #000000;">App.Test.Settings.Run.StartIteration = 1</span><br />
<span style="color: #000000;">App.Test.Settings.Run.EndIteration = 1</span><br />
<span style="color: #000000;">App.Test.Settings.Run.ObjectSyncTimeOut = 20000</span><br />
<span style="color: #000000;">App.Test.Settings.Run.DisableSmartIdentification = False</span><br />
<span style="color: #000000;">App.Test.Settings.Run.OnError = "Dialog"</span><br />
<span style="color: #000000;">App.Test.Settings.Resources.DataTablePath = ""</span><br />
<span style="color: #000000;">App.Test.Settings.Resources.Libraries.RemoveAll</span><br />
<span style="color: #000000;">App.Test.Settings.Resources.Libraries.Add("ASIFuncLib.qfl")</span><br />
<span style="color: #000000;">App.Test.Settings.Web.BrowserNavigationTimeout = 60000</span><br />
<span style="color: #000000;">App.Test.Settings.Web.ActiveScreenAccess.UserName = ""</span><br />
<span style="color: #000000;">App.Test.Settings.Web.ActiveScreenAccess.Password = ""</span><br />
<span style="color: #000000;">''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br />
<span style="color: #000000;">' System Local Monitoring settings</span><br />
<span style="color: #000000;">''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br />
<span style="color: #000000;">App.Test.Settings.LocalSystemMonitor.Enable = false</span><br />
<span style="color: #000000;">''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br />
<span style="color: #000000;">' Log Tracking settings</span><br />
<span style="color: #000000;">''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br />
<span style="color: #000000;">With App.Test.Settings.LogTracking</span><br />
<span style="color: #000000;">.IncludeInResults = False</span><br />
<span style="color: #000000;">.Port = 18081</span><br />
<span style="color: #000000;">.IP = "127.10.10.1"</span><br />
<span style="color: #000000;">.MinTriggerLevel = "ERROR"</span><br />
<span style="color: #000000;">.EnableAutoConfig = False</span><br />
<span style="color: #000000;">.RecoverConfigAfterRun = False</span><br />
<span style="color: #000000;">.ConfigFile = ""</span><br />
<span style="color: #000000;">.MinConfigLevel = "WARN"</span><br />
<span style="color: #000000;">End With</span><br />
</code></td>
</tr>
</tbody>
</table>
<p>Other examples of changing settings include:</p>
<p>Changing Object Sync Timeout:</p>
<table width="680" border="2" align="center" bgcolor="silver">
<tbody>
<tr>
<td><code><span style="color: #000000;">oldTimeout=Setting("ObjectSyncTimeOut")<br />
Setting("ObjectSyncTimeOut")="19000"<br />
currTimeout=Setting("ObjectSyncTimeOut")<br />
msgbox ("old timeout="&amp; oldTimeout&amp;" and the current timeout is: "&amp;currTimeout)</span><br />
</code></td>
</tr>
</tbody>
</table>
<p>Changing the Test Iteration Mode:</p>
<table width="680" border="2" align="center" bgcolor="silver">
<tbody>
<tr>
<td><code><span style="color: #000000;">oldRunRange=Setting("IterationMode")<br />
Setting("IterationMode")="rngAll"<br />
currRunRange=Setting("IterationMode")<br />
msgbox ("old run range="&amp; oldRunRange &amp;" and the current run range is: "&amp;currRunRange)</span><br />
</code></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/changing-test-settings/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/changing-test-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quality Center Backup Strategy</title>
		<link>http://www.asi-test.com/ASI/quality-center-backup-strategy/</link>
		<comments>http://www.asi-test.com/ASI/quality-center-backup-strategy/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 02:21:15 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Quality Center]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Test Management]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[file system]]></category>
		<category><![CDATA[qc]]></category>
		<category><![CDATA[quality center]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[strategy]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=738</guid>
		<description><![CDATA[If implemented properly, the Quality Center will become an incredible resource for all your testing information in your test team and become the core for your test strategy &#38; methodology.  Because of this it is extremely important for you to protect this information with not only proper security but to backup this information in order [...]]]></description>
			<content:encoded><![CDATA[<p>If implemented properly, the Quality Center will become an incredible resource for all your testing information in your test team and become the core for your test strategy &amp; methodology.  Because of this it is extremely important for you to protect this information with not only proper security but to backup this information in order to protect you in the case of an emergency like hardware failure, data loss or environmental catastrophe.  It is important to understand at a high-level the basic data storage of the Quality Center.   <span id="more-738"></span></p>
<p>The Quality Center is a software application accessed through the Internet Explorer browser with a database on the backend.  Most of the data you enter into the Quality Center like test cases, requirements, defects, etc. become &#8220;data records&#8221; stored in the database.  In my case I&#8217;m currently using SQL Server, so all this data is stored in this SQL Server database on the backend that the Quality Center interacts with.  So the first thing after installing the Quality Center is that you should setup a regular schedule of doing backups of your database.  But what a lot of people fail to realize or forget is that a lot of information is NOT stored in the database but instead stored in the File System where the Quality Center is installed.  Things stored here are QuickTest Pro scripts, and file attachments like images, files, snapshots, etc.  So you should also schedule backups of the file system.  You should try to get these backup software applications to backup these two entities (database and file system) as close in time as possible in order to keep them in sync as close as possible.</p>
<p>But realize that most likely your database backup software is not the same as your file system backup application.  Therefore they will not be in sync exactly if you needed to perform a complete restore.  In the case of a catastrophe these backups will be fine.  But what about basic everyday mistakes?  I have run into this several times where a tester accidently deletes an entire folder in the Test Plan module instead of the individual test case they were trying to delete.  Guess what, the Quality Center does not have an &#8220;undo&#8221; button for this nor does it have a recycle bin that you can grab the test cases from.  When this first happened to me, the folder the tester deleted contained 20 test cases in it.  All 20 test cases were lost instantly.  When we considered the backups we realized that the database and file system backups were performed once a day at 1am in the morning when no one was using the software and the system load was low.  Then we realized that to get those older 20 test cases back we would be restoring back to the previous day which meant that we gained those 20 test cases back, but lost everything else that was done today like all the other new test cases created, defects created, test sets executed and all the history.  At this point we realized it wasn&#8217;t worth the loss.  Our only choice was to recreate the test cases manually.  However I quickly came up with a new strategy &#8211; I now regularly create a backup QC project that is a copy of the current project we are working on, in addition to the database &amp; file system backups.  In the Quality Center Site Administration tool, I create a new Domain called &#8220;BACKUP&#8221; and then I make a new QC Project in this domain.  The new QC project is named the same as the project I&#8217;m going to copy with the name &#8220;_Backup&#8221; and the date like &#8220;102511&#8243; on the end, and then I specify to make a copy of my current project so it basically creates a duplicate project at this point in time.  So if my project name is &#8220;ABCorporate&#8221; then my backup I&#8217;m creating in this example would be called &#8220;ABCorporate_Backup102511&#8243;.  The big benefit to this approach is that you have a working QC Project that you can actually log into and access your information like normal.  So in my scenario where a folder was deleted and we lost 20 test cases, I could now log into this backup QC Project and use the reporting features of QC to generate a report file that contains the 20 test cases and then use one of the QC Add-in macros (Word or Excel) to import the test cases using this new report file, back into my existing QC project.  This saves a lot of time and effort.  I keep the projects deactivated as a safety mechanism so that no one gets confused and logs in and changes something.  This way it is preserved and I activate the project only if I need to login to find some data to export.</p>
<p><img class="aligncenter size-full wp-image-739" title="Quality Center Site Administration" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/10/QCSiteAdmin.png" alt="Quality Center Site Administration" width="419" height="291" /></p>
<p>Since hard drive space is very affordable these days, I can easily keep 7 to 10 copies of the QC Project as working backup copies.  Then after that when I create a new copy I&#8217;ll delete the oldest version. This has been a great approach as I don&#8217;t have to deal with the tech support team responsible for the backups and try to coordinate a restore that ends up wiping out more data than I actually lost. Now I can just log directly into a backup copy and export the data. </p>
<p>The only catch to this is that you will most likely not create a project copy daily, so you still run the risk of not having recent data available in this approach but it does cover you on the larger quantity of older data that will occupy about 75% of your QC Project.</p>
<p>So as a review, my backups consist of creating the following:</p>
<ol>
<li>Database backup</li>
<li>File System backup</li>
<li>New QC Project that is a copy of the existing project as a backup</li>
</ol>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/quality-center-backup-strategy/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/quality-center-backup-strategy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>VBScript Procedures in QTP</title>
		<link>http://www.asi-test.com/ASI/vbscript-procedures-in-qtp/</link>
		<comments>http://www.asi-test.com/ASI/vbscript-procedures-in-qtp/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 14:31:29 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[procedure]]></category>
		<category><![CDATA[subroutine]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=703</guid>
		<description><![CDATA[Tips &#38; Tricks Series &#8211; VBScript Procedures Overview If you are using QuickTest Pro, then QTP uses VBScript as the programming language and there are basically two types of procedures in VBScript - Functions and Subroutines.  The main difference between them is  that a Function performs some actions and returns a value while a subroutine is used [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">Tips &amp; Tricks Series &#8211; VBScript Procedures Overview</p>
<p>If you are using QuickTest Pro, then QTP uses VBScript as the programming language and there are basically two types of procedures in VBScript - Functions and Subroutines.  The main difference between them is <span id="more-703"></span> that a Function performs some actions and returns a value while a subroutine is used to perform some actions but does not return a value. </p>
<p>There is also a concept of private versus public.  If you create a Function or Subroutine at the top of your test script in QTP, then it is private and only that script can call the procedure(s) and use it.  If you add it to a Function Library and add the Function Library reference to the Resources tab in the Test Settings window in QTP, then all the scripts/actions in the test suite (including all called action &amp; reusable actions) can call all the procedures stored in that Function Library (thus it is considered public).</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/vbscript-procedures-in-qtp/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/vbscript-procedures-in-qtp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Open Source Defect Tracking</title>
		<link>http://www.asi-test.com/ASI/open-source-defect-tracking/</link>
		<comments>http://www.asi-test.com/ASI/open-source-defect-tracking/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 12:28:41 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Test Management]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[defect]]></category>
		<category><![CDATA[defect tracking]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=685</guid>
		<description><![CDATA[I have always used the Quality Center which is not open source and rather expensive but the best test management tool out there offering many features other than just defect tracking.  But if you can&#8217;t afford it then the two open source defect tracking tools I know of and have used that are good and will [...]]]></description>
			<content:encoded><![CDATA[<p>I have always used the Quality Center which is not open source and rather expensive but the best test management tool out there offering many features other than just defect tracking.  But if you can&#8217;t afford it then the two open source defect tracking tools I know of and have used that are good and will work fine are Bugzilla and Mantis. <span id="more-685"></span></p>
<div align="left"><img class="alignleft size-full wp-image-686" title="BugzillaLogo" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/09/BugzillaLogo.png" alt="Bugzilla" width="151" height="49" /></div>
<p>Bugzilla: <a href="http://www.bugzilla.org/download/"  target="_blank">http://www.bugzilla.org/download/</a><br />
Bugzilla is probably the most popular, well known and used open source defect tracking tool.  It works fine and is found in many companies.  My only comment is that it is and was designed as a &#8220;defect tracking tool&#8221;.  I&#8217;ve been in many shops where they started using it for other things that it wasn&#8217;t designed for and it got messy.  Your best success will be to use it for what it was designed for.</p>
<div align="left"><img class="alignleft size-full wp-image-687" title="MantisLogo" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/09/MantisLogo.png" alt="Mantis" width="139" height="61" /></div>
<p>Mantis: <a href="http://www.mantisbt.org/download.php" target="_blank">http://www.mantisbt.org/download.php</a><br />
Mantis I&#8217;ve used once and it was fine.  It is similar to Bugzilla and free.  Honestly there is not much needed to make a tool a decent defect tracking tool.</p>
<p>Both of these tools provide the basics of:</p>
<ol>
<li>Defect logging</li>
<li>Defect reporting</li>
<li>Multiple user capability</li>
<li>Easy to maintain</li>
<li>Easy to use</li>
<li>Customization</li>
</ol>
<p>The majority of them will store defects as records in a database sharing common fields (columns) for information.  For presentation in the tool, most will present the defects in a table grid, like a spreadsheet.  So besides the elements I just listed above, the most important factors in a tool are:</p>
<ol>
<li>Ability to create custom fields &#8211; needed to customize the tool to your needs in your environment.  Ability to customize existing fields and create new ones.  This should include data types and also the ability to create list values to select from.</li>
<li>Reporting &#8211; needed to present the defects found, ones being worked on, ones that are closed and also to be able to see trending.  Filtering and sorting are needed for robust reporting.</li>
<li>Exporting defects &#8211; the ability to export your defects based on a certain criteria is very useful and needed in most environments.</li>
<li>Email notification &#8211; this is very useful and enables developers and testers to know about the state of a defect.</li>
</ol>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/open-source-defect-tracking/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/open-source-defect-tracking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Learn QuickTest Pro v10 Online</title>
		<link>http://www.asi-test.com/ASI/learn-quicktest-pro-v10-online/</link>
		<comments>http://www.asi-test.com/ASI/learn-quicktest-pro-v10-online/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 13:00:46 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[ASI General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=425</guid>
		<description><![CDATA[QuickTest Pro version 10 Online Training - On Sale for $50!  Includes 12 lessons consisting of 179 online pages of training material!  Begin your learning experience online now; work at your own pace, at home, on the road or where it is convenient for you, and on your own time schedule.  The QuickTest Pro v10 Basics course [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Q<span style="text-decoration: underline;">uickTest Pro version 10 Online Training - On Sale for $50!</span></em></strong>  Includes 12 lessons consisting of 179 online pages of training material!  Begin your learning experience online now; work at your own pace, at home, on the road or where it is convenient for you, and on your own time schedule.  The QuickTest Pro v10 Basics course is developed with eLearning presentations containing robust feature explanations, images and some videos showing you exactly how to perform the features without guessing. <span id="more-425"></span>  Online training is great because of the flexibility it provides you!  As a consultant this gives you skills that are in demand and you will make back the cost of the class on your first day of a new consulting engagement.  If you are unemployed this is a worthwhile investment that can give you the edge in an interview and provide you a skillset that is extremely marketable and desirable by companies looking for highly skilled testers.  This can be a small investment for a great new opportunity!</p>
<p>  Online training is great because you can work at your own pace, whenever it is convenient for you.  You can do this work during down-time at work, over your lunch break, at home, or even at your kids sports practice if a wireless connection is available (we&#8217;ve had parents tell us how their kids hockey rink has wireless and so they would bring their laptop to the practice and go over some of the lessons during the practice). </p>
<p>  We have customers from around the world to include the entire United States, Canada, Europe, New Zealand and Australia.  What makes my training so popular is that I have 17 years of experience implementing the product line in real-world scenarios.  So I&#8217;m not some tech writer or an instructor who has never actually used the tool.  I have implemented solutions for some of the biggest corporations with incredible success. Click here for <a href="http://www.asi-test.com/Docs/Company_Reference_List.pdf" target="_blank">PDF file of Company Reference List</a></p>
<p><strong><span style="text-decoration: underline;">Course Details:</span></strong> This lesson includes over 12 lessons consisting of 179 online training pages of material for only $50.  The Lessons covered in this class are:</p>
<ol>
<ol>
<li>Introduction</li>
<li>Record &amp; Playback</li>
<li>Object Repository</li>
<li>Standard Checkpoints</li>
<li>Regular Expressions</li>
<li>Bitmap Checkpoints</li>
<li>Text Checkpoints</li>
<li>Database Checkpoints</li>
<li>Parameterization</li>
<li>Data Driven Testing</li>
<li>Output Values</li>
<li>Actions</li>
</ol>
</ol>
<p><a href="http://www.asi-test.com/ASI/products/">Read more about this class on our &#8220;Products&#8221; page.</a></p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/learn-quicktest-pro-v10-online/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/learn-quicktest-pro-v10-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBScript: Overflow error using CInt function</title>
		<link>http://www.asi-test.com/ASI/vbscript-cint-overflow-error/</link>
		<comments>http://www.asi-test.com/ASI/vbscript-cint-overflow-error/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 17:18:05 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[QuickTest Pro]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[cint]]></category>
		<category><![CDATA[clng]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.asi-test.com/ASI/?p=598</guid>
		<description><![CDATA[Tips &#38; Tricks Series &#8211; Overflow error Ever get an &#8220;Overflow error&#8221; when using the CInt function?  You might encounter this error when you are doing some programming in your test script and doing some data manipulations or calculations.  Let&#8217;s review an example of a situation that could cause this to happen &#8211; a classic [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">Tips &amp; Tricks Series &#8211; Overflow error</p>
<p>Ever get an &#8220;Overflow error&#8221; when using the CInt function?  You might encounter this error when you are doing some programming in your test script and doing some data manipulations or calculations.  Let&#8217;s review an example of a situation that could cause this to happen &#8211; a classic example would be if you were processing a file where a number could be rather large. <span id="more-598"></span>  Here is a code snippet where the batch size of a data extract was retrieved and generated the Overflow error:</p>
<p><a href="http://www.asi-test.com/ASI/wp-content/uploads/2011/08/ExampleError.jpg"><img class="size-full wp-image-599 alignnone" title="Example VBScript CInt Error in QuickTest Pro" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/08/ExampleError.jpg" alt="Example VBScript CInt Error in QuickTest Pro" width="587" height="517" /></a></p>
<p>&nbsp;</p>
<p>First thing is that in VBScript it only has one data type called Variant.  This can contain either a numeric or string in it and by default it will be a string if there are any other characters in the original value (which is very common).  There are sub-types available to use that you can convert a string or Variant to; they can be one of these:</p>
<table border="1">
<tbody>
<tr>
<td>Subtype</td>
<td>Description</td>
</tr>
<tr>
<td>Empty</td>
<td>Variant is uninitialized. Value is 0 for numeric variables or a zero-length string (&#8220;&#8221;) for string variables.</td>
</tr>
<tr>
<td>Null</td>
<td>Variant intentionally contains no valid data.</td>
</tr>
<tr>
<td>Boolean</td>
<td>Contains either True or False.</td>
</tr>
<tr>
<td>Byte</td>
<td>Contains integer in the range 0 to 255.</td>
</tr>
<tr>
<td>Integer</td>
<td>Contains integer in the range -32,768 to 32,767.</td>
</tr>
<tr>
<td>Currency</td>
<td>-922,337,203,685,477.5808 to 922,337,203,685,477.5807.</td>
</tr>
<tr>
<td>Long</td>
<td>Contains integer in the range -2,147,483,648 to 2,147,483,647.</td>
</tr>
<tr>
<td>Single</td>
<td>Contains a single-precision, floating-point number in the range -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values.</td>
</tr>
<tr>
<td>Double</td>
<td>Contains a double-precision, floating-point number in the range -1.79769313486232E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.</td>
</tr>
<tr>
<td>Date (Time)</td>
<td>Contains a number that represents a date between January 1, 100 to December 31, 9999.</td>
</tr>
<tr>
<td>String</td>
<td>Contains a variable-length string that can be up to approximately 2 billion characters in length.</td>
</tr>
<tr>
<td>Object</td>
<td>Contains an object.</td>
</tr>
<tr>
<td>Error</td>
<td>Contains an error number.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Typically what you want to do in order to either add numbers together or compare two numbers in a conditional statement is to convert the variable to a numeric integer.  The way to do that is using the CInt() function.  However if you notice in the table above, an Integer is in the range of -32,768 to 32,767.  The problem is if you are working with an integer that is larger than 32,767.  Like in this example, if you look at the bottom in the Debug Viewer you will see that the Batch Size is actually 56,989 (which is not a surprise when dealing with data extracts).  So this is what is throwing the error because if you look above the error at the test script, you will see on line 103 that CInt is being used.  But if you know that a data element could be large, then use CLng() instead.  This will convert it to a Long which then accepts a range of -2,147,483,648 to 2,147,483,647 and works fine for our situation.</p>
<p>Now if you look at this second image, notice how line 103 now uses CLng and how we have paused on the next line, there is no error and the batch size is correct at 56,989 and notice the type is now &#8220;Long&#8221; to the right of the value.</p>
<p><a href="http://www.asi-test.com/ASI/wp-content/uploads/2011/08/CLngFix.jpg"><img class="size-full wp-image-600 alignnone" title="VBScript CLng Fix to CInt error in QuickTest Pro" src="http://www.asi-test.com/ASI/wp-content/uploads/2011/08/CLngFix.jpg" alt="VBScript CLng Fix to CInt error in QuickTest Pro" width="587" height="516" /></a></p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=282419851791791&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.asi-test.com/ASI/vbscript-cint-overflow-error/" send="true" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.asi-test.com/ASI/vbscript-cint-overflow-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

