设置Visual Studio项目以进行nUnit测试的最佳实践 [英] Best practices for setting up a Visual Studio project for nUnit tests
问题描述
人们如何为Visual Studio设置项目,以及如何引用可测试的应用程序?
How do people set up their projects for Visual Studio and how do you reference the testable application ?
现在,我在解决方案中添加了一个创建.dll的单独项目,其中包含所有测试用例并引用了nunit.framework,它还引用了Debug/文件夹中的主.exe文件,在该文件夹中VS生成了.exe文件.输出.
Right now I've added a separate project creating a .dll to my solution which contains all the test cases and references nunit.framework , and it also references the main .exe file right from the Debug/ folder where VS generates the output.
但是我不知道这是否是一个好主意-或最佳实践是什么,任何人都想分享他们的实践吗?
But I've no idea if that's a good idea - or what the best practices are, anyone want to share their practices ?
推荐答案
对我来说听起来不错-您可以在没有测试程序集和NUnit的情况下分发或部署应用程序,但是仍然可以测试所有内容.几乎是标准做法.
That sounds pretty good to me - you can distribute or deploy your application without the test assembly and NUnit, but still test everything. Pretty much standard practice.
这篇关于设置Visual Studio项目以进行nUnit测试的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!