Debug Unit Test seems to run the program two times

It seems that the Unittest runs the program first time in state "Pending" without any brakepoints and then a second time in state "Running" with brakepoints.

For testing I used the Windows Sleep Function directly as first statement in main(). The time the time of state "Pending" corresponds to the adjusted time in Sleep().

 

Best regards

Kevin Haybach

3 comments
Comment actions Permalink

ReSharper runs the test binary twice, the first time to discover the tests and the second time to run/debug the tests.

0
Comment actions Permalink

Thx for the information but I have a big problem if the code is faulty. I have no possibility to debug.

For example the state for following faulty code is just "Inconclusive: Test not run" but I can't debug neither do I get an error message

 

0
Comment actions Permalink

Yes, this is unfortunate. You can use Visual Studio's "Start Debugging" to resolve this.

0

Please sign in to leave a comment.