If you have configured TFS 2010 in domain environment along with SSL configuration and trying to run your tests in MTM from a workgroup environment, you may get the error below:
The underlying connection was closed: could not establish trust relationship for the SSL\TLS secure channel
TFS is configured in domain environment with SSL configuration and trying to run the test from MTM in workgroup mode, you will be able to connect to TFS from MTM by providing the credentials, however, while running the test, you will get the error mentioned in the issue description above.
You may see error in the MTM log as below:
Error creating test case results for the new run: Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Web.Services.Protocols.SoapException: The underlying connection wasclosed: Could not establish trust relationship for the SSL/TLS secure channel.
--- End of innerexception stack trace ---
atMicrosoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ProcessHttpResponse(HttpWebResponseresponse, Stream responseStream, WebException webException, XmlReader&xmlResponseReader)
atMicrosoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ExecWebServiceRequest(HttpWebRequestrequest, XmlWriter requestXml, String methodName, HttpWebResponse&response)
atMicrosoft.TeamFoundation.TestManagement.Client.TestResultsService.CreateTestResults(TestCaseResultresults, String projectName)
CreateWebRequest() -- Uri: https://tfsservername.com/tfs/DefaultCollection/TestManagement/v1.0/TestResults.asmx
Note: you may see other errors as well related to authentication and file not found in the log files, those are not related to the current scenario.
Go to the TFS server and look at the server URL setting in the TFS admin console, if it is mentioned as http://localhost/tfs, change localhost to FQDN. After that you should be able to run the test.
Content developed by: Deepak Mittal Content reviewed by: Teodora Stanev