Connecting to TFS from Microsoft Test Manager aka MTM

Connecting to TFS from Microsoft Test Manager aka MTM

  • Comments 5

 

This question has come up a few times, so I thought I might as well blog. How to connect to Team Foundation Server from the Test Management console.

You are connecting from MTM to TFS and you get the following error.

Unable to connect to the server <YourServerName>. Check that the server name is correct and that you have access to the server.

First check if your server version is 2010 or not. You cant use MTM to connect to a 2008 TFS Server. Assuming it is a 2010 Server, then you can carry out some of the steps below to get connected from MTM to TFS 2010.

Say for instance this is your TFS instance that you had connected to from Visual Studio Team Explorer Client.

image

So you go to the MTM Console and try to add the Server as follows, and click on Add.

image

You get this response, wondering what you did wrong.

image

Then you add the “TFS” at the end as follows:

image

And voila you are connected. And it lists you the Project Collection to pick and the Team Project to pick underneath it  as follows:

image

Click on the project you want to work on, and it should take you to the screen and you are on your way.

image

Sometimes you will get errors not connecting to the TFS Server. Most often this is due to wrong Server URL you specified. In such cases also try the method below.

 

The other way to connect from MTM to TFS: MTM command line

If you go the MTM installation folder, you can connect to TFS directly by using the command line invocation of MTM.

image

The easiest way to get to the correct Server URL that MTM needs is to go the Team Explorer in Visual Studio and copy and paste from there. See below for the Server Url in the properties window from where you C&P.

image

MTM is installed in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE folder, if you installed on the C:\ drive. So go to that in a command prompt and invoke MTM as follows: (contains two / switches /s for Server and /p for project – your might vary based on your URL and Project Collection)

image

This should take you to the screen for selecting a Test Plan if you already had one, or to add a new one if non existed for the Team Project that you had chosen, and you should be good to go.

image

Not only that, once you got the command-line working, you can convert it into a Desktop Shortcut and or a Taskbar item and always keep it ready to launch if you work with MTM a lot.

In my case the string I used for shortcut is exactly the same as in the command window. Please see below:

image

Basically you have to fill up the /s and the /p parameter arguments to MTM.

image

Leave a Comment
  • Please add 5 and 6 and type the answer here:
  • Post
  • Hi Girish, I have a question, Is there a way that we could use command-line to start MTM and directly to view a Test run result, I have know the test run id. Any help is appreciated.

  • Hi Vincent,

    You should be able to use the technique in the link below.

    msdn.microsoft.com/.../gg315943

    Girish.

  • Thanks a lot, Girish. It's really helpful.

  • Nice Article !!

  • Nice Article !!

    Help ful

Page 1 of 1 (5 items)