a·gen·tic a·gil·i·ty

Connect a Test Controller to Team Foundation Service

TL;DR; Explains how to install and configure a Test Controller to connect with Team Foundation Service for automated deployment and testing in cloud-based environments.

Published on
3 minute read
Image
https://nkdagility.com/resources/D5NhnVpHAwD
Subscribe

Did you know that you can connect a Test Controller to Team Foundation Service? And if you can do that, can you create standard environments for automated deployment and testing against the cloud?

I did not realise that this was supported and I only stumbled across it as I was tinkering with my local Test Controller and saw my TF Service instance in the connection menu and wondered what would happen.

Connect a Test Controller to Team Foundation Service

Figure: Connect a Test Controller to Team Foundation Service

To get the Test Controller you need to get a hold of the Agents ISO from the download site and run the install.

Connect a Test Controller to Team Foundation Service

Figure: Run configuration to connect a Test Controller to Team Foundation Service

Once you have the agent installed you can then get on with the configuration. This is simple and the only surprise was that it worked.

Connect a Test Controller to Team Foundation Service

Figure: Configure to connect a Test Controller to Team Foundation Service

This is so simple it is ridicules. Just select your hosted Team Foundation Service environment from the ‘browse’ list. You will likely have to configure the additional account to talk to your local agents as the account that you use to connect to TFS does not have that permission.

Under the covers the controller will be detecting that it is TF Service which is why the “use different credentials to connect to Team Foundation Server” is disabled but that did confuse me for a while. That was until I remembered that the Build Controller automatically retrieves the Service Credentials from TF Service and this was likely doing the same. It is however not that obvious and as I am in a hotel on a hotel speed connection I battled with error messages for a while. But they were all in the tubes and not in the controller.

Connect a Test Controller to Team Foundation Service

Figure: TF400324 Team Foundation services are not available from server

This however is a red hearing as you can see from the log:

 1E, 2013/03/26, 19:22:10.502, Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: TF400324: Team Foundation services are not available from server https://mrhinsh.visualstudio.com/defaultcollection.
 2Technical information (for administrator):
 3  The underlying connection was closed: An unexpected error occurred on a receive. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
 4at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
 5at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
 6--- End of inner exception stack trace ---
 7at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
 8at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
 9at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
10at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
11at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
12at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
13at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
14at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
15--- End of inner exception stack trace ---
16at System.Net.HttpWebRequest.GetResponse()
17at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
18--- End of inner exception stack trace ---

Figure: TF400324 because The underlying connection was closed

Man I hate hotel connections and their flakiness.

However after a little perseverance and clicking at just the right time to get on the maintenance plunger cycle for the hotel WiFi and you are connected.

Connect a Test Controller to Team Foundation Service

Figure: Configured to connect a Test Controller to Team Foundation Service

Now that we are configured we can head over to Microsoft Test Manager, switch to the Lab Centre and configure an environment.

What did you do with your environments connected to TF Service?

Smart Classifications

Each classification [Concepts, Categories, & Tags] was assigned using AI-powered semantic analysis and scored across relevance, depth, and alignment. Final decisions? Still human. Always traceable. Hover to see how it applies.

Subscribe

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

New Signature Logo

New Signature

SuperControl Logo

SuperControl

Sage Logo

Sage

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Lockheed Martin Logo

Lockheed Martin

Kongsberg Maritime Logo

Kongsberg Maritime

Slicedbread Logo

Slicedbread

ProgramUtvikling Logo

ProgramUtvikling

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Capita Secure Information Solutions Ltd Logo

Capita Secure Information Solutions Ltd

Akaditi Logo

Akaditi

Graham & Brown Logo

Graham & Brown

Cognizant Microsoft Business Group (MBG) Logo

Cognizant Microsoft Business Group (MBG)

Alignment Healthcare Logo

Alignment Healthcare

Teleplan Logo

Teleplan

Epic Games Logo

Epic Games

Slaughter and May Logo

Slaughter and May

Microsoft Logo

Microsoft

Nottingham County Council Logo

Nottingham County Council

Royal Air Force Logo

Royal Air Force

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Ghana Police Service Logo

Ghana Police Service

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Jack Links Logo

Jack Links

Genus Breeding Ltd Logo

Genus Breeding Ltd

New Signature Logo

New Signature

Workday Logo

Workday

Freadom Logo

Freadom

Healthgrades Logo

Healthgrades