Posts

Showing posts from September, 2013

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 " +      " WHERE [System.TeamProject] = '" +

TFS API: Get Work Item History Revisions for parituclar Field

Image
Hello, I observed many of us struggling to view history for any work item. History is visible but it is hard to visualize changes made like who made changes, to which field and when etc. For this matter, one has to scroll through entire history tab and find it tedious job. I was thinking what if we could view work item history for selected field with other details like who changed it and when. Here is solution - I have created a tool which show work item history for selected field. Also shows how may times selected field changed. You can view history by selecting single work item and also export entire work item query history to excel. I find this tool useful so thought of sharing with others. How it works - 1. Run EXE 2. Prompt you select/add team project server details 3. Populates your My Queries to Treeview 4. Double Click query from tree and it will show work items in right grid 5. Select Work item field from top drop down for which you want to see history 6. Doubl