MVC .NET如何添加单元测试项目在现有源$ C $ C? [英] MVC .NET How to add unit test project in for existing source code?
本文介绍了MVC .NET如何添加单元测试项目在现有源$ C $ C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建MVC项目(VS2008 .NET 3.5)
在第一次VS2008问我
你想创建单位文本项目此应用程序?
我选择不..
I've already created MVC project (VS2008 .NET 3.5) at first time VS2008 ask me "Would you like to create Unit text project for this application ?" I choose No..
现在我认识到,它的增长更复杂,测试驱动开发是更好的。
Now I realize that it's growing more complex and test driven development is better.
但不能findout如何在我的解决方案添加一个单元测试项目?
but can't findout how to add a unit test project in my solution?
推荐答案
也许这将帮助你。
如下面的过程所述,您可以创建多种方式测试项目:
As described in the following procedures, you can create test projects in several ways:
- 创建一个测试项目,当你添加
测试。当你创建一个新的测试,你
可以创建一个新的测试项目为
该测试将被添加,或加
测试到现有的测试项目
已加载。 - 创建一个测试项目,当你
生成单元测试。的当
生成单元测试,您可以创建一个
新的测试项目到其中的测试
将被添加,或将其添加到
现有的测试项目。 - 使用添加新项目对话框。
通过这种方法,您可以使用一个对话框
框选择编程
测试项目的语言。
- Create a test project when you add a test. When you create a new test, you can create new a test project into which the test will be added, or add the test to an existing test project that is already loaded.
- Create a test project when you generate a unit test. When you generate unit tests, you can create a new test project into which the tests will be added, or add them to an existing test project.
- Using the Add New Project dialog box. With this method, you use a dialog box to choose the programming language of your test project.
这篇关于MVC .NET如何添加单元测试项目在现有源$ C $ C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文