Sharing content in Microsoft Test Manager

Sometimes when you are working in Microsoft Test Manager (MTM) you want to share the artifact you are looking at, or you need someone else work on a specific artifact. This can be done by asking the user to:

  1. Start MTM
  2. Connect To plan 7
  3. Go to Test Case 57 (or any work item)

Or, you can share URLs!

mtm://server:8080/tfs/ProjectCollection/p:Project/testing/testcase/open?id=67

Any machine that has MTM (Test Professional, or Visual Studio Ultimate Edition) can open these links, and automatically open those items without manual intervention.

On-boarding people

A great use of this feature, is for on-boarding new people in your team. When new people arrive, or switch to your project you don’t want to spend time guiding them through getting connected. Generating a URL for a plan is simple. Click the Home button from the Testing Center, and you’ll see this:

image

Clicking ‘Copy URL for plan’ will place a MTM URL on the clipboard, ready to email out.

One caveat, is that not all mail clients will turn this straight into a clickable URL, so in that situation just use your mail client to turn it into a real link, and paste the URL into the ‘Link to section’, and it’ll all be good.

Try this feature out, and let us know what you think.

 

Regards,

Dominic, Senior Engineering Lead, VS Team Test.

Details

MTM supports a number of different URL formats for opening, and performing operations:

  • Open Test results
  • Open Test Cases (or any work item)
  • Open Test Runs
  • Open Test Plans
  • Connect to test plans

This all happens through two URL protocols:

  • mtm:// (for http connections to tfs)
  • mtms:// (For https connections to tfs)

All URLs take the form:
mtm://<server name>:<port>/<tfs vdir>/<Collection name>/p:<project name>/<center group>/<group specific>

So, for example, to open test plan 123, on testServer, with the DefaultCollection collection, in the Woodgrove project:

mtm://testServer:8080/tfs/DefaultCollection/p:Woodgrove/testing/testplan/open?id=123

This will invoke the installed MTM, connect to the server & project, and then open the specified test plan.

URL formats
It’s assumed in all these examples that the connection is to the testServer server, DefaultCollection project collection, and the Woodgrove project

Test Cases

mtm://testServer/tfs/DefaultCollection/p:Woodgrove/testing/testcase/open?id=<ID>

For these this item, you can actually pass any type of work item ID here, not just test cases

Test Plans

Mtm://testServer/tfs/DefaultCollection/p:Woodgrove/testing/testplan/open?id=<ID>

This opens the test plan.

Mtm://testServer/tfs/DefaultCollection/p:Woodgrove/testing/testplan/connect?id=<ID>

Connects the specified plan, making it the active test plan.

Test Runs

Mtm://testServer/tfs/DefaultCollection/p:Woodgrove/testing/testrun/open?id=<ID>

Opens the test run supplied

Test Results

Mtm://testServer/tfs/DefaultCollection/p:Woodgrove/testing/testresult/open?id=<runrelative ID>?runid=<run id>

Note that to get the run-relative ID can only be obtained by looking at the test result using the API. It’s not displayed in the UI at any point.

Comments

  • Anonymous
    October 19, 2010
    Can I open a test case, test Runs or defects without installing the MTM?

  • Anonymous
    October 19, 2010
    Can I open a test case, test Runs or defects without installing a MTM?

  • Anonymous
    August 04, 2011
    Hi Could you help to point how we could get run-relative ID to open test result directly, we went through the API but don't find it. Thanks for your help