나는 nUnit 테스트를 수행하고 VS 2012에서 2015로 프로젝트를 업그레이드했습니다. 이제 단위 테스트 디버깅시 디버거가 잘못된 함수를 단계별로 수행합니다. 테스트는 계속되지만 디버깅은 작동하지 않습니다.Visual Studio 2015 단위 테스트 디버거가 잘못된 함수로 단계별로 열립니다.
디버거가 .ReturnString 및 .ReturnInt에 모두 들어가면 getAnInt = newClass.ReturnInt()로 들어가서 전혀 처리하지 못합니다. getAstring = newClass.ReturnString() . 둘 다 값을 반환하지 않습니다. 첫 번째 호출시 두 함수를 모두 실행하는 이유는 무엇입니까? 아래 코드에는 분명히 병렬 처리가 없습니다. nUnit에서 디버깅 할 때 올바른 기능을 수행하고 Resharper 또는 Nunit Test Adapter에서 디버거가 작동하지 않으면 디버거가 값을 반환합니다.
Imports NUnit.Framework
<TestFixture()>
Public Class Class1
<Test()>
Public Sub Test_Across_DateRanges()
Dim newClass As New MyNewClass
Dim getAnInt = newClass.ReturnInt()
Dim getAString = newClass.ReturnString()
Assert.That(getAnInt = 5)
Assert.That(getAString = "Why is this breakpoint being hit?")
End Sub
End Class
Public Class MyNewClass
Public Function ReturnInt() As Integer
Return 5
End Function
Public Function ReturnString() As String
Return "Why is this breakpoint being hit?"
End Function
End Class
아니요 resharper 아니오 nunit 실제로 "디버그"아무것도; 그것은 Visual Studio의 디버거입니다. –