You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于VS Enterprise 2015下Microsoft Test Manager无法连接测试代理的问询

Troubleshooting "Microsoft Environment Viewer could not connect to the machine" Error in MTM 2015

Hey Rajesh, let’s work through this frustrating connection issue with Microsoft Environment Viewer and your test agent. I’ve debugged similar problems with TFS 2013 and MTM in the past, so here are targeted checks and fixes to try out:

Quick Environment Recap

First, let’s confirm the setup we’re working with to stay aligned:

  • Windows 7 64-bit virtual machine
  • Visual Studio Enterprise 2015 + Microsoft Test Manager
  • Microsoft Test Controller 2013 (configured to your local TFS project collection)
  • Microsoft Test Agent 2013 Update 5 (running as interactive process, registered to controller, showing ready state)

1. Fix DCOM Permissions on the Test Agent Machine

Interactive test agents rely heavily on DCOM settings, and misconfigurations here are the #1 culprit for this error:

  • On the test agent VM, open the command prompt and run dcomcnfg.exe
  • Navigate to Component Services > Computers > My Computer > DCOM Config
  • Locate Microsoft Test Agent (or QTAgent.exe), right-click it and select Properties
  • Switch to the Security tab:
    • Under Launch and Activation Permissions, select Customize then click Edit
    • Make sure your test controller service account and your MTM user account have Local Launch and Local Activation permissions enabled
    • Repeat this check for Access Permissions and Configuration Permissions to grant the same accounts appropriate access
  • Restart the Microsoft Test Agent service after making these changes

2. Verify Firewall Rules on the Test Agent

Even though RDP works, the specific ports/programs MTM uses might be blocked:

  • Open Windows Firewall with Advanced Security on the test agent machine
  • Confirm the following inbound rules are enabled:
    • The pre-created Microsoft Test Agent rule (should be added during installation)
    • If the rule is missing, manually create one allowing inbound traffic for QTAgent.exe and QTAgentService.exe
    • Test connectivity to port 6901 (the default test agent communication port) from your MTM machine using telnet <agent-machine-ip> 6901 – if this fails, the port is blocked

3. Double-Check Test Agent Service Logon Settings

You noted the service is part of the Team TestAgentService group, but let’s confirm the logon account is correctly configured:

  • On the test agent VM, open Services (search for it in the Start menu)
  • Find Microsoft Test Agent, right-click > Properties > Log On tab
  • Ensure the account used:
    • Is a local administrator on the test agent machine (you mentioned this, but double-check no permissions were revoked)
    • Has access to your TFS project collection
  • Restart the service and confirm it starts without throwing errors

4. Refresh Your MTM Lab Environment Configuration

Stale or incorrect environment settings can also cause this issue:

  • In MTM, go to Lab Center > Environments
  • Right-click your problematic environment and select Properties
  • Verify the test agent machine’s name/IP is correct – try using the IP address instead of the hostname if DNS might be causing issues
  • Click Test Connection to get more specific error details (this often reveals issues the generic popup doesn’t)
  • If the test fails, try removing the machine from the environment and re-adding it

5. Confirm Version Compatibility

You’re using VS 2015 with Test Controller/Agent 2013 – while this is supported, minor version mismatches can cause glitches:

  • Ensure your Test Controller 2013 is updated to Update 5 (matching your test agent version)
  • Verify your TFS server version matches the test controller version (same major version ensures the best compatibility)

6. Dig Into Event Logs for Clues

The generic error popup rarely tells the whole story – check the event logs for detailed messages:

  • On the test agent machine, open Event Viewer > Windows Logs > Application
  • Look for errors from Microsoft Test Agent or QTAgent around the time you tried connecting
  • On the test controller machine, check the Application logs for errors related to test agent communication
  • These logs will often point you directly to the root cause (e.g., permission denied, port conflicts)

Most of these fixes resolve the "could not connect to machine" error in similar setups. Start with the DCOM permissions and firewall checks first, since those are the most common issues. If none of these work, share what the event logs show and we can dig deeper.

内容的提问来源于stack exchange,提问作者user3558233

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:35:45