4

I just downloaded Resharper 2016.3 EAP 4 to check out the Unit test functionality with .NET Core. But when I run all unit tests, I get this error:

Cannot find element for dotnet test id: MvcMovieTests.SimpleTests.TestMethodPassing

Cannot find element for dotnet test id: MvcMovieTests.SimpleTests.TestMethodFailing

Here are my simple unit tests:

[TestClass]
public class SimpleTests
{
    [TestMethod]
    public void TestMethodPassing()
    {
        Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue(true);
    }

    [TestMethod]
    public void TestMethodFailing()
    {
        Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue(false);
    }
}

When I run all unit tests with the MSTEST Test Explorer, they run properly and I see the results. But with Resharper 2016.3 I get the two errors above showing up in the Unit Test Sessions window in Visual Studio 2015 Community.

Ray
  • 4,679
  • 10
  • 46
  • 92
  • 1
    Clearing up the ReSharper caches fixed it up for me. Open the Environment | General page of ReSharper options. Click Clear caches. More information here: https://www.jetbrains.com/help/resharper/2016.3/Configuring_Caches_Location.html – Gabriel Jan 30 '17 at 21:49
  • 1
    @Gabriel Clearing R# caches also fixed the problem for me. You should make that comment an answer. – Jules Dupont Sep 06 '18 at 16:19

1 Answers1

1

Clearing up the ReSharper caches fixed it up for me. Open the Environment | General page of ReSharper options. Click Clear caches. More information here.

Gabriel
  • 1,572
  • 1
  • 17
  • 26