ReSharper no longer runs unit tests

I'm trying to write some unit tests for an application I'm working on at work (in the vague hope that others can follow this example), and I initially ran these tests using NUnit and the ReSharper plugin.

However, ReSharper will no longer run tests for me for some reason: it just crosses them with a red strike out.

There is no error code that I'm afraid of, and no mention of this behavior on the JetBrains website.

Has anyone else experienced a similar benhaviour?

Cheers, Ed

EDIT

Test example, just to show that I'm not just wrong:

using NUnit.Framework; /// <summary> /// Test /// </summary> [TestFixture] public class Test { [Test] public void TestOne() { Assert.IsTrue(true); } } 

In this example, not much to go wrong: D

+7
c # unit-testing resharper
source share
2 answers

Most likely you accidentally deleted the attributes [TestFixture], [Test], made the testing methods private or a closed testing class.

Please post an example code if this is not the case (entire class, including class declaration)

+1
source share

I recently had a similar problem. The reason was that some configuration files that some of the required tests were not copied to the appropriate bin directory. At some point, the "copy if new / copy always" property in the file received a reset. I have the same lack of feedback that you see, and could not solve the problem until I updated resharper from 4.5 to 5. Then he started giving me an error message regarding one of the files.

Since you're already using v5, this probably won't help you!

0
source share

All Articles