<?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>abchakra's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/abchakra/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/abchakra/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:47:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Update test steps utility</title>
      <link>https://docs.microsoft.com/archive/blogs/abchakra/update-test-steps-utility</link>
      <pubDate>Sun, 15 Sep 2013 01:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Abhijit Chakraborty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/abchakra/2013/09/15/update-test-steps-utility/</guid>
      <description><![CDATA[In 2012 release, rich text support was added to test steps control in Microsoft Test...]]></description>
      <content:encoded><![CDATA[<p>In 2012 release, rich text support was added to test steps control in Microsoft Test Manager(MTM).</p>
<p>As part of this feature, the format in which test steps xml is stored in Team Foundation Server(TFS) was also changed.</p>
<p>Recently, we observed an issue with test steps when a test case created in TFS 2010 is upgraded to TFS 2012 / 2013.</p>
<p>The issue is with test cases having test steps containing angular brackets ('&lt;', '&gt;').</p>
<p>If such a test case is modified using MTM 2012 / 2013, then text within the angular brackets disappear and &nbsp;test steps formatting (specifically newlines) &nbsp;is lost.</p>
<p>&nbsp;</p>
<p>To fix this issue we have created a small command line utility that will identify the test cases / shared steps with the above issue and fix them.</p>
<p>You can download the tool</p>
<p><strong><a title="here" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/61/43/0250.UpdateToTFS2012Format.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-61-43/0250.UpdateToTFS2012Format.zip">here</a>&nbsp;- for MTM 2012</strong></p>
<p><strong><a title="here" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/61/43/7242.UpdateToTFS2012Format.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-61-43/7242.UpdateToTFS2012Format.zip">here</a> - for MTM 2013</strong></p>
<p>&nbsp;</p>
<p>Ensure that MTM 2012 / 2013&nbsp;is installed on the machine where you run the tool.</p>
<p><span style="text-decoration: underline; font-size: small;"><strong>How to use the utility:</strong></span></p>
<p><strong>UpdateToTFS2012Format /collection:</strong>&lt;teamprojectcollectionurl&gt;</p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/teamProject:</strong>&lt;teamProject name&gt;</p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/workItemType:</strong>&lt;type of work item to be modified&gt;</p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[/id: </strong>&lt;id of the test case / shared step to be updated&gt;<strong>]</strong></p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[/mode:</strong>&lt;PREVIEW|COMMIT&gt;<strong>]</strong></p>
<p>/collection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The url link of the TFS &nbsp;team project collection</p>
<p>/teamProject &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The name of the team project</p>
<p>/workItemType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Can be either 'TestCase' or 'SharedStep'</p>
<p>/id: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Id of the test case to be updated</p>
<p>/mode:PREVIEW &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Identifies the list of test cases that will be updated by the tool</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and generates IdsOfSharedStepsToBeModified.txt /&nbsp;IdsOfTestCasesToBeModified.txt</p>
<p>/mode:COMMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Updates test steps in all test cases identified in preview mode.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In case id option is specified, only that test case is updated.</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Recommended usage:</span></strong></p>
<ol>
<li>Run in preview mode to identify all the test cases / shared steps (based on work item type specified as cmd line arg) that will be modified.</li>
</ol>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.g. <strong><em>UpdateToTFS2012Format &nbsp;/collection:abc-tfs:8080/tfs/Collection</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/teamProject:abcProject</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/workItemType:TestCase</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/mode:PREVIEW</em></strong></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2. Rename the file IdsOfTestCasesToBeModified.txt( or, IdsOfSharedStepsToBeModified.txt in case sharedsteps is specified as workItemType) and save it separately.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3. Create a copy of one of the test cases identified in the above step. (as a backup).</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4. Try updating the above test case with say id: 6.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.g.<strong><em> UpdateToTFS2012Format &nbsp;/collection:abc-tfs:8080/tfs/Collection</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /teamProject:abcProject</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /workItemType:TestCase</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /id:6</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/mode:COMMIT</em></strong></p>
<p><strong><em></em></strong>&nbsp; &nbsp; &nbsp; &nbsp; 5. Validate that the test case has been modified properly and things are working as expected.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; 6. Repeat steps 3-5 with some other test cases to make sure that test cases are being updated properly by the tool.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; 7. Once confident, update all the test cases identified in the preview mode by running the following command</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.g.<strong><em> UpdateToTFS2012Format &nbsp;/collection:abc-tfs:8080/tfs/Collection</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /teamProject:abcProject</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/workItemType:TestCase</em></strong></p>
<p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/mode:COMMIT</em></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>