How to find area paths/iteration paths changed in a project or project collection?

Here is a code snippet which you can use to find out area paths/iteration paths changed in a project or project collection. # Load Client Assembly [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”);   # Change the server as per your setup $tfsCollectionUrl = “http://myserver:8080/tfs/DefaultCollection”; # Connect to tfs $tfsCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($tfsCollectionUrl); $css = $tfsCollection.GetService([Microsoft.TeamFoundation.Server.ICommonStructureService]); #Query for changed…

0

How to find test points assigned to a particular person

Here is a code snippet which you can use to find test points assigned to a particular person. # Load Client Assembly [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.TestManagement.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.TestManagement.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”);   # Define parameters $tfsCollectionUrl = “http://myserver:8080/tfs/DefaultCollection”; $projectName = "DefaultProject"; $planId = "1"; $userDisplayName = "Aseem Bansal"; # Connect to tfs…

0

How to write a custom test management event listener?

In couple of my previous posts, I talked about what are the important events raised by test management service and how code for one such event listener looks like. In this post, I will talk about what exact steps I did to write my test management event listener. In case you are interested in writing…

1

How to find the action recording associated with the test?

I was looking at this question on the MTM forum and wanted to find out answers for following 2 questions. How can a user find out whether an action recording is associated with a test or not? How can a user delete the associated action recording? For #1, I coded a small power-shell script which…

3

How to enable logs for MTM?

Here are the steps you should perform to enable MTM logs: – Go to the MTM installation directory (typically it is something like C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\) Open the MTM configuration file (mtm.exe.config) from an administrative prompt. Change the trace levels to 4/verbose and add a trace listener. <system.diagnostics> <switches> <!– Trace settings for…

6

Power-shell script to find test points for a particular suite/config

One of my customer is running into an issue while customizing his BDT workflow and to debug the issue, I have just now created a power-shell script which lists down the test points belonging to a particular suite/configuration. Since I have not seen any power-shell script on this till now (probably because of the issue…

0

How to listen for TestRunChanged notification on tfs server?

In one of my previous post, I talked about what all test management related events are being published by the server. In this post, I want to share a sample code snippet that you can use to listen to one such event (TestRunChangedNotification).  To make sense of the code snippet and how to use it,…

0

A test run must be created with at-least one test case

I was trying to run an automated test using TCM.exe and the executable was failing with a message saying “A test run must be created with at-least one test case.” On looking at the code, I found why it is failing and what should I do to come out of this error. Later on I…

0

How to find the test controllers registered with Team foundation server 2012?

Here are the steps you should follow to achieve this. Copy the following contents to a power shell script file (say fqdn.ps1) # Load the binaries [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.TestManagement.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); # Connect to  Tfs $tfsCollectionUrl = “http://myserver:8080/tfs/mycollection”; $tfsCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($tfsCollectionUrl); $tcmService = $tfsCollection.GetService([Microsoft.TeamFoundation.TestManagement.Client.ITestManagementService]);   # Query for test controllers $testControllers =…

0

The build cannot be assigned to the test plan

One of the customer reported a problem saying that whenever he is trying to assign a build to the test plan in MTM, the assignment fails with error “Build XXX cannot be found”.  On investigations, Nipun from the team found that it was failing because the customer was not using the default permissions and the…

0