<?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>arvindkrish</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/arvindkrish/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/arvindkrish/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:47:24 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Migrating test cases from the hosted service to an on premise server</title>
      <link>https://docs.microsoft.com/archive/blogs/arvindkrish/migrating-test-cases-from-the-hosted-service-to-an-on-premise-server</link>
      <pubDate>Tue, 24 Sep 2013 03:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Arvind[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arvindkrish/2013/09/24/migrating-test-cases-from-the-hosted-service-to-an-on-premise-server/</guid>
      <description><![CDATA[Migrating test cases from Hosted service to an on premise TFS server&nbsp;
Here are the steps to be...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Migrating test cases from Hosted service to an on premise TFS server</span></strong>&nbsp;</p>
<p>Here are the steps to be followed to migrate test cases from the hosted service to an on-premise server :</p>
<ul>
<li>Download the tfs integration platform suite from <a href="https://tfsintegration.codeplex.com/">https://tfsintegration.codeplex.com/</a>&nbsp;</li>
</ul>
<ul>
<li>Enable "Alternate credentials" for the hosted service by following the instructions provided <a href="https://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx">here</a>&nbsp;</li>
</ul>
<ul>
<li>Run the following command with the credentials that are used to run the TFS integration platform suite for the on premise TFS to add the user to the "Team foundation service accounts group"&nbsp;</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TFSSecurity.exe /g+ "Team Foundation Service Accounts" n:USERNAME /server:SERVERNAME&nbsp;</p>
<ul>
<li>Launch the TFS integration tool</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/5822.TFS_Integration_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/5822.TFS_5F00_Integration_5F00_1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/5822.TFS_Integration_1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/5822.TFS_5F00_Integration_5F00_1.png" alt="" border="0" /></a></p>
<ul>
<li>Create a new configuration and navigate to the "Team foundation Server" folder and select the "WorkItemTracking" configuration</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/4861.TFS_Integration_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/4861.TFS_5F00_Integration_5F00_2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/4861.TFS_Integration_2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/4861.TFS_5F00_Integration_5F00_2.png" alt="" border="0" /></a>&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;</p>
<ul>
<li>Specify the source and the destination servers and start the migration. This might take a while depending on the number of workitems present.</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/5822.TFS_Integration_3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/5822.TFS_5F00_Integration_5F00_3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/5822.TFS_Integration_3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/5822.TFS_5F00_Integration_5F00_3.png" alt="" border="0" /></a></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;"><br /> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/6557.TFS_Integration_4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/6557.TFS_5F00_Integration_5F00_4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/6557.TFS_Integration_4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/6557.TFS_5F00_Integration_5F00_4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li><strong><span style="text-decoration: underline;">Fixing broken shared step links :&nbsp;</span></strong></li>
</ul>
<p><strong></strong>On opening test cases which contain shared steps, you might notice that the shared steps don&rsquo;t show up or that the test case links to an incorrect shared step.&nbsp; You can run the utility present <a href="https://blogs.msdn.com/b/broken_shared_steps_link_after_migration_from_tfs_integration_platform/archive/2012/11/05/broken-shared-steps-link-after-migration-from-tfs-integration-platform.aspx">here</a>&nbsp;to fix this issue.&nbsp;</p>
<p>Usage : UpdateSharedSteps.exe &lt;Project Collection&gt; &lt;Project&gt;<strong></strong></p>
<p><strong>&nbsp;</strong></p>
<ul>
<li><strong><span style="text-decoration: underline;">Migration of action recordings :</span></strong><strong>&nbsp;</strong></li>
</ul>
<p>Migrating action recordings needs to be done using <a href="https://blogs.msdn.com/b/arvindkrish/archive/2013/09/05/migrating-action-recordings-after-migrating-test-cases-with-tfs-integration-platform.aspx?wa=wsignin1.0">this</a>&nbsp;utility.&nbsp;</p>
<p>Usage : FixActionRecording &lt;Hosted Service project collection url&gt; &lt;Hosted service project name&gt; &lt;Hosted service alt-credential user name&gt; &lt;Hosted service alt-credential password&gt; &lt;On-prem server project collection url&gt; &lt;On-prem server project name&gt;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/3821.TFS_Integration5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/3821.TFS_5F00_Integration5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/53/3821.TFS_Integration5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-53/3821.TFS_5F00_Integration5.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>The utility downloads all action recording attachments from the hosted service and creates a dummy test plan, a&nbsp;test suite within that plan, adds the test cases which have an associated recording to this test suite, creates dummy test results and associates the action recordings with this test result .&nbsp;This is is required because all action recordings need to be associated with a test result as well. Thus a dummy test plan and some dummy test results would be created after running this tool.<strong></strong></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Migrating action recordings after migrating Test cases with TFS Integration platform</title>
      <link>https://docs.microsoft.com/archive/blogs/arvindkrish/migrating-action-recordings-after-migrating-test-cases-with-tfs-integration-platform</link>
      <pubDate>Thu, 05 Sep 2013 05:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Arvind[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arvindkrish/2013/09/05/migrating-action-recordings-after-migrating-test-cases-with-tfs-integration-platform/</guid>
      <description><![CDATA[While migrating test cases from one server to another using the TFS Integration Platform,&nbsp;you...]]></description>
      <content:encoded><![CDATA[<p>While migrating test cases from one server to another using the TFS Integration Platform,&nbsp;you might notice that action recordings are not migrated.</p>
<p>The attached utility helps you to migrate action recordings from the TFS&nbsp;hosted service to an on premise server&nbsp;after the migration of the work items is done. It can be easily modified to migrate recordings from an on-prem to another on-prem server as well. The utility downloads the original action recordings from the source server and associates those with the migrated test case work items in the target server&nbsp;</p>
<p>The utility downloads the action recording from the hosted service and creates a dummy test plan, test suite, adds the test cases which have an associated recording to this test suite, creates dummy test results and<br />associates the action recording with this test result .&nbsp; This is is required because all action recordings need to be associated with a test result as well. Thus you might notice some additional test plans and test results which would be created after running this tool.</p>
<p>&nbsp;</p>
<p><strong>Prerequisites :</strong></p>
<p>If you want to migrate from the TFS&nbsp;hosted service, you need to enable alternate credentials for it. See <a title="https://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx" href="https://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx">this</a> blog post for details on how to do it.&nbsp;&nbsp;</p>
<p><strong>Usage :</strong></p>
<p>FixActionRecording &lt;Hosted Service project collection url&gt; &lt;Hosted service project name&gt; &lt;Hosted service alt-credential user name&gt; &lt;Hosted service alt-credential password&gt; &lt;On-prem server project collection url&gt; &lt;On-prem server project name&gt;</p>
<p><strong>Related :</strong></p>
<p><a title="https://blogs.msdn.com/b/broken_shared_steps_link_after_migration_from_tfs_integration_platform/archive/2012/11/05/broken-shared-steps-link-after-migration-from-tfs-integration-platform.aspx" href="https://blogs.msdn.com/b/broken_shared_steps_link_after_migration_from_tfs_integration_platform/archive/2012/11/05/broken-shared-steps-link-after-migration-from-tfs-integration-platform.aspx" target="_blank">Here</a> is a blog posted which helps you to fix broken shared step links after migration.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/44/66/33/FixActionRecording.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-44-66-33/FixActionRecording.zip">FixActionRecording.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Find all test cases which contain parameters for a given plan and suite</title>
      <link>https://docs.microsoft.com/archive/blogs/arvindkrish/find-all-test-cases-which-contain-parameters-for-a-given-plan-and-suite</link>
      <pubDate>Sat, 15 Dec 2012 06:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Arvind[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arvindkrish/2012/12/15/find-all-test-cases-which-contain-parameters-for-a-given-plan-and-suite/</guid>
      <description><![CDATA[A customer was interested in reporting on parameterized test cases present in a test plan. Here is a...]]></description>
      <content:encoded><![CDATA[<p>A customer was interested in reporting on parameterized test cases present in a test plan. Here is a powershell script that lists the number of parameters,and the number of iterations for all test cases present within a given plan and suite:</p>
<p><em># Load Client Assembly&nbsp;<br />[Reflection.Assembly]::Load(&ldquo;Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&rdquo;);&nbsp;<br />[Reflection.Assembly]::Load(&ldquo;Microsoft.TeamFoundation.TestManagement.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&rdquo;);&nbsp;<br />[Reflection.Assembly]::Load(&ldquo;Microsoft.TeamFoundation.TestManagement.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&rdquo;);&nbsp;<br />&nbsp;&nbsp;<br /># Define parameters&nbsp;<br />$tfsCollectionUrl = &ldquo;</em><a href="https://myserver:8080/tfs/DefaultCollection%E2%80%9D;"><em>https://myserver:8080/tfs/DefaultCollection&rdquo;;</em></a>&nbsp;<br /><em>$projectName = "DefaultProject";&nbsp;<br />$planId = "1";&nbsp;<br />$suiteId = "7";&nbsp;;</em></p>
<p><em># Connect to tfs&nbsp;<br />$tfsCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($tfsCollectionUrl);&nbsp;<br />$tcmService = $tfsCollection.GetService([Microsoft.TeamFoundation.TestManagement.Client.ITestManagementService]);&nbsp;<br />[Microsoft.TeamFoundation.TestManagement.Client.ITestManagementTeamProject] $tcmProject = $tcmService.GetTeamProject($projectName);</em></p>
<p><em># Query for test plan/points&nbsp;<br />$testPlansProperty = <span style="font-size: xx-small;">[Microsoft.TeamFoundation.TestManagement.Client.ITestManagementTeamProject].</span></em><span style="font-size: xx-small;"><em>GetProperty("TestPlans").GetGetMethod();</em></span></p>
<p><em>$testPlans = $testPlansProperty.Invoke($tcmProject, "instance,public", $null, $null, $null);</em></p>
<p><em>$testPlan = $testPlans.Find($planId);&nbsp;<br />$pointsQueryWiql = [string]::Format("SELECT * FROM TestPoint WHERE SuiteId={0}", $suiteId);&nbsp;<br />$testPoints = $testPlan.QueryTestPoints($pointsQueryWiql);</em></p>
<p><em></em><br /><em>foreach($testPoint in $testPoints){</em><br /><em>&nbsp; &nbsp;$testCase = $testPoint.TestCaseWorkItem;</em><br /><em>&nbsp; &nbsp;$parametersCount = $testCase.TestParameters.Count;&nbsp;</em><br /><em>&nbsp; &nbsp;Write-Host("----------------------------------");</em><br /><em>&nbsp; &nbsp;Write-Host([string]::format("Id:{0} Title:{1}", $testCase.Id,$testCase.Title));</em><br /><em>&nbsp; &nbsp;Write-Host ("Parameters count: {0}" -f ($parametersCount));</em><br /><em>&nbsp; &nbsp;Write-Host ("Is test case parameterized: {0}" -f ($parametersCount -gt 0));</em><br /><em>&nbsp; &nbsp; if($parametersCount -gt 0){</em><br /><em>&nbsp; &nbsp; &nbsp; &nbsp; Write-Host("Iteration count: {0}" -f $testCase.Data.Tables[0].Rows.Count);</em><br /><em>&nbsp; &nbsp; }</em><br /><em>}</em><br /><br /></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/37/83/43/FindParameterizedTestCases.ps1" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-37-83-43/FindParameterizedTestCases.ps1">FindParameterizedTestCases.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Find all test suites / test plans a test case belongs to</title>
      <link>https://docs.microsoft.com/archive/blogs/arvindkrish/find-all-test-suites-test-plans-a-test-case-belongs-to</link>
      <pubDate>Mon, 22 Oct 2012 11:41:00 GMT</pubDate>
      <dc:creator><![CDATA[Arvind[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arvindkrish/2012/10/22/find-all-test-suites-test-plans-a-test-case-belongs-to/</guid>
      <description><![CDATA[One of the most common asks on the visual studio user voice website has been to have a way to find...]]></description>
      <content:encoded><![CDATA[<p>One of the most common asks on the visual studio user voice website has been to have a way to find out in what all test suites / test plans a test case is located <a title="(link)" href="https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2038943-show-me-all-test-suites-test-plans-a-test-case-be" target="_blank">(link)</a>. You can use the attached tool to find this.</p>
<p>The usage of the tool is :<br />FindTestCase &lt;TestCaseId&gt; &lt;ServerUrl&gt; &lt;ProjectName&gt;</p>
<p>TestCaseId - The id of the test case to be found.Eg : 515<br />ServerUrl- The server url . Eg : https://localhost:8080/tfs/DefaultCollection<br />ProjectName - The project name&nbsp;</p>
<p>&nbsp;</p>
<p>I present some sample code below to help with this issue. The code is fairly straightfoward. Do let me know if you have any questions / find any bugs in the code.</p>
<p>&nbsp;</p>
<pre style="color: #000000; background-color: #eeeeee; font-size: 10pt; font-family: 'Courier New';"><span style="color: #000000;"><span style="color: #bb7977; font-weight: bold;">namespace</span> FindTestCase&nbsp;</span></pre>
<pre style="color: #000000; background-color: #eeeeee; font-size: 10pt; font-family: 'Courier New';"><span style="color: #000000;"><span style="color: #ff0080; font-weight: bold;">{</span> <br /><span style="color: #bb7977; font-weight: bold;">using</span> Microsoft<span style="color: #ff0080; font-weight: bold;">.</span>TeamFoundation<span style="color: #ff0080; font-weight: bold;">.</span>Client<span style="color: #ff0080; font-weight: bold;">;</span> <br /><span style="color: #bb7977; font-weight: bold;">using</span> Microsoft<span style="color: #ff0080; font-weight: bold;">.</span>TeamFoundation<span style="color: #ff0080; font-weight: bold;">.</span>TestManagement<span style="color: #ff0080; font-weight: bold;">.</span>Client<span style="color: #ff0080; font-weight: bold;">;</span> <br /><span style="color: #bb7977; font-weight: bold;">using</span> System<span style="color: #ff0080; font-weight: bold;">;</span> <br /><span style="color: #bb7977; font-weight: bold;">using</span> System<span style="color: #ff0080; font-weight: bold;">.</span>Linq<span style="color: #ff0080; font-weight: bold;">;</span> <br /><span style="color: #bb7977; font-weight: bold;"><br />class</span> FindTestCase <br /><span style="color: #ff0080; font-weight: bold;">{</span> <br /><span style="color: #bb7977; font-weight: bold;">static</span> <span style="color: #8080c0; font-weight: bold;">void</span> <span style="color: #004466;">Main</span><span style="color: #ff0080; font-weight: bold;">(</span><span style="color: #8080c0; font-weight: bold;">string</span><span style="color: #ff0080; font-weight: bold;">[]</span> args<span style="color: #ff0080; font-weight: bold;">)</span> <br /><span style="color: #ff0080; font-weight: bold;">{</span> <br /><span style="color: #8080c0; font-weight: bold;">int</span> testCaseId<span style="color: #ff0080; font-weight: bold;">;</span> <br /><span style="color: #bb7977; font-weight: bold;"> if</span> <span style="color: #ff0080; font-weight: bold;">(</span>args<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">Count</span><span style="color: #ff0080; font-weight: bold;">() &lt;</span> </span><span style="color: #800080;">3</span><span style="color: #ff0080; font-weight: bold;">)</span>
            <span style="color: #ff0080; font-weight: bold;">{</span>
                Console<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">WriteLine</span><span style="color: #ff0080; font-weight: bold;">(</span><span style="color: #a68500;">"Usage : FindTestCase &lt;TestCaseId&gt; &lt;ServerUrl&gt; &lt;ProjectName&gt;"</span><span style="color: #ff0080; font-weight: bold;">);</span>
                <span style="color: #bb7977; font-weight: bold;">return</span><span style="color: #ff0080; font-weight: bold;">;</span>
            <span style="color: #ff0080; font-weight: bold;">}</span>

            <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(!</span><span style="color: #8080c0; font-weight: bold;">int</span><span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">TryParse</span><span style="color: #ff0080; font-weight: bold;">(</span>args<span style="color: #ff0080; font-weight: bold;">[</span><span style="color: #800080; font-weight: bold;">0</span><span style="color: #ff0080; font-weight: bold;">],</span> out testCaseId<span style="color: #ff0080; font-weight: bold;">))</span>
            <span style="color: #ff0080; font-weight: bold;">{</span>
                Console<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">WriteLine</span><span style="color: #ff0080; font-weight: bold;">(</span><span style="color: #a68500;">"The test case id must be an </span>
<span style="color: #a68500;"> integer"</span><span style="color: #ff0080; font-weight: bold;">);</span>
                <span style="color: #bb7977; font-weight: bold;">return</span><span style="color: #ff0080; font-weight: bold;">;</span>
            <span style="color: #ff0080; font-weight: bold;">}</span>
            <span style="color: #8080c0; font-weight: bold;">string</span> serverUrl <span style="color: #ff0080; font-weight: bold;">=</span> <span style="color: #a68500;">args[1];</span>
            <span style="color: #8080c0; font-weight: bold;">string</span> projectName <span style="color: #ff0080; font-weight: bold;">=</span> <span style="color: #a68500;">args[2];</span>

            var projectCollectionUri <span style="color: #ff0080; font-weight: bold;">=</span> <span style="color: #bb7977; font-weight: bold;">new</span> <span style="color: #004466;">Uri</span><span style="color: #ff0080; font-weight: bold;">(</span>serverUrl<span style="color: #ff0080; font-weight: bold;">);</span>
            var projectCollection <span style="color: #ff0080; font-weight: bold;">=</span> TfsTeamProjectCollectionFactory<span style="color: #ff0080; font-weight: bold;">.</span>
            <span style="color: #004466;">GetTeamProjectCollection</span><span style="color: #ff0080; font-weight: bold;">(</span>projectCollectionUri<span style="color: #ff0080; font-weight: bold;">);</span>
            ITestManagementTeamProject project <span style="color: #ff0080; font-weight: bold;">=</span> projectCollection<span style="color: #ff0080; font-weight: bold;">.</span>
            GetService<span style="color: #ff0080; font-weight: bold;">&lt;</span>ITestManagementService<span style="color: #ff0080; font-weight: bold;">&gt;().</span><span style="color: #004466;">GetTeamProject</span><span style="color: #ff0080; font-weight: bold;">(</span>
            projectName<span style="color: #ff0080; font-weight: bold;">);</span>

            <span style="color: #bb7977; font-weight: bold;">foreach</span> <span style="color: #ff0080; font-weight: bold;">(</span>ITestPlan testPlan <span style="color: #bb7977; font-weight: bold;">in</span> project<span style="color: #ff0080; font-weight: bold;">.</span>TestPlans<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">Query</span><span style="color: #ff0080; font-weight: bold;">(</span>
            <span style="color: #a68500;">"SELECT * from TestPlan"</span><span style="color: #ff0080; font-weight: bold;">))</span>
            <span style="color: #ff0080; font-weight: bold;">{</span>
                <span style="color: #f27900;">//Check if the test case is present in the plan</span>
                <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>testPlan<span style="color: #ff0080; font-weight: bold;">.</span>RootSuite<span style="color: #ff0080; font-weight: bold;">.</span>AllTestCases<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">Where</span><span style="color: #ff0080; font-weight: bold;">(</span>tc <span style="color: #ff0080; font-weight: bold;">=&gt;</span> tc<span style="color: #ff0080; font-weight: bold;">.</span>Id 
                <span style="color: #ff0080; font-weight: bold;">==</span> testCaseId<span style="color: #ff0080; font-weight: bold;">).</span><span style="color: #004466;">Count</span><span style="color: #ff0080; font-weight: bold;">() &gt;</span> <span style="color: #800080; font-weight: bold;">0</span><span style="color: #ff0080; font-weight: bold;">)</span>
                <span style="color: #ff0080; font-weight: bold;">{</span>
                    <span style="color: #f27900;">//If the test case is present, dig deeper to find </span>
<span style="color: #f27900;"> the suite(s) where it is present</span>
                    <span style="color: #004466;">FindInSuites</span><span style="color: #ff0080; font-weight: bold;">(</span>testPlan<span style="color: #ff0080; font-weight: bold;">.</span>RootSuite<span style="color: #ff0080; font-weight: bold;">,</span> 
                    testCaseId<span style="color: #ff0080; font-weight: bold;">);</span>
                <span style="color: #ff0080; font-weight: bold;">}</span>
            <span style="color: #ff0080; font-weight: bold;">}</span>
        <span style="color: #ff0080; font-weight: bold;">}</span>

        <span style="color: #bb7977; font-weight: bold;">static</span> <span style="color: #8080c0; font-weight: bold;">void</span> <span style="color: #004466;">FindInSuites</span><span style="color: #ff0080; font-weight: bold;">(</span>IStaticTestSuite testSuite<span style="color: #ff0080; font-weight: bold;">,</span> <span style="color: #8080c0; font-weight: bold;">int</span> testCaseId<span style="color: #ff0080; font-weight: bold;">)</span>
        <span style="color: #ff0080; font-weight: bold;">{</span>
            <span style="color: #bb7977; font-weight: bold;">foreach</span> <span style="color: #ff0080; font-weight: bold;">(</span>ITestSuiteEntry entry <span style="color: #bb7977; font-weight: bold;">in</span> testSuite<span style="color: #ff0080; font-weight: bold;">.</span>Entries<span style="color: #ff0080; font-weight: bold;">)</span>
            <span style="color: #ff0080; font-weight: bold;">{</span>
                <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>entry<span style="color: #ff0080; font-weight: bold;">.</span>EntryType <span style="color: #ff0080; font-weight: bold;">==</span> TestSuiteEntryType<span style="color: #ff0080; font-weight: bold;">.</span>TestCase<span style="color: #ff0080; font-weight: bold;">)</span>
                <span style="color: #ff0080; font-weight: bold;">{</span>
                    <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>entry<span style="color: #ff0080; font-weight: bold;">.</span>Id <span style="color: #ff0080; font-weight: bold;">==</span> testCaseId<span style="color: #ff0080; font-weight: bold;">)</span>
                    <span style="color: #ff0080; font-weight: bold;">{</span>
                        Console<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">WriteLine</span><span style="color: #ff0080; font-weight: bold;">(</span><span style="color: #a68500;">"Test suite Id :</span> <span style="color: #9e5dff;">{0}</span><span style="color: #a68500;">, Test </span>
<span style="color: #a68500;"> suite title :</span> <span style="color: #9e5dff;">{1}</span><span style="color: #a68500;">, Test plan id :</span> <span style="color: #9e5dff;">{2}</span><span style="color: #a68500;">"</span><span style="color: #ff0080; font-weight: bold;">,</span> 
                        testSuite<span style="color: #ff0080; font-weight: bold;">.</span>Id<span style="color: #ff0080; font-weight: bold;">,</span> testSuite<span style="color: #ff0080; font-weight: bold;">.</span>Title<span style="color: #ff0080; font-weight: bold;">,</span> testSuite<span style="color: #ff0080; font-weight: bold;">.</span>Plan<span style="color: #ff0080; font-weight: bold;">.</span>
                        Id<span style="color: #ff0080; font-weight: bold;">);</span>
                    <span style="color: #ff0080; font-weight: bold;">}</span>
                <span style="color: #ff0080; font-weight: bold;">}</span>
                <span style="color: #bb7977; font-weight: bold;">else</span>
                <span style="color: #ff0080; font-weight: bold;">{</span>
                    IStaticTestSuite staticSuite <span style="color: #ff0080; font-weight: bold;">=</span> entry<span style="color: #ff0080; font-weight: bold;">.</span>TestObject as 
                    IStaticTestSuite<span style="color: #ff0080; font-weight: bold;">;</span>

                    <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>staticSuite <span style="color: #ff0080; font-weight: bold;">!=</span> <span style="color: #bb7977; font-weight: bold;">null</span><span style="color: #ff0080; font-weight: bold;">)</span>
                    <span style="color: #ff0080; font-weight: bold;">{</span>
                <span style="color: #004466;">FindInSuites</span><span style="color: #ff0080; font-weight: bold;">(</span>staticSuite<span style="color: #ff0080; font-weight: bold;">,</span>testCaseId<span style="color: #ff0080; font-weight: bold;">);</span>
                        
                    <span style="color: #ff0080; font-weight: bold;">}</span>
                    <span style="color: #bb7977; font-weight: bold;">else</span>
                    <span style="color: #ff0080; font-weight: bold;">{</span>
                        <span style="color: #f27900;">//Check in query based or requirement based </span>
<span style="color: #f27900;"> suites which cannot contain another suite as </span>
<span style="color: #f27900;"> child</span>
                        IDynamicTestSuiteBase dynamicSuite <span style="color: #ff0080; font-weight: bold;">=</span> entry<span style="color: #ff0080; font-weight: bold;">.</span>
                        TestObject as IDynamicTestSuiteBase<span style="color: #ff0080; font-weight: bold;">;</span>
                        <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>dynamicSuite <span style="color: #ff0080; font-weight: bold;">!=</span> <span style="color: #bb7977; font-weight: bold;">null</span><span style="color: #ff0080; font-weight: bold;">)</span>
                        <span style="color: #ff0080; font-weight: bold;">{</span>
                            <span style="color: #bb7977; font-weight: bold;">if</span> <span style="color: #ff0080; font-weight: bold;">(</span>dynamicSuite<span style="color: #ff0080; font-weight: bold;">.</span>TestCases<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">Where</span><span style="color: #ff0080; font-weight: bold;">(</span>tc <span style="color: #ff0080; font-weight: bold;">=&gt;</span> tc<span style="color: #ff0080; font-weight: bold;">.</span>
                            Id <span style="color: #ff0080; font-weight: bold;">==</span> testCaseId<span style="color: #ff0080; font-weight: bold;">).</span><span style="color: #004466;">Count</span><span style="color: #ff0080; font-weight: bold;">() &gt;</span> <span style="color: #800080; font-weight: bold;">0</span><span style="color: #ff0080; font-weight: bold;">)</span>
                            <span style="color: #ff0080; font-weight: bold;">{</span>
                                Console<span style="color: #ff0080; font-weight: bold;">.</span><span style="color: #004466;">WriteLine</span><span style="color: #ff0080; font-weight: bold;">(</span><span style="color: #a68500;">"Test suite Id :</span> <span style="color: #9e5dff;">{0}</span><span style="color: #a68500;">,</span>
<span style="color: #a68500;"> Test suite title :</span> <span style="color: #9e5dff;">{1}</span><span style="color: #a68500;">, Test plan id : </span>
                                <span style="color: #9e5dff;">{2}</span><span style="color: #a68500;">"</span><span style="color: #ff0080; font-weight: bold;">,</span> dynamicSuite<span style="color: #ff0080; font-weight: bold;">.</span>Id<span style="color: #ff0080; font-weight: bold;">,</span> dynamicSuite<span style="color: #ff0080; font-weight: bold;">.</span>
                                Title<span style="color: #ff0080; font-weight: bold;">,</span> dynamicSuite<span style="color: #ff0080; font-weight: bold;">.</span>Plan<span style="color: #ff0080; font-weight: bold;">.</span>Id<span style="color: #ff0080; font-weight: bold;">);</span>
                            <span style="color: #ff0080; font-weight: bold;">}</span>
                        <span style="color: #ff0080; font-weight: bold;">}</span>
                    <span style="color: #ff0080; font-weight: bold;">}</span>
                <span style="color: #ff0080; font-weight: bold;">}</span>
            <span style="color: #ff0080; font-weight: bold;">}</span>
        <span style="color: #ff0080; font-weight: bold;">}</span>
    <span style="color: #ff0080; font-weight: bold;">}</span>
<span style="color: #ff0080; font-weight: bold;">}</span>
</pre>
<!--HTML generated by highlight 3.12, https://www.andre-simon.de/-->
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/36/17/82/FindTestCase.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-36-17-82/FindTestCase.zip">FindTestCase.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Hello !!</title>
      <link>https://docs.microsoft.com/archive/blogs/arvindkrish/hello</link>
      <pubDate>Mon, 22 Oct 2012 10:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Arvind[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/arvindkrish/2012/10/22/hello/</guid>
      <description><![CDATA[Hi folks, my name is Arvind and I am a developer in the visual studio test and lab management team....]]></description>
      <content:encoded><![CDATA[<p>Hi folks, my name is Arvind and I am a developer in the visual studio test and lab management team. I had joined Microsoft in 2011 after doing an internship here. I will be sharing interesting stuff about the product and other miscellaneous stuff.</p>]]></content:encoded>
    </item>
  </channel>
</rss>