在虚拟机上运行自动化测试时获取LoaderException [英] Getting LoaderException while running an automated test on a virtual machine

查看:71
本文介绍了在虚拟机上运行自动化测试时获取LoaderException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我已使用VS 2015创建了一个编码UI测试项目,该项目应在虚拟机上运行.

I have made a Coded UI Test-project with VS 2015, which shall run on a virtual machine.

在VM VS 2013和2015上均已安装.

On the VM VS 2013 as well as 2015 are installed.

当我在VM上根据vstest.console.exe测试它时,测试工作正常.

When i test it per vstest.console.exe on the VM, the tests are working fine.

但是当我将装有VS 2013或2015的PC连接到团队项目(在GIT中)并启动团队项目构建时,我收到以下错误:

But when i connect on my PC with VS 2013 or 2015 to the team project (it is in GIT) and start the team project-build i receive the following error:

"组件测试适配器已释放以下异常:无法加载Assembly中的至少一种类型.如果需要更多信息,请取消LoaderExceptions质量."

"The component test adaptor has released the following exception: At least one type in the Assembly cannot be loaded. Call away the LoaderExceptions quality if you need further information."

当我查看VM上的事件协议时,会看到以下错误消息:

When i take a look to the event protocols on the VM i see the following error message:

事件ID为"0"的描述.从春季"VSTTExecution"开始没有找到.或者安装了不在本地计算机上释放此事件的组件,或者安装已损坏.他们可以将组件安装在 本地计算机或维修.
如果出现了另一台计算机上的事件,则必须存储该事件的公告信息.
以下信息与事件一起存储:
(QTAgent32_40.exe,PID 3732,线程14)单元测试适配器引发异常:系统.反射. ReflectionTypeLoadException:无法加载程序集中的至少一种类型.如果需要更多信息,请取消LoaderExceptions质量.
  与系统.反射.运行时模块. GetTypes(运行时模块模块)
  与系统.反射.运行时模块. GetTypes()
  与系统.反射.集会. GetTypes()
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestExecuter. GetAssemblyInfo(组装程序集)
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestExecuter. GetTypeInfo(类型类型,布尔值checkAlreadyExaminedType)
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestExecuter. GetTypeInfo(类型类型)
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestExecuter. ResolveMethods()
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestExecuter.初始化(UnitTestResult结果,UnitTestRunner运行器,ConsoleOutputRedirector重定向器)
  在Microsoft中.视觉工作室.测试工具. TestTypes.单元. UnitTestRunner.运行(UnitTestElement测试,ITestContext testContext,布尔值isLoadTest,布尔值useMultipleCpus)
公告资源存在,但在签名结果和公告表中找不到公告

The description for the event-ID "0" from the spring "VSTTExecution" was not found. Either the component which releases this event not on the local computer is installed, or the installation is damaged. They can instal the component on the local computer or repair.
If the event on another computer has appeared, the announcement information with the event had to be stored.
The following information was stored with the event:
(QTAgent32_40.exe, PID 3732, Thread 14) Unit test adaptor threw exception: System. Reflection. ReflectionTypeLoadException: At least one type in the Assembly cannot be loaded. Call away the LoaderExceptions quality if you need further information.
   with system. Reflection. Run time modules. GetTypes (run time modules modules)
   with system. Reflection. Run time modules. GetTypes ()
   with system. Reflection. Assembly. GetTypes ()
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestExecuter. GetAssemblyInfo (Assembly assembly)
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestExecuter. GetTypeInfo (Type type, Boolean checkAlreadyExaminedType)
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestExecuter. GetTypeInfo (Type type)
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestExecuter. ResolveMethods ()
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestExecuter. Initialize (UnitTestResult result, UnitTestRunner runner, ConsoleOutputRedirector redirector)
   in Microsoft. VisualStudio. Test tools. TestTypes. Unit. UnitTestRunner. Run (UnitTestElement test, ITestContext testContext, Boolean isLoadTest, Boolean useMultipleCpus)
The announcement resource exists, but the announcement was not found in the sign result and announcement table

我如何找出出了什么问题?

How can i find out, what has gone wrong?

预先感谢

帕特里克

推荐答案

嗨帕特里克,

您的TFS是什么版本?

>>当我在VM上根据vstest.console.exe测试它时,测试工作正常

您是否通过TFS构建对构建的文件进行了测试? (Drop文件夹中的dll文件)

注意

Starain


这篇关于在虚拟机上运行自动化测试时获取LoaderException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆