Test management SQL query to find out the test results associated with a suite

One of the customer wanted to know the sql query which he can use to find out the results associated with a suite. Nipun sent the following query: –   DECLARE @deletedSuiteId INT SET @deletedSuiteId = 167 –Replace with appropriate suite Id SELECT r.* FROM tbl_testresult r JOIN tbl_point p ON r.PartitionId = p.PartitionId AND…

0

How to preserve the test results directory?

In VS 2012, when you are running mstest based tests, then the framework deletes the test results directory when the following condition is met. All the test case passes. There is no attachment which got produced in the test run. The option to preserve the test results directory is turned off (default is off). This…

2

How to enable MSTest logs

Here are the steps which you should perform to enable mstest logs. 1. Go to your mstest installation directory via an administrator command prompt. (typically the installation directory is something like C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\). 2. Open the mstest configuration file (mstest.exe.config) and add a snippet similar to the one shown below under the…

3

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

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

BuildShadowTask fails with error C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0TeamTestMicrosoft.TeamTest.targets (14): Object reference not set to an instance of an object.

I have seen customers running into this problem once in a while where they mention that their build is failing intermittently with the following error. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets (14): Object reference not set to an instance of an object. Here is what I typically suggest to those customers. This error is observed during the compilation…

1