how to debug tests in .net

情到浓时终转凉″ 提交于 2019-12-10 17:31:11

问题


I want to debug my tests, to examine every test to see where exactly is fail. I was using coderush which is awesome tool but my trial period 1month is expired.

Any suggestion is welcome.


回答1:


As Mark says, if you find a tool really useful, buy it. Personally I use ReSharper to run my tests, but that's a personal choice.

I also use NCrunch, which is free (and wonderful). I believe you can use that for debugging too.

However, you can debug with the NUnit GUI - just attach the debugger to the process, set breakpoints and run the tests.

However, I'd typically try not to require using the debugger to fix tests. When an assertion fails in a well-designed test, that usually gives enough information to fix the implementation, after a bit of thought. If it doesn't, that suggests it's a complicated scenario - which sometimes suggests adding more tests to handle each part of the scenario. But yes, occasionally you will need the debugger...



来源:https://stackoverflow.com/questions/11168496/how-to-debug-tests-in-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!