<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Thinking  about Performance enough?</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ambhrin/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ambhrin/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 04:37:10 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Who moved my "Unit Test Stubs"?</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/who-moved-my-unit-test-stubs</link>
      <pubDate>Wed, 14 May 2014 22:00:00 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2014/05/14/who-moved-my-unit-test-stubs/</guid>
      <description><![CDATA[I am sure many Developers/Testers might have asked this question to themselves. Perhaps it may also...]]></description>
      <content:encoded><![CDATA[<p>I am sure many Developers/Testers might have asked this question to themselves. Perhaps it may also have been frustrating at times to see such a nifty feature just disappear.. But there is some good news - The <strong>Visual Studio Ranger team</strong> has an <strong>Add-In</strong> that got this capability back in 2012 &amp; 2013.</p>
<p>You can&nbsp;get the tool from&nbsp;here&nbsp;- <a href="https://visualstudiogallery.msdn.microsoft.com/45208924-e7b0-45df-8cff-165b505a38d7">https://visualstudiogallery.msdn.microsoft.com/45208924-e7b0-45df-8cff-165b505a38d7</a></p>
<p>In fact, unlike the previous versions, Visual Studio now supports <strong>multiple Unit Tests Frameworks</strong> apart from just <strong>MSTEST</strong>. It's got built in support for <strong>nUnit</strong> &amp; <strong>xUnit</strong>.</p>
<p>You can read up more from here - <a href="https://msdn.microsoft.com/en-us/library/hh704261(v=vs.110).aspx">https://msdn.microsoft.com/en-us/library/hh704261(v=vs.110).aspx</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>What to make of Cyclomatic Complexity</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/what-to-make-of-cyclomatic-complexity</link>
      <pubDate>Sun, 27 Apr 2014 12:01:00 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2014/04/27/what-to-make-of-cyclomatic-complexity/</guid>
      <description><![CDATA[Often times when Development Team are looking to do Code Review, reading the numbers out of...]]></description>
      <content:encoded><![CDATA[<p>Often times when Development Team are looking to do Code Review, reading the numbers out of Cyclomatic Complexity is one of the Top Priorities.</p>
<p>Cyclomatic Complexity is a formula for determining the varying logical paths that can be taken though a piece of code, thus determining a quantitative value for the code&rsquo;s complexity. A higher Cyclomatic Complexity score means that there are a lot of code paths and/or factors that affect the logic with the code. One way to think about it is this: to fully unit test a method, you should have one unit test for each logic path &ndash; thus a score of 10 would result in as many unit tests.&nbsp;Wikipedia entry: <a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity">https://en.wikipedia.org/wiki/Cyclomatic_complexity</a></p>
<p>Martin Fowler in his BLOG mentions how to approach reading the metrics and act most effectively - <a href="https://martinfowler.com/articles/useOfMetrics.html">https://martinfowler.com/articles/useOfMetrics.html</a></p>
<p>Also, I find this as a great read too - <a href="https://www.wrightfully.com/thoughts-on-cyclomatic-complexity/">https://www.wrightfully.com/thoughts-on-cyclomatic-complexity/</a></p>
<p>There are also some great publications on MSDN - <a href="https://msdn.microsoft.com/en-us/library/bb385914.aspx">https://msdn.microsoft.com/en-us/library/bb385914.aspx</a></p>
<p>A few MSDN BLOGS worth reading &nbsp;-</p>
<ol>
<li><a href="https://blogs.msdn.com/b/codeanalysis/archive/2007/11/28/positioning-code-metrics-to-management.aspx">https://blogs.msdn.com/b/codeanalysis/archive/2007/11/28/positioning-code-metrics-to-management.aspx</a></li>
<li><a href="https://blogs.msdn.com/b/zainnab/archive/2011/05/17/code-metrics-cyclomatic-complexity.aspx">https://blogs.msdn.com/b/zainnab/archive/2011/05/17/code-metrics-cyclomatic-complexity.aspx</a></li>
<li><a href="https://blogs.msdn.com/b/codeanalysis/archive/2007/10/03/new-for-visual-studio-2008-code-metrics.aspx">https://blogs.msdn.com/b/codeanalysis/archive/2007/10/03/new-for-visual-studio-2008-code-metrics.aspx</a></li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="background: white;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Performance &amp; Diagnostics enhancements in VS 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/performance-diagnostics-enhancements-in-vs-2013</link>
      <pubDate>Tue, 08 Apr 2014 12:20:16 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2014/04/08/performance-diagnostics-enhancements-in-vs-2013/</guid>
      <description><![CDATA[In VS 2013 we introduced the &ldquo;Performance &amp; Diagnostics Hub&rdquo;. If you have not taken...]]></description>
      <content:encoded><![CDATA[<p>In <strong>VS 2013</strong> we introduced the <strong>&ldquo;Performance &amp; Diagnostics Hub&rdquo;. </strong>If you have not taken a look into it yet then I encourage you do. &ldquo;<strong>Application</strong> <strong>Performance</strong>&rdquo; is everyone&rsquo;s business and who can deny that. Here is the <strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2013/07/12/performance-and-diagnostics-hub-in-visual-studio-2013.aspx">link</a></strong>.</p>
<p><strong>&nbsp;</strong>With <strong>VS2013</strong> <strong>Update 2</strong>, we added two brand new tools:<strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2014/02/28/new-cpu-usage-tool-in-the-performance-and-diagnostics-hub-in-visual-studio-2013.aspx">CPU Usage</a></strong> &amp; <strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2014/04/02/diagnosing-memory-issues-with-the-new-memory-usage-tool-in-visual-studio.aspx">Memory Usage</a></strong></p>
<p>We also enhanced the <strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2013/06/20/using-visual-studio-2013-to-diagnose-net-memory-issues-in-production.aspx">.NET memory dump analysis</a></strong> feature so you can now <strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2014/02/06/net-memory-analysis-object-inspection.aspx">inspect values of objects from the dump file</a></strong>.</p>
<p>It&rsquo;s also worth highlighting here the addition of the <strong><a href="https://blogs.msdn.com/b/visualstudioalm/archive/2014/02/06/json-debugger-visualizer-in-visual-studio-2013.aspx">JSON Debugger Visualizer</a> </strong>to Update 2.</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL 2008 R2 on Windows 8 - Compatibility Warning?</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/sql-2008-r2-on-windows-8-compatibility-warning</link>
      <pubDate>Thu, 24 Oct 2013 14:08:52 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2013/10/24/sql-2008-r2-on-windows-8-compatibility-warning/</guid>
      <description><![CDATA[What does the Compatibility Warning mean?
If you see the warning you may ignore and move ahead with...]]></description>
      <content:encoded><![CDATA[<p>What does the Compatibility Warning mean?</p>
<p>If you see the warning you may ignore and move ahead with the install.</p>
<p>It's expected.&nbsp;The SQL Team says, they&nbsp;support minimum SP1 of SQL 2008 R2 and hence the warning.&nbsp;Once complete, apply at least SP1.</p>
<p>&nbsp;Refer <a href="https://support.microsoft.com/kb/2681562">https://support.microsoft.com/kb/2681562</a></p>]]></content:encoded>
    </item>
    <item>
      <title>FIDDLER Resources</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/fiddler-resources</link>
      <pubDate>Thu, 24 Oct 2013 14:07:33 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2013/10/24/fiddler-resources/</guid>
      <description><![CDATA[Since we change between tools &amp; technologies so often, at times I just wish I have all that...]]></description>
      <content:encoded><![CDATA[<p>Since we change between tools &amp; technologies so often, at times I just wish I have all that information I need just at the click of a button.</p>
<p><span style="color: #993300; font-size: medium;">Couple of links I find worth keeping handy on FIDDLER &amp; HTTP debugging:</span></p>
<p>&nbsp;&nbsp;&nbsp; <a href="https://www.west-wind.com/weblog/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies"><span style="text-decoration: underline;">https://www.west-wind.com/weblog/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies</span></a><br /><br /><strong>&nbsp;&nbsp;&nbsp; Informative Writeup on using FIDDLER.</strong> <br /><br />&nbsp;&nbsp;&nbsp; The following link talks about how to get around monitoring Local traffic&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://fiddler2.com/documentation/Configure-Fiddler/Tasks/MonitorLocalTraffic"><span style="text-decoration: underline;">https://fiddler2.com/documentation/Configure-Fiddler/Tasks/MonitorLocalTraffic</span></a><br /><br />&nbsp;&nbsp; There is also a registry hack that you could do. I would be posting that in due course</p>
<p>This BLOG from the creator himself also comes very handy <a href="https://blogs.msdn.com/b/fiddler/"><span style="text-decoration: underline;">https://blogs.msdn.com/b/fiddler/</span></a></p>]]></content:encoded>
    </item>
    <item>
      <title>VS 2010 &amp; 2012 on the same machine - VS2010 crashes</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/vs-2010-2012-on-the-same-machine-vs2010-crashes</link>
      <pubDate>Tue, 02 Jul 2013 08:46:38 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2013/07/02/vs-2010-2012-on-the-same-machine-vs2010-crashes/</guid>
      <description><![CDATA[At one of my recent customer engagements, I came across this particular problem where VS2010 crashed...]]></description>
      <content:encoded><![CDATA[<p>At one of my recent customer engagements, I came across this particular problem where VS2010 crashed on me each time I tried to record or replay a test that was developed earlier using VS2010.</p>
<p><em>Further investigation into the causes of the crash revealed - </em></p>
<p><em class="ms-rteForeColor-8">UPDATE 1 for VS 2012 updates &nbsp;the <strong><span style="color: #0000ff;">Microsoft.VisualStudio.QualityTools.WebTestFramework.dl</span>l </strong>in the GAC . </em></p>
<p><em class="ms-rteForeColor-8">Since that version of the DLL is not compatible with VS2010, it crashes each time you want to record or replay a Webtest.</em></p>
<p>Note:</p>
<p>At the time of writing&nbsp;post, there isn't a fix available. However, MS would have a one available soon.</p>]]></content:encoded>
    </item>
    <item>
      <title>Machine Performance Counter Collection for Load Tests - Automating collection</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/machine-performance-counter-collection-for-load-tests-automating-collection</link>
      <pubDate>Tue, 02 Jul 2013 08:38:36 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2013/07/02/machine-performance-counter-collection-for-load-tests-automating-collection/</guid>
      <description><![CDATA[In one of our Performance Labs we had a requirement to collect the Performance Counter Logs across...]]></description>
      <content:encoded><![CDATA[<div class="ExternalClass052EC435F88E411A8C1E3AECEC719435">
<p>In one of our Performance Labs we had a requirement to collect the Performance Counter Logs across more than 15 Application &amp; DB Servers..</p>
<p>Doing them manually each time was not easy and often times error prone. I got the batch Files created which had the Logman commands that triggered the remote collection and then copied them over to a shared network path. That simplified the process greatly. However, We were still running these batch files manually before and after every Load Tests. It wasn't that bad but hey if you could automate it further then why not.</p>
<p>I thought it might just be more convenient to have the process baked into the Load Tests itself leveraging the Load Test Extensibility Points.</p>
<p><strong>Below is the Load Test Plug-in code&nbsp;that did the job for me.</strong></p>
<p>namespace OnePlugins<br />{<br />&nbsp;&nbsp;&nbsp; public class LoadTestInitCleanup : ILoadTestPlugin<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LoadTest thisLoadTest;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const string startPerfmonCmdFileLocation = @"&lt;&lt;pathname&gt;&gt;\CreateResultsDir_Start_Perfmon.CMD";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const string endPerfmonCmdFileLocation = @"&lt;&lt;pathname&gt;&gt;\PerfMon_Stop_and_CollectResults.CMD";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Initialize(LoadTest loadTest)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thisLoadTest = loadTest;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thisLoadTest.LoadTestStarting += new EventHandler(LoadTestStarting);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thisLoadTest.LoadTestFinished += new<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EventHandler(LoadTestFinished);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void LoadTestStarting(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProcessStartInfo procInfoCreateResultsDirectoryStartPerfmon = new ProcessStartInfo()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileName = startPerfmonCmdFileLocation,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedirectStandardError = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedirectStandardOutput = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UseShellExecute = false,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateNoWindow = false<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (Process processResultsDirectory = new Process() { StartInfo = procInfoCreateResultsDirectoryStartPerfmon })<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processResultsDirectory.Start();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processResultsDirectory.WaitForExit();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void LoadTestFinished(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProcessStartInfo procInfoStopCounterAndCollectResults = new ProcessStartInfo()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileName = endPerfmonCmdFileLocation,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedirectStandardError = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedirectStandardOutput = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UseShellExecute = false,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateNoWindow = false<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (Process processResultsDirectory = new Process() { StartInfo = procInfoStopCounterAndCollectResults })<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processResultsDirectory.Start();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processResultsDirectory.WaitForExit();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />}</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Working with NetMon &amp; WireShark Traces</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/working-with-netmon-wireshark-traces</link>
      <pubDate>Tue, 08 May 2012 16:37:00 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2012/05/08/working-with-netmon-wireshark-traces/</guid>
      <description><![CDATA[Wireshark can read Netmon trace files.
Hence just before starting the test we started Netmon on all...]]></description>
      <content:encoded><![CDATA[<p>Wireshark can read Netmon trace files.</p>
<p>Hence just before starting the test we started Netmon on all the machines and saved the CAP files generated with names identifying each of the machines</p>
<h1><span style="font-size: medium;">High-level Objective</span></h1>
<p>We have the task to validate the following:</p>
<p>Traffic going out from 10.52.1.106 is always going either to the 10.52.6.5 m/c or the 10.52.6.6 m/c and we should never be seeing any of the traffic to 10.52.1.104, 10.52.1.111 or 10.52.1.110.</p>
<p>However, the purpose of this BLOG is not to get into the details on how we investigated the pattern.<br />The purpose is to walk through a basic approach on how to read Netmon trace files when the reader himself is not a Network specialist himself.</p>
<p>I show in a few screen captures of the popular Tools like Netmon and Wireshark how you could mine the data you are looking for.</p>
<p><strong><span style="font-size: small;">Opening the Netmon trace in WireShark</span></strong><br />We have the Netmon trace Files captured during a Test Run. These <em>capture files</em> OR <em>.CAP</em> Files can be opened in WireShark as well. In fact, you could also use LogParser to query the .cap file and get your numbers.</p>
<p>The WireShark Window with the .cap file opened</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/6685.img1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/6685.img1.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/6685.img1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/6685.img1.png" /></a></p>
<p>From the &ldquo;<b><i>Statistics</i></b>&rdquo; drop down menu click &ldquo;<b><i>Conversations</i></b>&rdquo;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3463.img2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3463.img2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3463.img2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3463.img2.png" /></a></p>
<p>Since we are interested in only the <b><i>TCP traffic</i></b>, hence click the <b><i>TCP Tab</i></b></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/0167.img3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/0167.img3.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/0167.img3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/0167.img3.png" /></a></p>
<p>All the column headers in the Display are very much self-explanatory. We were looking for traffic or packets specific to Groove hence that&rsquo;s the port we needed to filter on</p>
<p>After quickly eye balling, we zeroed into two rows of data that had the outgoing port as 2492 and the IP as 10.52.1.106</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/7024.img4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/7024.img4.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/7024.img4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/7024.img4.png" /></a></p>
<p>Now we needed to validate, the sum of the outgoing bytes to both the destination IP&rsquo;s - 10.52.6.5 &amp; 10.52.6.6 was equal OR nearly equal to the total incoming bytes on these two machines.<br />Hence this view is makes the analysis a lot easier. Infact, you could further click the &ldquo;Copy&rdquo; button and paste the content to a EXCEL Spreadsheet and do the rest of your analysis from the spreadsheet.</p>
<p>If you unchecked the &ldquo;<b><i>Name Resolution</i></b>&rdquo; check Box you would notice the actual groove Port on which is communication is going on</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3731.img5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3731.img5.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3731.img5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3731.img5.png" width="198" height="58" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/5488.img6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/5488.img6.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/5488.img6.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/5488.img6.png" /></a></p>
<p><strong><span style="color: #000000; font-size: medium;">Writing custom Query Filters</span></strong></p>
<p>Writing Filters in Netmon and WireShark is fairly straightforward</p>
<p>For example:</p>
<p>We want to see all TCP traffic from 10.52.1.106 to 10.52.6.5 which were from TCP port 2492 to the destination TCP Port 2492</p>
<p><span style="color: #993300;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ipv4.SourceAddress == 10.52.1.106 </em></span><span style="color: #993300;"><em>and </em></span><span style="color: #993300;"><em>ipv4.DestinationAddress == 10.52.6.5 </em></span><span style="color: #993300;"><em>and&nbsp;</em></span><span style="color: #993300;"><em>tcp.SrcPort == 2492 </em></span><span style="color: #993300;"><em>and </em></span><span style="color: #993300;"><em>tcp.DstPort== 2492</em></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/7848.img7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/7848.img7.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/7848.img7.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/7848.img7.png" width="598" height="297" /></a><br />&nbsp;</p>
<p>Make sure to select &ldquo;<b><i>All Traffic</i></b>&rdquo; The match will pop up in the window below</p>
<p>Query to do the similar thing in WireShark would be</p>
<p><em><span style="color: #993300;">&nbsp;&nbsp;&nbsp;&nbsp; ip.src==10.52.1.106 and ip.dst==10.52.6.5 and tcp.srcport eq 2492 and tcp.dstport eq 2492</span></em></p>
<h1><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3362.img8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3362.img8.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/3362.img8.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/3362.img8.png" /></a></h1>
<p><span style="font-size: medium;"><b>Logparser</b></span></p>
<p>Log parser is a great tool which can come very handy when you are dealing with different Log formats and you need to mine important data out of these Logs. It can read IIS Logs, Event Viewer Logs and also Netmon Capture Logs.</p>
<p>Find more information on Log Parser from here<br /><a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=24659">https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=24659</a> <br />Known issues on Windows 7<br />If you are trying to parse the Netmon trace File through Logparser, the SrcIP and the DstIP fields might appear to be blank. This is a known issue with Win 7. However parsing should work just fine on a XP or a Win 8 machine.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Parsing JSON to extract values for further Parameterization &amp; Correlation - Test Automation with Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/parsing-json-to-extract-values-for-further-parameterization-correlation-test-automation-with-visual-studio</link>
      <pubDate>Fri, 20 May 2011 09:30:00 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2011/05/20/parsing-json-to-extract-values-for-further-parameterization-correlation-test-automation-with-visual-studio/</guid>
      <description><![CDATA[JSON (JavaScript Object Notation) is a light weight Data-Interchange in Text format completely...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium;"><b>JSON</b> (<i>JavaScript Object Notation</i>) is a light weight Data-Interchange in Text format completely Language independant. It is used as a alternative to using XML, though both are structured approaches to mark up data. JSON like XML, has a structure with nesting of Data Elements. Both are Text based and both use Unicode. But the subtle benefits are - JSON is more clean and a little less verbose. Each instance of a JSON document describes one object with nested objects, arrays, strings, numbers, boolean values, or null values. Application may prefer using JSON over a XML structure since it is a subset of Javascript and you can use JavaScript's own compiler to do the parsing. Also, navigating an object synthesized from JSON is identical to navigating any JavaScript object. It's far easier than navigating through the DOM tree.</span></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;">An object, in JSON terminology, is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma).</span></p>
<p><span style="font-size: medium;">VSTS is able to record and playback Ajax/JSON requests. However, there's no built-in support for doing things like Validating the contents of a JSON Response or extracting values if needed.</span></p>
<p><span style="font-size: small;"><b>&nbsp;</b></span></p>
<p><span style="font-size: small;"><span size="3"><span style="font-family: Times New Roman;" face="Times New Roman"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/1030.xml.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/1030.xml.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/1030.xml.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/1030.xml.png" width="777" height="423" /></a></span></span></span></p>
<p><span style="font-size: medium;">In the above XML DOM structure, the <b><span style="text-decoration: underline;">this</span></b> is the JSON text.</span></p>
<p><span style="font-size: medium;">Inside the Extract method, read the innertext property for the XML Node that contains the JSON instance, load the text to an XML Document Object, and then further using XPATH expression to reach the particular *Keys* , parse out the values for the same.</span></p>
<p><span style="font-size: medium;">You can further learn about writing custom <a title="Writing Custom Extraction Rules" href="https://msdn.microsoft.com/en-us/library/ms243179(VS.80).aspx" target="_blank"><span style="color: #0000ff;" color="#0000ff">extraction Rules</span></a></span></p>
<p><span style="font-family: Calibri; font-size: small;" size="3" face="Calibri">&nbsp;</span><span style="font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/5554.code1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/5554.code1.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/5554.code1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/5554.code1.png" width="893" height="530" /></a></span></p>
<p><span style="font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/2766.code2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/2766.code2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/2766.code2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/2766.code2.png" width="904" height="465" /></a></span></p>
<p>&nbsp;<span style="color: #993300; font-size: medium;"><b>Approach for parameterizing.</b></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">To parameterize the UserName from the above json text</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Approach to parameterize &ldquo;UserName&rdquo;</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Create a Context parameter in the WebTest which hold the value. In this case I created a Context parameter for UserName.</span></span></p>
<p><span style="font-size: small;"><b><span style="font-family: Calibri;" size="3" face="Calibri">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/4857.write1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/4857.write1.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/4857.write1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/4857.write1.png" width="860" height="524" /></a></span></b></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/6505.write2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/6505.write2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/58/6505.write2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-26-58/6505.write2.png" width="839" height="380" /></a></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging Webtests with Fiddler</title>
      <link>https://docs.microsoft.com/archive/blogs/ambhrin/debugging-webtests-with-fiddler</link>
      <pubDate>Mon, 17 Aug 2009 11:44:00 GMT</pubDate>
      <dc:creator><![CDATA[AmbhrinHalo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ambhrin/2009/08/17/debugging-webtests-with-fiddler/</guid>
      <description><![CDATA[I ran into a scenario where I had no clue why my Webtest was failing even though I did everything to...]]></description>
      <content:encoded><![CDATA[<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I ran into a scenario where I had no clue why my Webtest was failing even though I did everything to make it work.. Like correlating all values that possibly needed correlation and getting all necessary plug-ins and rules in place. I would run that webtest again 'n' again and at the same time run a fiddler trace for the same user name to see what was there in the actual request that my Webtest was not making. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Given the complexity of the WebTest and it's sheer length with all the dependant requests that it has for each of the requests I was indeed having a tough time doing a request to request match between my Webtest run and the corresponding Fiddler run. I was getting nowhere. Probably all I needed was a little more patience :-)<o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">But anyways a small&nbsp;&amp; a simple trick did all that I needed at that moment.<o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I could make a guess which request in my Webtest could be making the incorrect HTTP Requests that was making the tests to fail. I wanted only that selected bunch of requests to show up in FIDDLER when I ran the webtest. If I had that, then I could actually compare that request with the one that Fiddler actually captured when i manually stepped through the steps.<o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I wrote up a simple Pre-Request Plug-In to do this for me.</SPAN></P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>AddFiddlerProxy</FONT></FONT><FONT size=2> : </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>WebTestRequestPlugin</P></FONT></FONT><FONT size=2>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> PreRequest(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>PreRequestEventArgs</FONT></FONT><FONT size=2> e)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp; {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.WebTest.Proxy = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"127.0.0.1:8888"</FONT></FONT><FONT size=2>;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>}</P></FONT><o:p>This did all that I wanted</o:p></SPAN>]]></content:encoded>
    </item>
  </channel>
</rss>