title: How to change Automation Status of test case in MTM using c#?
body: <p>We are trying to integrate UFT scripts with MTM. By far we succeeded in doing so. We have created many applications which uses TFS API and we are comfortable with it.</p>
  
  <p>Question: How can we change the <strong>Automation Status</strong> of a test case?</p>
  
  <p>What we did:</p>
  
  <pre><code>TfsTeamProjectCollection tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("Your URL"));
  ITestManagementTeamProject project = tfs.GetService&lt;ITestManagementService&gt;().GetTeamProject("Ypur Project Name");
  ITestPlan testPlan = project.TestPlans.find("Your test plan ID");
  ItestCaseCollection testcasecollection = testPlan.RootSuite.AllTestCases;
  
  foreach (ITestCase testcase in testcasecollection)
  {
     if (testcase.Id=="YourTestcaseID")
     {
         //Now here we need tochange status of test case from Not Automated to automated 
         //we can change area path, title ,priority etc using TFS provided methods, but we cant change Automation status from Not Automated to others
         testcase.status="Active"; // to change status of test case from closed to active.
  
        // What is the method to change Automation status for a test case?? we only find method to get the automation status by using below method which is read only and returns value.
        string str=testcase.IsAutomated(); // this returns but not sets
     }
  }
  </code></pre>
  
  <p>So in short do we have any method to change Automation Status of test case in MTM/TFS using C# like we change state and others?</p>