Visual Studio 2013 Test Explorer StackTrace for failed unit test shows "no source" instead of a link to a failed string

I created a simple unit test in a C # project:

[TestMethod] public void DoSomething() { // Act // assert Assert.Fail("blah"); } 

When I ran this, Test Explorer does not reference the line that failed (Assert) and does not display the line number. Instead, if I hang over a line, it shows "no source."

  Test Name: DoSomething Test FullName: BlahBlah.DoSomething Test Source: c:\Src\BlahBlahTest.cs : line 223 Test Outcome: Failed Test Duration: 0:00:04.1933182 Result Message: Assert.Fail failed. blah Result StackTrace: at BlahBlahTest.DoSomething() 

I deleted the .suo file and the test was configured to fully debug. I also have Resharper installed, and its test runner also does not reference the failed string.

Does anyone know how to fix this?

+5
source share

Source: https://habr.com/ru/post/1236200/


All Articles