使用Nunit工具进行单元测试

使用Nunit工具进行单元测试

问题描述:

hai,

我计划使用NUnit工具进行单元测试.如何在VS2010中实现它.作为测试工程师的观点,它对发现所有错误有效吗?

hai,

I have plan to use NUnit tool for unit testing.How can i implement it in VS2010.As a test engineer point of view, will it effective for finding all bugs ?

测试只能证明存在错误.没有测试可以证明没有错误.

NUnit在这里很有效,但是该工具的结果只能和测试代码一样好,没有更好;测试计划,测试用例和测试代码是您要做的,而不是工具.该工具仅是组织所有过程和自动运行测试的方法.不多也不少.

如何执行呢?奇怪的问题.通过使用文档和工具本身来学习该工具:
http://en.wikipedia.org/wiki/NUnit [ http://www.nunit.org/ [ ^ ].

该文档是全面的: http://www.nunit.org/index.php?p = docHome& r = 2.5.10 [ ^ ].

您不希望我将文档加倍吗? :-)
也许从入门"开始. :-)

也许只是一个主意:所有测试工件,测试文档以及所有测试代码都应该是项目本身的组成部分.项目是其已部署部分和所有其他部分的总和,已部署部分是较小的部分.要支持将编程作为人类活动进行支持",还需要进行其他所有操作.您的项目可以像维护一样成功,没有更好的选择.测试是其中不可或缺的一部分.所有工件都应集成在版本控制系统下的代码库中.虽然这是一个完全不同的故事...

祝你好运,
—SA
Testing can only prove that there is a bug. No testing can prove there is no bugs, ever.

NUnit is effective here, but the results of the tool can be only as good as testing code, no better; and the testing plan, test cases and testing code is something which you do, not the tool. The tool is only the way to organize it all and automate running of the tests. No more, no less.

How to implement it? Strange question. By learning the tool using documentation and the tool itself:
http://en.wikipedia.org/wiki/NUnit[^],
http://www.nunit.org/[^].

The documentation is comprehensive: http://www.nunit.org/index.php?p=docHome&r=2.5.10[^].

You don''t expect me to double the documentation, do you? :-)
Perhaps, start with "Getting started". :-)

Maybe, just one idea: all the testing artifacts, testing documentation, all the testing code should be the integral part of the project itself. Project is the sum of its deployed part and everything else, and deployed part is the smaller part. Everything else is needed to "support programming as human activity". Your project can be as successful as its maintenance, no better. The testing is the integral part of it. All the artifacts should be integrated in you code base under you Revision Control System. This is quite a different story though…

Good luck,
—SA