Just had a problem with a TFS 2012 Lab Management deployment build. It was working this morning, deploying two web sites via MSDeploy and a DB via a DacPac, then running some CodedUI tests. However, when I tried a new deployment this afternoon it kept failing with the error:
The deployment task was aborted because there was a connection failure between the test controller and the test agent.
If you watched the build deployment via MTM you could see it start OK, then the agent went off line after a few seconds.
Turns out the solution was the old favourite, to reboot of the Build Controller. Would like to know why it was giving this intermittent problem though.