NUnit 插件与 Resharper 5
最新的 Resharper (v5) 版本基于本机 NUnit 代码,并允许 NUnit 插件。
我有一个 NUnit 插件,可以在 NUnit GUI 中正常工作,但无法使其与 Resharper 一起工作。根据 R# 指示,我已将插件库放入 %ResharperPath%\Bin\addins
中,但我不起作用,我的测试被标记为 Ignored
。
问题:如何将 NUnit 插件与 ReSharper 一起使用?
The latest Resharper (v5) version is based on native NUnit code and allows NUnit addins.
I have a NUnit addin that works fine in NUnit GUI but I can not make it work with Resharper. Based on R# indication I have put my addins library in %ResharperPath%\Bin\addins
but I doesn't work, my tests are marked as Ignored
.
Question: How to use NUnit addins with ReSharper?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
现在 ReSharper 支持 NUnit 插件。试试这个链接:
http://blogs.sourceallies.com/2013/ 06/nunit-addins-that-works-with-resharper/
另外,您还需要更改 resharper 中的默认设置:
https://i.sstatic.net/80G3C.png
选项 ->工具->单元测试-> NUnit
加载 NUnit 插件 ->始终
将带有插件的 dll 复制到 C:\Users...\AppData\Local\JetBrains\Installations\ReSharperPlatformVs12\addins
另外,带有测试的 dll(不带有插件)不得包含 NUnit.AddinsDependency 包
Now ReSharper supports NUnit addins. Try this link:
http://blogs.sourceallies.com/2013/06/nunit-addins-that-works-with-resharper/
Also you need to change default settings in resharper:
https://i.sstatic.net/80G3C.png
Options -> Tools -> Unit Testing -> NUnit
Load NUnit Addins -> Always
and copy dll with Addin to C:\Users...\AppData\Local\JetBrains\Installations\ReSharperPlatformVs12\addins
Also your dll with tests (not with addin) must not contain NUnit.AddinsDependencies package
不幸的是,ReSharper 的测试运行器不支持 NUnit 插件。已请求,但尚未添加,甚至没有添加到即将推出的 ReSharper 6 中。 (请随意投票支持功能请求,让他们知道有兴趣 - 我刚刚这样做了。)
我们使用 NUnit 插件进行一些测试,而这些测试根本不会出现在 ReSharper 中 - 没有装订线图标,单元测试窗口中没有任何内容,什么也没有。当我们想要运行这些测试时,我们唯一的选择是启动 NUnit GUI。很痛苦。
Unfortunately, ReSharper's test runner doesn't support NUnit add-ins. It's been requested, but hasn't been added, not even to the forthcoming ReSharper 6. (Feel free to vote for the feature request to let them know there's interest -- I just did.)
We use an NUnit add-in for some of our tests, and those tests don't show up in ReSharper at all -- no gutter icons, nothing in the Unit Tests window, nothing. Our only option is, when we want to run those tests, to fire up the NUnit GUI. It's a pain.