Microsoft Visual Studio 2015:测试资源管理器不显示任何测试 [英] Microsoft Visual Studio 2015: Test Explorer not displaying any Test

查看:360
本文介绍了Microsoft Visual Studio 2015:测试资源管理器不显示任何测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一点背景知识,我正在通过Parallels软件在MacBook上运行Microsoft Visual Studio.

我对Visual Studio来说还比较陌生,刚开始涉足该软件的单元测试方面,但是在将测试填充到测试资源管理器"中时遇到了问题.我看过其他论坛,并尝试了一些他们推荐的方法, 但仍然没有运气能显示测试结果.以下是我已经尝试过的事情的列表.

1.测试>测试设置>默认处理器架构>将此设置为"X64"

2.我已经彻底清除了%Temp%文件夹

3.扩展和更新>下载了NUnit 3测试适配器

构建解决方案时,我得到以下输出.

------发现测试开始------

无法加载文件或程序集'file://\\ mac \ home \ documents \ visual studio 2015 \ Projects \ TestApp \ UnitTestApp \ bin \ Debug \ UnitTestApp.dll'或其依赖项之一.不支持该操作. (来自HRESULT的异常:0x80131515)

NUnit Adapter 3.5.0.0:测试发现开始

错误:无法获得该程序集的运行程序.检查安装,包括所有扩展.

RemotingException:找到了两个与同一URI关联的不同对象,即"/207acd03_d96c_4a37_86d1_2fa2dc072094/TestAgency".

测试发现程序"NUnit3TestDiscoverer"正在加载测试时发生异常.例外:找到了两个与同一URI关联的不同对象,即"/207acd03_d96c_4a37_86d1_2fa2dc072094/TestAgency".

===========发现测试已完成:找到0(0:00:00.093)=======

任何帮助将不胜感激!

解决方案

嗨Mindless_EE,

您是在Visual Studio中创建通用的单元测试还是NUnit测试?

如果是通用单元测试,请将解决方案平台设置为Any CPU或x86.如果设置为x64,则测试方法将在测试资源管理器"中丢失.

如果使用NUnit Test,请确保您创建了哪个版本的NUnit Test项目?如果您使用的是NUnit 1.3版,请安装NUnit测试适配器.如果您使用的是NUnit 3,请安装NUnit 3测试适配器.请参考:

最好的问候,
Weiwei


So a little bit of a background, I am running Microsoft Visual Studio on my MacBook through the software Parallels.

I'm relatively new to Visual Studio and just starting getting into the Unit Testing aspect of this software but I am having issues getting my tests to populate in the Test explorer. I have looked some other forums and have tried a couple of things they recommended, but am still having no luck getting the tests to show up. Below is a list of the things I've already tried.

1. Test > Test Settings > Default Processor Architecture > Set this to "X64"

2. I've cleared out completely the %Temp% folder 

3. Extensions and Updates > Downloaded NUnit 3 Test Adapter 

When I build my solution I get the following output. 

------ Discover test started ------

Could not load file or assembly 'file://\\mac\home\documents\visual studio 2015\Projects\TestApp\UnitTestApp\bin\Debug\UnitTestApp.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

NUnit Adapter 3.5.0.0: Test discovery starting

Error: Unable to get runner for this assembly. Check installation, including any extensions.

RemotingException: Found two different objects associated with the same URI, '/207acd03_d96c_4a37_86d1_2fa2dc072094/TestAgency'.

An exception occurred while test discoverer 'NUnit3TestDiscoverer' was loading tests. Exception: Found two different objects associated with the same URI, '/207acd03_d96c_4a37_86d1_2fa2dc072094/TestAgency'.

========== Discover test finished: 0 found (0:00:00.093) =======

Any help would be appreciated!

解决方案

Hi Mindless_EE,

Do you create a common Unit Test or NUnit Test in Visual Studio?

If common Unit Test, please set the Solution Platform as Any CPU or x86. If you set as x64, the test methods will miss in Test Explorer.

If NUnit Test, please make sure which version NUnit Test project do you create? If you are using NUnit version 1.3, please install the NUnit Test Adapter. If you are using NUnit 3, please install the NUnit 3 Test Adapter. Please refer to:

Best Regards,
Weiwei


这篇关于Microsoft Visual Studio 2015:测试资源管理器不显示任何测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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