MVC .NET如何添加单元测试项目在现有源$ C ​​$ C? [英] MVC .NET How to add unit test project in for existing source code?

查看:248
本文介绍了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屋!

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