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.
- Enable tracing in the MTM, you can follow the below blog:
You may see error in the MTM log as below:
Error creating test case results for the new run:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. —> System.Web.Services.Protocols.SoapException: The underlying connection was
closed: Could not establish trust relationship for the SSL/TLS secure channel.
— End of inner
exception stack trace —
response, Stream responseStream, WebException webException, XmlReader&
request, XmlWriter requestXml, String methodName, HttpWebResponse&
results, 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