How to program against Release Management?

Recently one of the release management customers wanted to know how they can use the release management APIs to do the following: – Create a user. Create a standard environment/machine. Create a pick list. Create a release path. Create a release definition with a DSC action. Run a release from a release definition. (Update 1/8/2015)…

3

Publish test runs against lab default templates

Last week one of the internal customer mentioned that he has customized the lab default template in such a way that instead of running the test cases on the lab machines using our built-in flow of test controller/agent, it was launching mstest.exe directly on the lab machines from the build controller/agent. The tests were executing…

0

How to mark an environment in use?

MTM provides a nice Ux to mark the environments in use but one of our customer wanted to do that programmatically. Here is the script for it with execution steps: – Login to a machine with tfs object model installed. (The tfs object model gets installed with VS, MTM, Tfs, test controller etc) Open notepad,…

0

How to create standard environment programmatically?

MTM provides a good UI flow to create the standard environments but one of the external customer wanted to create such environments programmatically. Here is the script to do that and the steps you should perform to run this script. Login to a machine with tfs object model installed. (The tfs object model gets installed…

4

How to find the list of registered test controllers programmatically?

MTM shows you the list of registered test controllers in one of its page (Lab center –> Test controllers) where it shows the names of the test controller but in case you want to find the same information or want to find out other properties of the test controller, you can use the following script….

0

How to query all the environments in a project collection?

MTM provides ability to see all the environments within a team project but there is no view in which you can see all the environments across all the projects. Recently one of our customer mentioned that they want to find out this list programmatically. So in this blog, I am sharing how to do that…

1

How to enable lab management logs at the server side?

Here are the steps you should follow to enable lab management logs at the server side. Run query on configuration database (typically Tfs_Configuration) DECLARE @Id UNIQUEIDENTIFIER = NEWID() EXEC prc_CreateTrace @traceId = @Id , @area=’LabManagement’, @level=4 Start the ETW trace listener on the AT machine logman -ets start TraceSession -p "Microsoft-Team Foundation Server" <repro issue>…

0

SCVMM machines are owned by tfs users

Last week one of the customer wanted to co-relate the owners of the virtual machines created on SCVMM with the one shown in MTM. I was not aware that you can do it but one of the team member educated that we do ensure that the owner of the machine on SCVMM remains the user…

0

How to add/query tags on lab environment machines?

MTM provides the ability to add/view tags on lab environment machines which helps in associating interesting information with the machine. You can add that using the following Ux in MTM. One of the internal customer asked me that he wants to query these tags programmatically. Here are the steps that you should follow to query…

0

How to find all the automated test runs that happened on a lab environment?

MTM toolset provides ability to execute automated test runs on lab environments and today one of the internal customer asked me how he can programmatically find out all the automated test runs that happened on a lab environment. In this blog, I am sharing how to do that programmatically. Login to a machine with tfs…

0