Create Unit Test in VS2010 for SQL Server 2008 Stored Procedure
How do I create a unit test for my stored procedures?
I’m using VS2010 connected to a TFS2008 server, and a SQL Server 2008 database server. In VS2010 I created a new project using the SQL Server 2008 Wizard template, 开发者_StackOverflow中文版and imported all of the tables & stored procedures from my database server. In the Schema View I right click on the stored procedure, and the Create Unit Tests option is disabled. Is there something else I need to do to enable unit tests for stored procedures?
Thanks, John.
Does your stored procedure specify [Database].[Schema].[Object]? If so, try using just [Schema].[Object]. Check out Step 5 of the following article: http://blogs.msdn.com/b/atverma/archive/2010/07/28/how-to-unit-test-sql-server-2008-database-using-visual-studio-2010.aspx
精彩评论