如何调试测试,.NET [英] how to debug tests in .net

查看:149
本文介绍了如何调试测试,.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想调试我的测试,以检查每一个测试,看看到底是哪里出现故障。我用$ C $暗恋这是真棒的工具,但我的试用期1个月是过期的。

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.

推荐答案

正如马克说,如果你找到一个工具,真正有用的,买它。我个人使用ReSharper的运行我的测试,但是这是一个个人的选择。

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.

我的的使用 NCrunch ,这是免费的(和美好)。我相信你可以利用它来进行调试了。

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

不过,你可以用NUnit的GUI调试 - 只需调试器附加到这个过程中,设置断点并运行测试

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...

这篇关于如何调试测试,.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆