<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Speaking of which... : Stress</title><link>http://blogs.msdn.com/johan/archive/tags/Stress/default.aspx</link><description>Tags: Stress</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Test Projects and AJAX</title><link>http://blogs.msdn.com/johan/archive/2007/06/13/test-projects-and-ajax.aspx</link><pubDate>Wed, 13 Jun 2007 11:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3264094</guid><dc:creator>JohanS</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/johan/comments/3264094.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=3264094</wfw:commentRss><description>&lt;p&gt;If you have an AJAX project and you're using Visual Studio Team Edition for Software Testers you might have noticed that the Web Test recorder is unable to record client side script navigation like AJAX requests.&lt;/p&gt; &lt;p&gt;The way the test recorder is created it attaches to IE and records all "standard" navigation. This means it will disregard&amp;nbsp;AJAX-calls as well as JScript popups. This is really unfortunate if you wish to stress test your new, cool AJAX project.&lt;/p&gt; &lt;h1&gt;What to do&lt;/h1&gt; &lt;p&gt;Basically there are two options for dealing with this.&lt;/p&gt; &lt;h2&gt;Wait for "Orcas"&lt;/h2&gt; &lt;p&gt;Well unless you have an abundance of time, this really isn't an option, but I thought it would be a good idea to mention the new features of the next version of Visual Studio. A lot of improvements have been made for tests alone:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Web Test Validation Rule Improvements to enable testers to create more comprehensive validation rules for the application being tested. These improvements include the following functions:  &lt;ul&gt; &lt;li&gt;Stop test on error  &lt;li&gt;Search request and response  &lt;li&gt;Add validation rule for title  &lt;li&gt;Redirect validation  &lt;li&gt;Provide test level validation rules  &lt;li&gt;Expected HTTP code  &lt;li&gt;Warning level for errors on dependents&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Better Web Test Data Binding to allow users to data bind .CSV and XML files, as well as databases to a web test, using a simple data binding wizard.  &lt;li&gt;Improved Load Test Results Management so a user can open or remove an existing load test result from the load test repository. User can also import and export load test results files.  &lt;li&gt;Load test summary report support for multiple machine graphs in Load Test Analyzer  &lt;li&gt;Web Test recorder now records Ajax requests and JavaScript pop-ups  &lt;li&gt;Load Modeling support initialize and terminate functions for a virtual user, as well as modeling load based on user pacing.&lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Use "Fiddler"&lt;/h2&gt; &lt;p&gt;If you're familiar with &lt;a href="http://www.fiddlertool.com/" target="_blank"&gt;Fiddler&lt;/a&gt; you &lt;em&gt;might&lt;/em&gt; be thinking "Oh, no! Copying each request from Fiddler is going to be terrible!" Actually you don't have to do that. Fiddler will do it for you, so keep reading!&lt;/p&gt; &lt;p&gt;Fiddler is a sweet little tool that will act as a proxy between your machine and the network. All HTTP-traffic will be intercepted and you'll be able to see the exact request and the exact response. While the Web Test recorder binds to one particular instance of IE, Fiddler will get everything. IM-sessions, software update checks, you name it. This means that there's a potential risk of Information Overload, but filtering out the interesting bits is quite easy.&lt;/p&gt; &lt;p&gt;Once you've recorded a session in fiddler you can then select the requests you're interested in, right click them and save them as a Visual Studio Web Test.&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.msdn.com/photos/johan/images/3263587/original.aspx"&gt;&lt;/p&gt; &lt;p&gt;That's it. You now have an XML file with the .webtest extension, ready to be imported into Visual Studio. One thing that you might want to do once you've imported it is to set the "Parse Dependent Requests"-property to false. Otherwise you'll download all dependent images, CSS stylesheets, etc.&amp;nbsp;twice.&lt;/p&gt; &lt;p&gt;/ Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3264094" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/Stress/default.aspx">Stress</category><category domain="http://blogs.msdn.com/johan/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/johan/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Stress-O-Matic</title><link>http://blogs.msdn.com/johan/archive/2006/11/27/stress-o-matic.aspx</link><pubDate>Mon, 27 Nov 2006 13:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1159132</guid><dc:creator>JohanS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/johan/comments/1159132.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=1159132</wfw:commentRss><description>&lt;H1&gt;A very simple stress-test&lt;/H1&gt;
&lt;P&gt;The other day I was asked by a customer if I a small application that could be used to stress a web application. I didn't feel like responding "Sure I do! Visual Studio 2005 Team Edition For Software Testers" and I also didn't feel like saying "Why don't you make one yourself using the webbrowser control?" So instead I wrote a small script. It's all very basic and simple, but I still thought it might be of use to someone. Just copy the code below into a .vbs-file and you're good to go.&lt;/P&gt;
&lt;P&gt;Please note, however that the script relies heavily on WScript.Echo to tracks it's progress, so you should use CScript as the host rather than WScript. If you're unfamiliar with CScript &amp;amp; WScript I recommend taking a look at this article: &lt;A href="http://msdn2.microsoft.com/en-us/library/xazzc41b.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/xazzc41b.aspx"&gt;MSDN: Running Scripts from Windows&lt;/A&gt;&lt;/P&gt;
&lt;DIV class=SampleCode&gt;
&lt;P&gt;CONST NUMBEROFLOOPS = 3 '****** How many times do you want the script to loop?&lt;BR&gt;CONST DELAYTIME = 3 '****** How many seconds do you want to wait?&lt;BR&gt;CONST URL = "http://www.microsoft.com"&lt;BR&gt;Dim Http&lt;BR&gt;Set Http = CreateObject("MSXML2.XMLHTTP") 
&lt;P&gt;Main 
&lt;P&gt;Function SendHTTPRequest()&lt;BR&gt;&amp;nbsp;&amp;nbsp; Http.Open "GET", URL , False&lt;BR&gt;&amp;nbsp;&amp;nbsp; Http.setRequestHeader "If-None-Match","qwerty"&lt;BR&gt;&amp;nbsp;&amp;nbsp; Http.setRequestHeader "Cache-Control","no-cache,max-age=0"&lt;BR&gt;&amp;nbsp;&amp;nbsp; Http.setRequestHeader "Pragma","no-cache"&lt;BR&gt;&amp;nbsp;&amp;nbsp; Http.send&lt;BR&gt;&amp;nbsp;&amp;nbsp; '****** Uncomment this in case you want to see the response for some reason...&lt;BR&gt;&amp;nbsp;&amp;nbsp; 'WScript.Echo(Http.responseText) &lt;BR&gt;End Function 
&lt;P&gt;Sub Main()&lt;BR&gt;&amp;nbsp;&amp;nbsp; Wscript.Echo("Test started at: " &amp;amp; Now())&lt;BR&gt;&amp;nbsp;&amp;nbsp; WScript.Echo("Will access """ &amp;amp; URL &amp;amp; """ " &amp;amp; NUMBEROFLOOPS &amp;amp; " times in " &amp;amp; DELAYTIME &amp;amp; " second intervals.")&lt;BR&gt;&amp;nbsp;&amp;nbsp; For I = 1 to NUMBEROFLOOPS&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo( I &amp;amp; ": Accessing """ &amp;amp; URL &amp;amp; """")&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; SendHTTPRequest()&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Wscript.Echo("Waiting " &amp;amp; DELAYTIME &amp;amp; " seconds:")&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; For J = DELAYTIME To 1 Step -1&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; WScript.Sleep 1000&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Wscript.Echo("Waiting " &amp;amp; J-1 &amp;amp; " seconds:")&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Next&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; WScript.Echo( I &amp;amp; ": Complete")&lt;BR&gt;&amp;nbsp;&amp;nbsp; Next&lt;BR&gt;&amp;nbsp;&amp;nbsp; Wscript.Echo("Test completed at: " &amp;amp; Now())&lt;BR&gt;End Sub&lt;/P&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's all for now.&lt;/P&gt;
&lt;P&gt;/ Johan&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1159132" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/Script/default.aspx">Script</category><category domain="http://blogs.msdn.com/johan/archive/tags/Stress/default.aspx">Stress</category><category domain="http://blogs.msdn.com/johan/archive/tags/Sample+Code/default.aspx">Sample Code</category></item></channel></rss>