自定义测试类型-测试执行时抛出FileNotFoundException [英] Custom Test Type - FileNotFoundException thrown on test execution

查看:59
本文介绍了自定义测试类型-测试执行时抛出FileNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了自定义测试类型,并将其部署在我的计算机上.测试类型从dll文件加载测试.当我用相关测试加载项目时,我的测试将显示在Visual Studio的测试视图中.

I have implemented a custom test type and deployed it on my machine. The test type loads tests from dll files. When I load a project with relevant tests my tests are displayed in visual studio's test view.

当我尝试执行测试时,它们以未执行状态失败.

When I try to execute the tests they fail with a not executed status.

在调试期间,我看到测试失败的原因是因为我收到了一个TargetInvocationException以及一个FileNotFoundException的InnerException,告诉我QTAgent32.exe找不到我的测试dll.

During debuggin I see that the reason the tests are failing is since I get a TargetInvocationException with an InnerException of FileNotFoundException that tells me that QTAgent32.exe cannot find my test dll.

ikasovitch

ikasovitch

推荐答案

QTAgent32.exe.config文件(与QTAgent32.exe位于同一文件夹中)具有以下条目,您可以在其中添加自己的路径:

The QTAgent32.exe.config file (in the same folder than QTAgent32.exe) has the following entry where you can add your own paths:

<探测privatePath =" PrivateAssemblies; PublicAssemblies; (...)

<probing privatePath="PrivateAssemblies;PublicAssemblies; (...) "/>

我不确定这是否是最好的方法,但我认为它应该可行.

I am not sure if this is the best approach, but I think it should work.


这篇关于自定义测试类型-测试执行时抛出FileNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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