How to debug a failed test method in NCrunch

I am using NCrunch to run tests in my project and I have a validation method that looks like this:

Malfunctioning test method in NCrunch

Is there a way to debug this method, and if so, how?

Jon Skeet mentions in stackoverflow that you can โ€œattach a debugger to a processโ€, but I donโ€™t know how to do that - can someone tell me how to do this?

+3


source to share


1 answer


It's pretty simple. You can do one of several things:



  • Right-click on any of the red dots and select "Debug Coverage Tests in New Runtime" (this may result in multiple tests if more than 1 test covers that line, i.e. if you click on the dot in the source code below test and not the code in the actual test)
  • Right-click on the red '>' and select Debug Startup Tests in New Task Progress (this will only execute one test, but this starting point is only available in the actual test).
  • In windows tests (ctrl-shift-m) click on the test, then right click and select "Debug Selected Tests in a New Task Process"
  • In the tests window (ctrl-shift-m) click the test and select the error icon in the toolbar at the top.
+4


source







All Articles