【问题标题】:Remote execution of Coded UI Tests on a Windows XP VM在 Windows XP VM 上远程执行编码的 UI 测试
【发布时间】:2013-11-04 08:35:46
【问题描述】:

我有一个 Coded UI + SpecFlow 测试项目 (.NET Framework 4)。

我想执行远程测试执行,所以我配置了一个可视化测试代理 - 控制器环境设置。我的本地机器是控制器,有一个虚拟机是代理。 AUT 将在装有 Windows XP SP3 的 Windows 嵌入式系统上运行。 AUT 是一个 WPF 应用程序。

虚拟机属性:

代理-控制器通信已成功建立(代理 - 在线,正常;控制器 - 运行,正常;TestSettings.testsettings - 已配置,正常)。测试执行是使用 mstest 执行的。

执行测试时显示以下错误:

Test Name:  CodedUITestMethod1
Test FullName:  Remote.Test.CodedUITest1.CodedUITestMethod1
Test Source:    c:\Users\user\Documents\Visual Studio 2012\Projects\Remote.Test\Remote.Test\CodedUITest1.cs : line 27
Test Outcome:   Failed
Test Duration:  0:00:01.7131241

Result Message: Error calling Initialization method for test class Remote.Test.CodedUITest1: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
Result StackTrace:  
--- End of inner exception stack trace ---
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssembly(String assemblyFile)

根据定义,Coded UI 是 not support Windows XP。

上面提到的问题有解决方法吗?有什么建议吗?

谢谢,

【问题讨论】:

  • “不支持”链接显示 Visual Studio 2013 页面。 2012 页面也有类似的支持。检查支持 XP 的 2010 页面。有可能将某些 2010 DLL 或 2010 代理放到 VM 上以实现您想要的。对于 Coded UI 部分,使用带有较新版本 Windows 的 VM 可能更容易。
  • @AdrianHHH:感谢您的评论!该解决方案应该可以在构建服务器上重现(适当的依赖关系、最少的返工、没有黑客攻击),因此 .dll 操作/替换/覆盖不是我想要的。也不换工具。使用带有较新 Windows 的 VM 被排除在外(客户端),因为 AUT 将在 Windows XP 上运行,并且我必须使用具有与嵌入的真实最终用户相似(接近 exact)属性的 VM机器。

标签: automated-tests mstest ui-automation coded-ui-tests specflow


【解决方案1】:

Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.dllc:\Program Files\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages\ 的隔离解决了这个问题。已在远程 VM 上执行操作。

测试已启动并正在运行。

【讨论】:

  • 你能澄清一下你所说的“隔离”是什么意思吗?您是否完全删除了该组件?您是否从测试代码中删除了对该程序集的引用?我想测试这个确切的场景,并且可以使用您可以提供的任何指针!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-12-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多