4

我正在尝试在 Lab Center 中创建一个新环境,但在验证步骤中出现以下错误

错误

文字版:

使用提供的用户名和密码验证机器是否可以访问。失败的

JPTest:Microsoft 测试管理器无法在这些机器上安装测试代理。可能的原因:

  • 计算机未运行或在网络上不可用。
  • 计算机上未启用文件和打印机共享例外。

我已(多次)验证文件和打印机共享例外已启用,并且该机器在网络上可用。提供的用户名和密码也是正确的。

奇怪的是,这一步在机器被添加到域之前工作(注意机器名称不是 JPTest,它实际上是由 windows 安装生成的名称)

我正在使用 Visual Studio 2012,并且机器处于 SCVMM 环境中。

我最大的问题是,除了这个非常模糊的错误消息之外,我找不到更多信息。我该如何诊断这个问题?

4

5 回答 5

6

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).

于 2013-10-08T12:48:07.140 回答
1

检查“机器”选项卡上的用户名密码。每次打开测试环境时
,它将被设置为运行MTM的机器的当前用户。

如果此用户不是您环境中所有计算机上的管理员组的成员,您将在验证期间收到此错误消息。

于 2013-10-08T06:55:33.780 回答
0

以管理员身份运行。我在 Microsoft 测试管理器 2013 中遇到了同样的问题,您只需以管理员身份运行它。至少对我有用!

于 2014-07-08T10:32:07.843 回答
0

我把它缩小到两件事。

如此处所述启用 MTM.exe.config 日志记录后,注意到在尝试验证新实验室环境后创建了 2 个文件:

在此处输入图像描述

  1. MTM_Trace.log 文件具有误导性内容:

由于 System.IO.FileNotFoundException 无法读取主文件:找不到文件“C:\Users\p738753d\AppData\Local\Microsoft\Team Foundation\4.0\TestManagement\9dbaf515-0cad-4d11-b34e-cd083e6628eb_Aum.xml”。

这个MSDN线程讨论了缺少这些临时文件,问题看起来像是由两个域之间的信任引起的。但是,我认为这是一个红鲱鱼,这些 (<GUID>_Aum.xml) 文件未创建的原因是在第二个 <GUID>MTMTrace.log 文件中看到的早期问题的症状

  1. <GUID>MTM_Trace.log 文件抱怨由于BadImageFormatException无法加载 VideoRecorderEngine dll :

无法加载文件“C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll”。跳过此文件的数据收集器扫描。错误:System.BadImageFormatException:无法加载文件或程序集 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll'或其依赖项之一。该模块应包含程序集清单。文件名:'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\DataCollectors\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll'

根据我的经验,DLL BadImageFormatException 加载问题往往是由 x86 和 x64 编译引起的。

无论如何,我怀疑环境需要有问题的 VideoRecorderEngine.dll 才能运行 UI 测试,所以我将其关闭: 在此处输入图像描述

然后验证成功:

在此处输入图像描述

我不确定是否需要将服务帐户添加到管理员组,但我做到了 - 谢谢 Elena!

最后,我禁用了 MTM.exe.config 的日志记录。

于 2017-05-12T02:46:38.273 回答
-1

尝试以管理员身份运行 MTM,并在添加机器时提供正确的计算机名称。为我工作..

于 2016-07-22T05:48:56.977 回答