DCSIMG
TFS API,.NET 4 - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

Browse by Tags

All Tags » TFS API » .NET 4 (RSS)
TFS API Part 42 – Getting Started With Lab Management API
Tweet I did some cool things lately with TFS Lab Management API, from connecting it to TFS Web Access and allow REST access to the lab (if you want to ask why – The customer is always right ). So this part of TFS API will deal with Lab Management API, although Lab Management API is not public I’ll show some cool things you can do but this will be under your own risk. Again, this is just the beginning of the Lab Management API, so let’s get started Download Demo Project Step 1: Located “ Microsoft...
TFS API Part 41–Manage Groups and Members
Tweet In the past I’ve showed some examples on how to work with TFS IGroupSecurityService for getting users list, but you can do much more, Create new Group, Add or Remove users from group etc… TFS API Part 25: Get TFS User List (Mail Sid, Account, Domain) – TFS 2010 TFS API Part 4: Get TFS User List (Mail, Sid, Account, Domain) Download Demo Project Step 1: Connect To TFS and Get All Users and Projects As always we need to start with connecting to TFS, but here we’ll also obtain 2 important services...
My Lecture at Munich ALM Days 2011
Tweet The conference was Amazing!!! I had great time in the conference with partners, customers and friends, I didn’t went to most of the lectures (Ich weiß nicht Deutsch spricht) but from the people who presented the presentation and the title there were plenty of interesting lectures. In my lecture I’ve talked about Applied Software Testing with Visual Studio 2010 , I showed demos on Test Manager, Web Performance Test, Load Testing and of course Coded UI Testing. I’ve also talked about Migration...
TFS API Part 40–Build Service Host
Tweet First, what is the Build Service Host or IBuildServiceHost ? The BuildServiceHost object represent the physical location of the Controller and/or Agent objects. The name property is usually the machine name that the Controller or Agent lives on. In earlier versions, this was simply the Machine Name property on the Agent. Now, I’m working with a customer works with Lab Manager and after upgrading the SCVVM and perform some port changes we faced an issue – The Build Service Host stuck in your...
TFS API Part 39 – Show Deleted Items in Source Control
Tweet I got this questions a lot, if this because lots of my customers working with branches and often they delete those old branches or just because someone delete a folder and you want to see its content. There are two ways to see deleted items from source control, the first is through Visual Studio and the second through TFS API. See Deleted Items In Visual Studio: First open visual studio 2010 and open source control Navigate to –> Tools –> Options –> Source Control –> Visual Studio...
TFS API Part 38 – Create Label
In my last post on TFS API I summarize in Index Page include 37 parts - http://blogs.microsoft.co.il/blogs/shair/archive/2011/05/18/tfs-api-index-parts-1-to-37.aspx And I coming back with more about TFS API, and Today about how to create Label using TFS API. Download Demo Project Step 1: Create Project and Add Reference Create an WPF/WinForm application and add the following references: First add reference for Microsoft.TeamFoundation.dll Microsoft.TeamFoundation.Build.Client Microsoft.TeamFoundation...
Test Case Migrator Between Projects – WPF Metro
Test Case Migrator Between Projects – WPF Metro This is a common question I keep hearing from customers: Question: How can we copy Test Cases \ Shared Steps from one Team Project to another? Answer:  You can manually duplicate item after item in visual studio but this isn’t a good solution if you have lots of Test Cases to copy. So, to solve this problem I built a tiny little tool to help you accomplish this task. This tool contains 4 steps: Getting Started: 1. Connection Connect to TFS, pick...
TFS API Part 32 – Add and Remove Users From Application Groups
TFS API Part 32 – Add and Remove Users From Application Groups Download Demo Project Step 1: Create Project and Add Reference Create an WPF/WinForm application and add the following references: First add reference for Microsoft.TeamFoundation.dll Microsoft.TeamFoundation.Client.dll Microsoft.TeamFoundation.Common.dll All files located under - c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\ Step 2: Connect to Team Foundation Server ( TFS API Part 20: Bye TeamFoundationServer...
TFS API Part 31 – Working With Queries – Part 2
TFS API Part 31 – Working With Queries – Part 2 In my last post TFS API Part 30 – Working With Queries I demonstrate a simple API example for getting Queries from TFS 2010, in this sample I’ll show how to run Queries and display the results, Deleting and Creating new Folder using TFS API. Download Demo Project Step 1: Add Results Using WorkItemStore object and call the Query method you can set the results directly to DataGrid. void item_MouseDoubleClick( object sender, MouseButtonEventArgs e) {    ...
TFS API Part 30 – Working With Queries
TFS API Part 30 – Working With Queries TFS 2010 comes with new abilities for Queries that allows you to define Hierarchy and Direct Links (Read More - Work Item Relations (Visual) ). This is the first post on that subject and this will show how to interact with TFS 2010 Queries – Filter, View and Create New using TFS 2010 API. Download Demo Project Step 1: Create Project and Add Reference Create an WPF/WinForm application and add the following references: using Microsoft.TeamFoundation.Client; using...
TFS API Part 29 – TFS Impersonation
TFS API Part 29 – TFS Impersonation What is TFS Impersonation? TFS Impersonation is a feature that was introduced in TFS 2010 in order to allow a process running as User A to make web service calls to TFS in such a way that TFS thinks the actions are being performed by User B. A long time ago I wrote about Access Token With C# , a method that will allow you to perform actions with a different user. Why? when writing Tools and services for customers one of the most important features is to perform...
TFS API Part 28 - Test Suite Hierarchy Builder
TFS API Part 28 -Test Suite Hierarchy Builder In my previous post regarding TFS API TFS API Part 27 – Test Plans, Test Suites, Test Cases Mapping , I showed how to create and obtain Test Plans, Test Suite and Test Cases objects. As part of Quality Center to TFS 2010 Migration Tool I’m translating Quality Center hierarchy into Areas in TFS 2010 - as you can see from the following pictures the QC hierarchy(middle picture) looks the same as TFS Areas (left picture) but it’s not feels the same… Feels...
TFS API Part 27 – Test Plans, Test Suites, Test Cases Mapping
TFS API Part 27 – Test Plans, Test Suites, Test Cases Mapping In my last post TFS API Part 26 – Add/Remove Test Plans I showed how to Add remove Test Plan using MTM API.                     Picture - A Now when we know how to use work with Test Plan lets deep dive to all items under each Test Plan, in this post I’ll show how to get all Test Suites hierarchy Test Cases and more. As QA manager it will be...
TFS API Part 26 – Add/Remove Test Plans
TFS API Part 26 – Add/Remove Test Plans Microsoft Test Manager is a great tool helping us to manage our Test Plan Test Suites and our Test Cases. As you can see from the picture below you can define as many Test Plans as you want to manage your Testing cycles, Today I had a customer with a special need – he wanted to add Test Plan automatically after a successful Build, The name of the new Test Plan need to be the same as the Build name and all the related Requirements from the latest build need...