NUnit Addins with Resharper 5

泪湿孤枕 提交于 2019-12-08 16:55:15

问题


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?


回答1:


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.




回答2:


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:

http://i.imgur.com/2qT0y2U.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



来源:https://stackoverflow.com/questions/3036995/nunit-addins-with-resharper-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!