Associate Test Case Automation using TFS API
Hello, I have been observing most of users reported that associating automation to test case one by one from Visual Studio Team Explorer is tedious job rather time consuming. I was thinking what if we could achieve this using TFS object model. My idea was fetch test case one by one and associate automation to test case and save test case work item. Resolution: Here is code which can use to associate automation in bulk - Add below references - Microsoft.TeamFoundation Microsoft.TeamFoundation.Client Microsoft.TeamFoundation.WorkItemTracking.Client Microsoft.TeamFoundation.WorkItemTracking teamprojectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(collectionUri); workItemStore = projectCollection.GetService<WorkItemStore>(); //You can either specify work item query to fetch test cases WorkItemCollection workItemCollection = workItemStore.Query( " SELECT * FROM WorkItems " + " WHE...