This post kicks off a series that will explore the Test Management API’s. Using these API’s you can accomplish many tasks that may not be possible via the UI (Microsoft Test and Lab Manager (MTLM) code named Camano). Perhaps you have test assets in another system for example, with the API you could create your own solution that fits your individual needs for migrating data between systems. Or maybe you have a custom tool in mind for your team that will need to be able to examine the various objects you’ve stored in the test case management component of TFS, such as your Test Plans, Test Cases, Test Runs, Results, etc.
Whatever your reason, using the Test Management API’s will almost always have a common starting point, you first need to establish a connection to the Team Foundation Server and that’s what I’ll cover here.
You’ll need to add references to the following assemblies to your project:
These will all be GAC’d on a machine you’ve installed VSTS on.
Here’s a quick and easy sample C# console application that connects to the server and creates a very basic test case.
Next TimeIn my next post I’ll start going over the core objects in the Test Management object model in more detail.