简体   繁体   English

使用Visual Studio 2010的SqlServerUnitTest

[英]SqlServerUnitTest with visual studio 2010

I have a database that created with sqlserver 2008, I want create unit test for it in vs2010 but when I create a sqlserver 2008 project and i am connected to my database and database is loaded,then I am clicking on stored procedure to create unit test but this option is in active. 我有一个用sqlserver 2008创建的数据库,我想在vs2010中为其创建单元测试,但是当我创建一个sqlserver 2008项目并连接到数据库并加载数据库时,然后单击存储过程以创建单元测试但是此选项处于活动状态。 I have understood that warning in stored procedure is caused it. 我了解到存储过程中的警告是由它引起的。 but my project is big and I don't know how I can build and deploy it without error. 但是我的项目很大,我不知道如何正确地构建和部署它。

The perfect walkthru how to do that is here 完美的步行方式就在这里

BUT

this task can be made much simpler: 这个任务可以变得更加简单:

You can set up a folder with the test scripts and after it create a simple test unit to run these scripts one by one, faulting the unit test in case an error with exception, containing name of script ran and original error from sql server engine. 您可以设置一个包含测试脚本的文件夹,然后创建一个简单的测试单元以逐个运行这些脚本,以防万一出现异常(包含脚本名称和sql server引擎的原始错误)而导致单元测试出错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM