Resharper not running new unit tests

心已入冬 提交于 2019-12-03 22:12:33

Try cleaning the solution and delete RS related files and folders from your project folder. It has worked for me. I use VS2008 though

It also helped me to make the unit test class public :D

Unit Test Methods must be public. The following test will not be recognized.

[Test]
void RunTest(){
    Assert.True;
}

Whereas this test is recognized:

[Test]
public void RunTest(){
    Assert.True;
}

Ran into this while using specflow. New project > nuget specflow then I added spec (nunit) tests. Then I received the error. Merely restarting my only running visual studio 2012 instance fixed the issue.

Deleting the _ReSharper folder and the Resharper CACHE file did not fix the issue for me.

I had this issue today where Resharper would not run the unit tests, and I fixed the problem by running 'Clean Solution and then Rebuilding the solution.

I've seen this issue. In my specific case, it was due to building my code to a network drive lacking Full Trust.

Although VS is happy to build and run from there - NUnit was not happy. Unhelpfully it doesn't display any reason for the failure (just those unexplained grey dots by the test names)

Just ran into this today using VS 12, NUnit and RS 8.2. There is a setting on the Unit Test Session console for Build Settings. Make sure it is set to Automatic NOT Automatic (Whole Solution).

I ran into the same issue. I am running VS2013 with ReSharper 8.2.3. Cleaning and rebuilding the solution did not resolve the error.

My test method was async but returned void. Returning a Task fixed the error.

Also make sure you actually have the [Test] annotation or [TestCase(...)] annotation on your method. If that is not there, then you definitely won't see the test in the list.

I got a similar issue fixed installing the NuGet NUNitTestAdapter.

I am using NUnit v.2.6.4 and the NUnitTestAdapter v2.1.1 did the trick.

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