开发者

How to set a breakpoint in a Nunit test and step through with Visual WebDeveloper 2008?

开发者 https://www.devze.com 2023-01-02 18:22 出处:网络
I have written a NUnit test in Visual Web Developer 2008 Express. But when I run the test, it doesn\'t pause at the breakpoint I had set. It just keeps on running but at the breakpoint, I need a step-

I have written a NUnit test in Visual Web Developer 2008 Express. But when I run the test, it doesn't pause at the breakpoint I had set. It just keeps on running but at the breakpoint, I need a step-by-step view on the test.

Could anyone please tell me how I can use breakpoints with NUnit?

开发者_StackOverflow中文版

Thanks in advance!


This is how you do it... - http://codebetter.com/blogs/paul.laudeman/archive/2004/03/18/NUnit-Tip_3A00_-Debugging-your-unit-tests.aspx

However I'm not sure if Express editions of VS support 'start external program' for debugging / 'attaching to a process'. In which case, you may need to upgrade to be able to debug.


This is easily done with VS C# Express - have a look at:

http://www.dotnet-developer.de/2009/10/aspnet2005/how-to-use-nunit-with-visual-studio-express-2008/

However I don't know if this will apply to Web Developer.


I assume you are running NUnit from outside Visual Studio, since the Express versions do not support Plugins. I don't think you can debug NUnit tests that way. If you had a non-Express version you could use the testdriven.net-plugin for debugging. Maybe if you set the NUnit runner as program to execute on debugging with you assembly as command line parameter...

0

精彩评论

暂无评论...
验证码 换一张
取 消