Solved

MS SQL 2012: Unit Test for Database/Stored Procedures

Posted on 2013-01-14
3
708 Views
Last Modified: 2013-01-21
Hi!

I'm looking for some tips (best practice) how to unit test stored procedures in MS SQL 2012?

I found TSQLUnit and tSQLt, but is there any other or better ways to unit test a database.
0
Comment
Question by:ulf-jzl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 250 total points
ID: 38776740
redgate stuff is expensive but awesome
http://www.red-gate.com/products/sql-development/sql-test/
0
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 250 total points
ID: 38783510
There's also an integrated Visual Studio option if you have the Data Tools installed:

http://blogs.msdn.com/b/ssdt/archive/2013/01/03/new-blog-post.aspx

The Red Gate products are generally top-notch - though expensive, they're awesome. In particular, it looks like the SQL Test product is actually a wrapper for tSQLt, using the APIs from that framework to execute the tests designed and managed in the Red Gate product.

I'm not sure what your situation is (if you're doing personal projects or working with a company), but I suspect the $300 price tag to pick up SQL Test is money well spent - if you're a developer making $75K, $300 is a single day's pay.
0
 

Author Closing Comment

by:ulf-jzl
ID: 38804267
Thx guys!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question