<?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>allen@msft</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/allendm/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/allendm/feed.xml</link>
    <description>random bits, rants and raves</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:35:58 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Iterate over builds in VSTS</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/iterate-over-builds-in-vsts</link>
      <pubDate>Wed, 17 May 2017 05:15:47 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/?p=325</guid>
      <description><![CDATA[$personalAccessToken = "&lt;your VSTS PAT Token&gt;"

$tfsUrl=...]]></description>
      <content:encoded><![CDATA[<blockquote>$personalAccessToken = "&lt;your VSTS PAT Token&gt;"

$tfsUrl= "https://myvsts.visualstudio.com/onecrm/_apis"

$headers=@{

Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($personalAccessToken)"))

}

$builds= Invoke-RestMethod -Uri $tfsUrl"/build/definitions" -Method Get -Headers $headers

foreach($build in $builds.value) {

$b = Invoke-RestMethod -Uri $build.url -Method Get -Headers $headers

$b.variables

}</blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Executing Ordered Tests on remote machines using Run Functional Tests task</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/executing-ordered-tests-on-remote-machines-using-run-functional-tests-task</link>
      <pubDate>Tue, 09 Aug 2016 17:37:39 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/?p=266</guid>
      <description><![CDATA[The Run Functional Test task helps you execute your tests on one or more remote machines after you...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">The <a href="https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/RunDistributedTests">Run Functional Test task</a> helps you execute your tests on one or more remote machines after you have setup the test agent on them, using the <a href="https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/DeployVisualStudioTestAgent">Deploy Test Agent task</a>. This functionality can help you run your functional/UI tests on machines outside of your build agent.</p>
&nbsp;
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">During our first release of this new workflow in Team Foundation Server 2015 and Visual Studio Team Services we consciously left out some functionality that wasn’t complete for the release. One of these was the support for ordered tests. While we are working hard to get this scenario lit up for the next release we have heard enough requests to provide a workaround.</p>
&nbsp;
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><strong>So what is the workaround?</strong></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">You can copy the ordered test adapter for vstest to the right directory on your test agent and the scenario will light up.</p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">If you are using the BDT build template then add a remote file copy task before your "Run Functional Tests" task.</p>
<p style="margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/2016/08/copyorderedtestadapterdll.png"><img width="1024" height="372" class="alignnone size-large wp-image-275" alt="copyorderedtestadapterdll" src="https://msdnshared.blob.core.windows.net/media/2016/08/copyorderedtestadapterdll-1024x372.png" /></a></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">In the copy files task set the source as &lt;VSIntallDir&gt;\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.OrderedTestAdapter.dll and destination as &lt;TestAgentInstallDir&gt;\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.OrderedTestAdapter.dll
The &lt;TestAgentInstallDir&gt; would be in the %systemdrive%\Program Files (x86)\Microsoft Visual Studio 14.0 directory</p>
&nbsp;
<p style="margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/2016/08/runfunctionaltestorderedtest.png"><img width="1024" height="464" class="alignnone size-large wp-image-285" alt="runfunctionaltestorderedtest" src="https://msdnshared.blob.core.windows.net/media/2016/08/runfunctionaltestorderedtest-1024x464.png" /></a></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">In the Run Function Tests task you can now specify **\*orderedtest.dll as the test filter.</p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">One of the issues that we noticed with this approach is that ordered test failures are not registered as failures in the test run. To overcome this</p>

<ol>
 	<li>Enable oauth access to the agent in the build definition -&gt; options</li>
 	<li>Place the ps1 script in a location accessible to the build agent ( <a href="https://github.com/Microsoft/customer-scripts/blob/master/test/build/orderedtest/throwif-trxfromtestrun-ofbuild-hasfailedoutcome.ps1">https://github.com/Microsoft/customer-scripts/blob/master/test/build/orderedtest/throwif-trxfromtestrun-ofbuild-hasfailedoutcome.ps1</a> )</li>
 	<li>Add a powershell task after the run task and provide the path to the ps1 in this task</li>
 	<li>The ps1 will error out if the ordered test has failed</li>
</ol>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">The script checks the latest trx file associated with the test run associated with the current build and throws an error if the trx specifies the test run has a failed outcome. Feel free to contribute back if you find any issues in the script.</p>
&nbsp;
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">Some points to note</p>

<ol>
 	<li><span style="font-family: Calibri;font-size: 11.0pt;font-weight: normal;font-style: normal">Given that an ordered test is single unit of execution it wont be distributed across machines, if you specify multiple machines in the machines input.</span></li>
 	<li><span style="font-family: Calibri;font-size: 11.0pt">The reporting shows one entry per ordered test. You can drill down further by downloading the .trx file which is attached to the test run</span></li>
 	<li><span style="font-family: Calibri;font-size: 11.0pt">Ordered tests <a href="https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/31/executing-automated-tests-in-build-vnext-using-test-plan-test-suites/">within a test suite</a> are not supported</span></li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Remote Test Execution using Team Foundation Server 2015 RC2 and beyond</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/remote-test-execution-using-team-foundation-server-2015-rc2-and-beyond</link>
      <pubDate>Mon, 20 Jul 2015 08:35:00 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2015/07/20/remote-test-execution-using-team-foundation-server-2015-rc2-and-beyond/</guid>
      <description><![CDATA[&nbsp;
The Agents for Visual Studio suite containing the test controller and agents allowed you to...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>The Agents for Visual Studio suite containing the test controller and agents allowed you to execute your tests on a set of remote machines by providing the right configuration in your .testsettings file. Based on the feedback we have received we are providing a new and simpler way for you to do your remote automated testing starting Team Foundation Server (TFS) 2015 RC2.</p>
<p>In this blog post we will quickly setup a test rig for remote test execution using TFS 2015 RC2</p>
<p>&nbsp;</p>
<h2>Pre-requisites</h2>
<ol>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=617875">TFS 2015 RC</a>2 installation with a Build vNext agent configured on a machine with internet access.</li>
<li>A (virtual) machine to be used for testing with following requirements</li>
</ol>
<p>&nbsp;</p>
<h2>Step-By-Step Guide</h2>
<p>Head to your TFS homepage and navigate to the team project you want to work with. The below slides will guide you through this entire scenario.</p>
<p><strong>NOTE: The "Run Tests using Test Agent" task is renamed to "Run Functional Tests"</strong></p>
<p><iframe src="https://www.slideshare.net/slideshow/embed_code/key/5DRXAO11JcvTtP" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="476" height="400"></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>So what has changed</h2>
<p>There have been a lot of changes to get the stability and resiliency that you demanded in test execution. To summarize the top few improvements</p>
<ol>
<li>The test controller has been removed as the intermediate hop and the agents now directly communicate with the TFS server using HTTP.</li>
<li>You can now run tests using 3<sup>rd</sup> party test frameworks like nunit/xunit/cpp using the relevant unit test adapter, similar to Visual Studio.</li>
<li>Automated installation and configuration of your test agent on your test machines as a part of the Build workflow using our tasks in Build vNext.</li>
<li>Improved reporting for automated runs in Test Management.</li>
</ol>
<p>&nbsp;</p>
<h2>What are our limitations</h2>
<ol>
<li>We do distribution on a per test container basis ie if you have 2 machines and 2 test dlls we will execute all tests from testdll1 on machine1 and the rest from testdll2 on machine2.</li>
<li><span style="text-decoration: line-through;">We don&rsquo;t have support for workgroup/isolated/azure machines as yet.</span>&nbsp;As long as you have http connectivity from the agent to TFS/Visual Studio Team Services and your build machine you will be good to go.</li>
<li><span style="text-decoration: line-through;">We do not support Azure VMs as machines in the machine group used for testing</span></li>
<li>Yes the scenario can be used in TFS/Visual Studio Team Services as well. However we do not support hosted build pools when using on-prem machines. For this case you would have to create a new build pool and register a new build agent with it.</li>
</ol>
<p>&nbsp;More up-to-date details @&nbsp;<a title="https://aka.ms/remotevstest" href="https://aka.ms/remotevstest" target="_blank">https://aka.ms/remotevstest</a></p>
<h2>FAQ</h2>
<h4>Why do we have a test agent and a build agent? Why can&rsquo;t there just be a common agent?</h4>
<p>The build agent does provide you with unit testing facilities but only after you install Visual Studio on your build machine. The test agent has no such prerequisite. This is the sole reason why we have two agents instead of one. We are definitely looking at ways in which we no longer need to make such a distinction.</p>
<h4>Will I be able to run my java tests on my remote Linux/OSX machines using the test agent?</h4>
<p>Today the cross platform functionality is available in Build vNext. We are looking for the right data points before we build the remote testing scenario for other platforms.</p>
<p>&nbsp;</p>
<p>We hope that this post will allow you to get started with the new remote test execution workflow on your on-prem TFS installation. Try it out and let us know what you think <a href="mailto:devops_tools@microsoft.com?subject=Feedback:%20Remote%20Test%20Execution%20using%20TFS%202015%20RC">devops_tools@microsoft.com</a>.</p>
<div><br />
<div>&nbsp;</div>
<div>Additional links</div>
<div>1. A good Hands On Lab for CI/CDP - <a href="https://blogs.msdn.com/b/charles_sterling/archive/2015/06/22/ci-and-cd-hands-on-lab.aspx">https://blogs.msdn.com/b/charles_sterling/archive/2015/06/22/ci-and-cd-hands-on-lab.aspx</a></div>
<div>2. A demo video on setting up CI/CDP by one of the MVPs - <a href="https://blogs.msdn.com/b/visualstudioalm/archive/2015/07/17/video-configuring-continuous-integration-and-continuous-testing-with-visual-studio-2015.aspx">https://blogs.msdn.com/b/visualstudioalm/archive/2015/07/17/video-configuring-continuous-integration-and-continuous-testing-with-visual-studio-2015.aspx</a></div>
<div>&nbsp;</div>
</div>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Important timeout tweaks for controller agent</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/important-timeout-tweaks-for-controller-agent</link>
      <pubDate>Tue, 10 Dec 2013 08:16:00 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2013/12/10/important-timeout-tweaks-for-controller-agent/</guid>
      <description><![CDATA[Based on your network you may run into test run failures associated with the agent/controller...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: 'Segoe UI Light'; font-size: small;">Based on your network you may run into test run failures associated with the agent/controller communication. This primarily happens due to network latency, high data transfer between controller &amp; agent or high cpu utilization on the agent. In such cases you can tweak some of the timeouts to improve the resiliency of the system</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;"><strong>Increase the timeout setting for Agent timeout:</strong></span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">[Controller machine] In QTController.exe.config: &lt;drive letter:&gt;\Program Files (x86)\Microsoft Visual Studio &lt;Visual Studio Version&gt;\Common7\IDE\.</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">&nbsp;&nbsp;&nbsp; &lt;add key="AgentConnectionTimeoutInSeconds" value="120"/&gt;</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">&nbsp;&nbsp;&nbsp; &lt;add key=" AgentConnectionTimeoutInSeconds" value="120"/&gt;</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">&nbsp;&nbsp;&nbsp; &lt;add key="</span>AgentDeploymentTimeout<span style="font-family: 'Segoe UI Light'; font-size: small;">" value="300"/&gt;</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;"><span>&nbsp; &nbsp; &lt;add key="AgentSyncTimeoutInSeconds " value="300"/&gt;</span></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">Increase the value to triple.</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">[Agent machine] In QTAgentService.exe.config &lt;drive letter:&gt;\Program Files (x86)\Microsoft Visual Studio &lt;Visual Studio Version&gt;\Common7\IDE</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set ControllerConnectionPeriodInSeconds to 90 (making this 3 times too).</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">Restart the services.</span></p>
<p><span style="font-family: 'Segoe UI Light'; font-size: small;">Apart from this </span><a href="https://blogs.msdn.com/b/aseemb/archive/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel.aspx"><span style="font-family: 'Segoe UI Light'; font-size: small;">increasing the bucket size</span></a><span style="font-family: 'Segoe UI Light'; font-size: small;"> will help reducing communication too.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Getting started with Fakes using Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/getting-started-with-fakes-using-visual-studio</link>
      <pubDate>Wed, 27 Nov 2013 04:00:05 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2013/11/27/getting-started-with-fakes-using-visual-studio/</guid>
      <description><![CDATA[These are a good set of references to anyone looking into getting started with fakes...]]></description>
      <content:encoded><![CDATA[  <p><font size="3">These are a good set of references to anyone looking into getting started with fakes</font></p>  <p><a href="https://www.peterprovost.org/blog/2012/04/15/visual-studio-11-fakes-part-1/"><font size="3">https://www.peterprovost.org/blog/2012/04/15/visual-studio-11-fakes-part-1/</font></a></p>  <p><a href="https://www.peterprovost.org/blog/2012/04/25/visual-studio-11-fakes-part-2/"><font size="3">https://www.peterprovost.org/blog/2012/04/25/visual-studio-11-fakes-part-2/</font></a></p>  <p><a href="https://www.peterprovost.org/blog/2012/11/29/visual-studio-2012-fakes-part-3/"><font size="3">https://www.peterprovost.org/blog/2012/11/29/visual-studio-2012-fakes-part-3/</font></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Test controller/agent usage recommendations</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/test-controlleragent-usage-recommendations</link>
      <pubDate>Tue, 26 Nov 2013 04:43:32 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2013/11/26/test-controlleragent-usage-recommendations/</guid>
      <description><![CDATA[Over the years we have had many people ask us on what is the best way to configure and use the test...]]></description>
      <content:encoded><![CDATA[<p><font size="2">Over the years we have had many people ask us on what is the best way to configure and use the test controller and agent for remote test execution. Here is a summary of the best practices that we advocate.</font></p>    <p><font size="2"><strong>Setup and Settings</strong></font></p>  <p><font size="2">If you are on the latest VS2012U1+ or VS2013 you can ignore step#1&amp;2</font></p>  <ol>   <li>Ensure that Visual Studio 2010 SP1 is installed on all machines</li>    <p>Dev10 SP1 - <a href="https://www.microsoft.com/en-us/download/details.aspx?id=23691">https://www.microsoft.com/en-us/download/details.aspx?id=23691</a></p>    <li>Next install the latest patch available</li>    <p><a href="https://support.microsoft.com/kb/2801364">https://support.microsoft.com/kb/2801364</a></p>    <li>Open &quot;&lt;VSINSTALLDIR&gt;\Common7\IDE\QTControllerService.exe.config&quot; and add the following entry under </li>    <blockquote>     <p>&lt;add key=&quot;ControllerJobSpooling&quot; value=&quot;false&quot;/&gt;</p>   </blockquote>    <ul>     <li>Restart Controller</li>   </ul>    <li>Agent setup</li>    <ul>     <li>Install the latest patch available</li>      <li>Open &quot;&lt;VSINSTALLDIR&gt;\Common7\IDE\QTAgentService.exe.config&quot; and add the following </li>   </ul>    <blockquote>     <p>&lt;add key=&quot;RestartTestExecutionProcessForEachRun&quot; value=&quot;true&quot;/&gt;</p>   </blockquote>    <ul>     <li>Restart Agent</li>   </ul>    <li>Client Setup</li>    <ul>     <li>Install the latest patch available</li>      <li>Open &quot;&lt;VSINSTALLDIR&gt;\common7\ide\mstest.exe.config and add the following key</li>   </ul>    <blockquote>     <p>&lt;add key=&quot;DeleteTestDeploymentFiles&quot; value=&quot;yes&quot; /&gt;</p>   </blockquote>    <li>In your test settings</li>    <ul>     <li>Keep bucket size as 1000. This will result in a test run going to smaller set of agents.</li>   </ul>    <blockquote>     <p>&lt;Execution&gt;</p>   </blockquote>    <blockquote>     <p>&#160;&#160;&#160; &lt;Buckets size=&quot;1000&quot;/&gt; </p>   </blockquote>    <li>Set test run timeouts to ensure no runs go beyond acceptable limits</li>    <blockquote>     <p>&lt;Execution&gt;</p>   </blockquote>    <blockquote>     <p>&lt;Timeouts runTimeout=&quot;7200000&quot; /&gt;</p>   </blockquote>    <blockquote>     <p>7200000 = 2hrs specified in milliseconds</p>   </blockquote>    <li>Run your tests in parallel if your agents are on a multiproc system</li>    <blockquote>     <p>&lt;Execution parallelTestCount=0&gt;</p>   </blockquote>    <p><a href="https://blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/executing-unit-tests-in-parallel-on-a-multi-cpu-core-machine.aspx">https://blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/executing-unit-tests-in-parallel-on-a-multi-cpu-core-machine.aspx</a></p> </ol>    <p><strong>Other Recommendations</strong></p>  <ol>   <li>Test Controller keeps all results for a run in memory. Therefore it is necessary that test runs be split into logical groups. We recommend you split tests into assemblies so that each test dll has &lt;=5000 tests and/or run the TC in 64bit mode</li>    <ol>     <p><em>testcontrollerconfig.exe configure &lt;… configuration parameters… &gt; /platform64</em></p>   </ol>    <li>When any component of the Test Rig (any of the agents or controller) faces an issues (network disconnect, deployment failures, test crashes), the current test run is aborted. The probability of the test run getting aborted due to failure in agents reduces when we send one test run to a smaller set of agents. Keep a run limited to minimum number of test assemblies</li>    <li>To scale out you should be using multiple such rigs and breaking up your test runs amongst these rigs as required.</li> </ol>]]></content:encoded>
    </item>
    <item>
      <title>Getting the status of your test agents</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/getting-the-status-of-your-test-agents</link>
      <pubDate>Wed, 20 Nov 2013 22:07:45 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2013/11/20/getting-the-status-of-your-test-agents/</guid>
      <description><![CDATA[Users routinely want to check the status of the test agents against which they are scheduling...]]></description>
      <content:encoded><![CDATA[  <p><font size="3">Users routinely want to check the status of the test agents against which they are scheduling their remote test execution. The existing way of doing this was to fire up VS and <a href="https://www.anujchaudhary.com/2012/06/visual-studio-2012-rc-manage-test.html">open the “Manage Test Controllers” dialog</a></font></p>  <p><font size="3">With Visual Studio 2013 you can now check the status of your agents on the controller itself using the commandline</font></p>  <blockquote>   <p>Syntax-     <br />TestControllerConfig.exe status [/testController:&lt;testControllerUri&gt;]</p>    <p>testController&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; URI of the test controller. Default is localhost:6901</p> </blockquote>  <p><font size="3"></font></p>  <p><font size="3">Sample output</font></p>  <blockquote>   <p>Microsoft (R) Visual Studio Test Controller Configuration Tool     <br /> Version 12.0…. for Microsoft Visual Studio 2013      <br /> Copyright (c) Microsoft Corporation.&#160; All rights reserved.</p>    <p>Total number of agents&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 1</p>    <p>Status of agents :     <br />Agent name&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : vstfs:///…      <br /> Agent status&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Disconnected</p>    <p>     <br /> Summary of all agents :      <br /> Ready&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 0      <br /> Running tests&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 0      <br /> Offline&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 0      <br /> Deploying build&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 0      <br /> Disconnected&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 1</p> </blockquote>  <p><font size="3"></font></p>  <p><font size="3">The agent status correspond to the <a href="https://msdn.microsoft.com/en-us/library/vstudio/dd695837.aspx#ChangeAgent">existing known states listed here</a></font></p>]]></content:encoded>
    </item>
    <item>
      <title>Test Controller 2012 Update 3+</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/test-controller-2012-update-3</link>
      <pubDate>Wed, 20 Nov 2013 21:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2013/11/20/test-controller-2012-update-3/</guid>
      <description><![CDATA[New features introduced

Visual Studio Test Controller 2012 Update3+ now supports backward compat...]]></description>
      <content:encoded><![CDATA[<p>New features introduced</p>
<ol>
<li>Visual Studio Test Controller 2012 Update3+ now supports backward compat with TFS servers. So you can connect your 2013 test controller to TFS 2012+</li>
<li>The test controller now works with hosted builds having server drop locations</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Empty .coverage file with profiler related errors in the event logs</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/empty-coverage-file-with-profiler-related-errors-in-the-event-logs</link>
      <pubDate>Sat, 08 Sep 2012 00:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2012/09/08/empty-coverage-file-with-profiler-related-errors-in-the-event-logs/</guid>
      <description><![CDATA[​If you find yourself with a an empty .coverage file and see errors similar to the below in your...]]></description>
      <content:encoded><![CDATA[<div class="ExternalClassC8B5F8332E0140888A94F87CFD6B3333">
<p>​If you find yourself with a an empty .coverage file and see errors similar to the below in your event logs you most probably have a corrupt install</p>
<p>(info) .NET Runtime version 4.0.30319.17929 - The profiler has requested that the CLR instance not load the profiler into this process. Profiler CLSID: '{b19f184a-cc62-4137-9a6f-af0f91730165}'. Process ID (decimal): 12624. Message ID: [0x2516].</p>
<p>(Error) TraceLog Profiler failed in initialization due to a lack of instrumentation methods, process vstest.executionengine.x86.exe</p>
<p>&nbsp;</p>
<p>Check</p>
<p>a) Environment variable <span style="color: #0070c0; font-family: 'verdana','sans-serif'; font-size: 11pt;">VS110COMNTOOLS</span>&nbsp;is set to &lt;vsinstalldir&gt;\common7\tools</p>
<p>b) Regkey <span style="color: #0070c0; font-family: 'verdana','sans-serif'; font-size: 11pt;">HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\InstallDir</span> is set to your &lt;vsinstalldir&gt;\Common7\IDE\</p>
<p>c) covrun32.dll and covrun64.dll exist&nbsp;in "&lt;vsinstalldir&gt;\Team Tools\Dynamic Code Coverage"</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting missing data in Code Coverage Results</title>
      <link>https://docs.microsoft.com/archive/blogs/allendm/troubleshooting-missing-data-in-code-coverage-results</link>
      <pubDate>Tue, 05 Jun 2012 06:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Allen Mathias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/allendm/2012/06/05/troubleshooting-missing-data-in-code-coverage-results/</guid>
      <description><![CDATA[Code Coverage tool in Visual Studio 11 instruments native and managed binaries (DLLs/EXEs)...]]></description>
      <content:encoded><![CDATA[<div>
<div>
<p>Code Coverage tool in Visual Studio 11 instruments native and managed binaries (DLLs/EXEs) whenever they are loaded at runtime, if they meet some criteria. The code coverage information is collected for these binaries</p>
</div>
<p>At the end of the Code Coverage&nbsp;run you see code coverage within the Code Coverage results window. The total code coverage as well as code coverage for each binary are reported.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/73/2555.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-31-73/2555.1.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/73/2555.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-31-73/2555.1.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>However in some cases you may end up with a .coverage file which shows 0% coverage in the Code Coverage Results window with an error similar to &ldquo;Empty results generated: No binaries were instrumented &hellip;&rdquo;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/73/0435.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-31-73/0435.2.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/73/0435.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-31-73/0435.2.png" border="0" /></a></p>
<p>This means code coverage results were not obtained for any binary.</p>
<p>&nbsp;</p>
<p>In this article we will attempt to list down the most common reasons for such a problem and provide you with resolutions for the same.</p>
<ol>
<li><a href="#P1">No tests were executed</a></li>
<li><a href="#P2">PDBs (symbol files) are unavailable/missing</a></li>
<li><a href="#P3">Using an instrumented or optimized binary</a></li>
<li><a href="#P4">Code executed is not managed (.NET) or native (cpp) code</a></li>
<li><a href="#P5">A custom .runsettings file with exclusions is being used</a></li>
</ol>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="90" valign="top">
<p><b><a name="P1"></a>Reason</b></p>
</td>
<td width="516" valign="top">
<p>No tests were executed</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Analysis</b></p>
</td>
<td width="516" valign="top">
<p>Check your output window &ndash; Select &ldquo;Tests&rdquo; in the &ldquo;Show Output from:&rdquo; dropdown to see if there are any warnings or errors logged.</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Explanation</b></p>
</td>
<td width="516" valign="top">
<p>The Dev11 Code Coverage engine is dynamic in nature. What this means is that the instrumentation of binaries occurs only for those binaries that are loaded into memory.</p>
<p>However if none of the tests are executed then there is nothing that is available for the Code Coverage to report.</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Resolution</b></p>
</td>
<td width="516" valign="top">
<p>Verify if that the tests run fine, without Code Coverage turned on, by clicking on &ldquo;Run All&rdquo;. Fix any issues you find here before using &ldquo;Analyze Code Coverage&rdquo;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="90" valign="top">
<p><b><a name="P2"></a>Reason</b></p>
</td>
<td width="516" valign="top">
<p>PDBs (symbol files) are unavailable/missing</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Analysis</b></p>
</td>
<td width="516" valign="top">
<p>Check that all the modules within the solution have their associated PDBs available alongside the binary</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Explanation</b></p>
</td>
<td width="516" valign="top">
<p>The Dev11 Code Coverage engine requires that every module have its associated PDB available and accessible during execution. If the PDBs are unavailable we will skip the module and not provide any data for the same.</p>
<p>Note: PDBs have a direct association with a DLL via build. The DLLs and PDBs should be from the same build for it to be recognized as a valid PDB.</p>
<p>&nbsp;</p>
<p>If PDB are not installed alongside the binary, but are present in some share, configure code coverage settings specifying the path to pick the the PDB from. See &ldquo;<a href="https://blogs.msdn.com/b/sudhakan/archive/2012/05/11/customizing-code-coverage-in-visual-studio-11.aspx">Customizing Code Coverage in Visual Studio 11</a>&rdquo;</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Resolution</b></p>
</td>
<td width="516" valign="top">
<p>Install the PDB alongside the binary; Or customize code coverage settings by specifying the path to pick the PDB from.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="90" valign="top">
<p><b><a name="P3"></a>Reason</b></p>
</td>
<td width="516" valign="top">
<p>Using an instrumented or optimized&nbsp; binary</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Analysis</b></p>
</td>
<td width="516" valign="top">
<p>Check if the binary has undergone any form of advanced optimization (like the BBT optimization, Profile Guided Optimization, etc.) or has been instrumented by a profiling tool like vsinstr.exe.</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Explanation</b></p>
</td>
<td width="516" valign="top">
<p>If a binary has already been instrumented or optimized by another profiling tool eg. vsinstr.exe we skip the binary and do not include it as a part of the coverage results.</p>
<p>&nbsp;</p>
<p>Code coverage cannot be obtained for such binaries.</p>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Resolution</b></p>
</td>
<td width="516" valign="top">
<p>Use the non-instrumented / non-optimized version of the binary.</p>
<p>&nbsp;</p>
<p>In fact, it is recommended to turn off all optimizations, and run code coverage with non-optimized CHK build to get best results.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="90" valign="top">
<p><b><a name="P4"></a>Reason</b></p>
</td>
<td width="516" valign="top">
<p>Code executed is not managed (.NET) or native (cpp) code</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Analysis</b></p>
</td>
<td width="516" valign="top">
<p>Verify if your project has any .net or cpp UTs being run</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Explanation</b></p>
</td>
<td width="516" valign="top">
<p>Code Coverage in Visual Studio 11 is available only for .net and native (C++) code. If you are working with any language that does not fall into either of these categories Code Coverage will not be available for code in these unsupported languages.</p>
<p>&nbsp;</p>
<p>This can typically happen if you are developing tests with a third party unit test adapter extension.</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Resolution</b></p>
</td>
<td width="516" valign="top">
<p>None available</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="90" valign="top">
<p><b><a name="P5"></a>Reason</b></p>
</td>
<td width="516" valign="top">
<p>A custom .runsettings file with exclusions is being used</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Analysis</b></p>
</td>
<td width="516" valign="top">
<p>Verify if you are using a .runsettings file and have specified any exclusion rules that leave out your dlls from being instrumented</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Explanation</b></p>
</td>
<td width="516" valign="top">
<p>You can run your UTs with a custom .runsettings file with Code Coverage configuration specified in the DataCollectors node. In the Code Coverage configuration we allow exclusions of dlls based on name, company name, public key token etc.You might have, by mistake, excluded all your DLLs, or missed including any of your DLLs here</p>
</td>
</tr>
<tr>
<td width="90" valign="top">
<p><b>Resolution</b></p>
</td>
<td width="516" valign="top">
<p>Fix your .runsettings to have the minimal set of exclusions that do not exclude your DLLs OR explicitly include the DLLs you want coverage for.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Further Analysis</h2>
<p>To know why a specific DLL was not included by code coverage, you can analyze the .coverage file generated further using our command line utility, CodeCoverage.exe</p>
<p style="padding-left: 30px;"><i>Cd &ldquo;&lt;VSInstallDir&gt;\Team Tools\Dynamic Code Coverage Tools&rdquo;</i></p>
<p style="padding-left: 30px;"><i>CodeCoverage.exe analyze /include_skipped_modules my.coverage&nbsp;&gt; analysis.xml</i></p>
<p style="padding-left: 30px;">my.coverage is the .coverage file generated for your test run found in the TestResults folder.</p>
<p>&nbsp;</p>
<p>Here /include_skipped_modules will provide information regarding each and every module that was inspected by the Code Coverage engine and provide a reason why it was skipped. These reason codes are to be interpreted as below:</p>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="209" valign="top">
<p>Reason</p>
</td>
<td width="422" valign="top">
<p>Resolution</p>
</td>
</tr>
<tr>
<td width="209" valign="top">
<p>no_symbols</p>
</td>
<td width="422" valign="top">
<p>See <a href="#P2">PDBs (symbol files) are unavailable/missing</a></p>
</td>
</tr>
<tr>
<td width="209" valign="top">
<p>public_key_token_is_excluded</p>
<p>path_is_excluded</p>
<p>company_name_is_excluded</p>
</td>
<td width="422" valign="top">
<p>&nbsp;</p>
<p>See <a href="#P5">A custom .runsettings file with exclusions</a></p>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="209" valign="top">
<p>optimized_or_instrumented</p>
</td>
<td width="422" valign="top">
<p>See <a href="#P3">Using an instrumented or optimized binary</a></p>
</td>
</tr>
<tr>
<td width="209" valign="top">
<p>nothing_instrumented</p>
</td>
<td width="422" valign="top">
<p>No code in the dll could be instrumented.</p>
<p>See <a href="#P4">Code executed is not managed (.NET) or native (cpp) code</a></p>
</td>
</tr>
<tr>
<td width="209" valign="top">
<p>instrumentation_failure</p>
</td>
<td width="422" valign="top">
<p>The engine itself failed due to some internal error. Please try again.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>If the output file is empty, see &ldquo;<a href="#P1">No tests were executed</a>&rdquo;</p>
<div>
<div>
<div></div>
</div>
</div>
</div>
<div>
<div>
<div></div>
</div>
</div>]]></content:encoded>
    </item>
  </channel>
</rss>