“Microsoft Test Manager cannot install test agent

2019-05-07 11:26发布

I'm trying to create a new environment in Lab Center and I get the following error on the Verification step

Error

Text version:

Verify that the machines are accessible using the user name and password provided. Failed

JPTest: Microsoft Test Manager cannot install test agent on these machines. Possible causes:

  • Machines are not running or they are not available on the network.
  • The File and Printer Sharing exception is not enabled on the machines.

I've verified (many times) that the File and Printer Sharing exception is enabled, and that the machine is available on the network. Also the username and password provided is correct.

Curiously this step worked before the machine was added to the domain (note that the machines name is not JPTest, its actually a name generated by the windows installation)

I'm using Visual Studio 2012 and the machine is in a SCVMM environment.

My biggest problem is that I can't find any more information other than this very vague error message. How can I diagnose this problem?

5条回答
Emotional °昔
2楼-- · 2019-05-07 12:01

Run as administrator. I had the same issue in Microsoft Test Manager 2013, you just have to run it as administrator. Ate least worked for me!

查看更多
再贱就再见
3楼-- · 2019-05-07 12:11

The best way to diagnose the problem is to activate MTM logging.

There is some blogs describing this activation via mtm.exe.config file (that is located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE for Visual Studio 2012).
See this one for example: How to enable logs for MTM?
But this did not work for me for some reasons.

The only way I could activate MTM logging was via registry keys.
For Visual Studio 2012 create a file with the following content, rename it so that it has .reg extension and double click on it in Windows Explorer:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\EnterpriseTools\QualityTools\Diagnostics]
"EnableTracing"=dword:00000001 
"TraceLevel"=dword:00000004
"LogsDirectory"="C:\Temp"

Or just create these keys manually.

The EnableTracing variable controls whether tracing is ON (1) or OFF (0).
The TraceLevel variable is for level (granularity) of tracing:

  • 1 means Errors only
  • 2 is Errors and Warnings
  • 3 is Errors, Warnings and Information
  • 4 is All including Verbose Information

LogsDirectory is optional. If that is not specified, %TEMP% will be used.
Trace file name is <Process name>.EqtTrace.log, e.g. mtm.EqtTrace.log.

You should restart MTM after you've changed the registry.
And do not forget to deactivate logging once you solved the problem (set EnableTracing to 0).

查看更多
做个烂人
4楼-- · 2019-05-07 12:11

try running MTM as administrator, and Provide the correct computer name while adding the machine. Worked for me..

查看更多
Evening l夕情丶
5楼-- · 2019-05-07 12:13

I narrowed it down to two things.

After enabling MTM.exe.config logging as described here I noticed 2 files were created after trying to Verify the new Lab Environment:

enter image description here

  1. The MTM_Trace.log file had misleading content:

Cannot read primary file because of System.IO.FileNotFoundException: Could not find file 'C:\Users\p738753d\AppData\Local\Microsoft\Team Foundation\4.0\TestManagement\9dbaf515-0cad-4d11-b34e-cd083e6628eb_Aum.xml'.

This MSDN thread discusses missing these temporary files and the problem looks like its caused from a Trust between two domains. However, I believe this is a red-herring and the reason these (<GUID>_Aum.xml) files are not created is a symptom of an earlier problem seen in the second <GUID>MTMTrace.log file

  1. The <GUID>MTM_Trace.log file complains it cannot load the VideoRecorderEngine dll due to a BadImageFormatException:

Failed to load file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll'. Skipping data collector scan for this file. Error: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll'

In my experience DLL BadImageFormatException load problems tend to be caused by x86 and x64 compilation.

In any case, I suspected the problematic VideoRecorderEngine.dll was needed for the environment to run UI Tests, so I turned that off: enter image description here

Then the verification was successful:

enter image description here

I'm not sure if adding the service account to the Admin Group was needed but I did it - thanks Elena!

Finally I disabled the logging from the MTM.exe.config.

查看更多
The star\"
6楼-- · 2019-05-07 12:21

Check the User name and Password on the "Machines" tab.
It will be set to the current user of the machine where MTM is running each time you open a test environment.

If this user is not a member of Administrators group on all machines in your environment you will get this error message during verification.

查看更多
登录 后发表回答