Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

All Blogs

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    Tags: sql test

    comments

    Approximately a year and a half ago, friends of mine and I created SQLCop. Our motivation was to provide a tool that users can download and run against their database. This tool is very effective at detecting common problems with database configurations and TSQL code. Not every issue highlighted by SQLCop requires a fix, but you are very likely to discover potential problems that you didn't even know you had.

    About a year ago, I met Dennis Lloyd, Jr. and Sebastian Meine at a presentation they were giving for tSQLt (a unit testing framework for SQL Server) that they were working on. I was intrigued because I had always wanted to write unit tests for my tSQL code but hadn’t been able to implement anything because of time constraints on my end. The tSQLt framework allowed me to forget about the mechanics of implementing and running the tests and allowed me to focus on writing the tests.

    Several weeks ago, I was approached by Justin Caldicott at Red Gate Software. He informed that they had recently released SQL Test which is a SSMS add-in that makes writing and executing tSQLt tests easier.

    Justin was interested in including SQLCop tests within SQL Test. I downloaded and installed SQLTest. I was surprised to see that it recognized all of the tests that I had written manually. I also like how easy it is to run tests and create new ones. This tool has already saved me time.

    I spent a relatively short amount of time re-writing a couple of the SQLCop tests to run within the tSQLt framework. At this point, there are several tests already written and included with SQL Test (Preview 2).

    If you haven't done so already, I encourage you to download and install SQLCop. I would be extremely surprised if you didn’t find something useful with it.

    I also encourage everyone to download and install SQL Test so that you can see for yourself how easy it is to run unit tests on your database.

    About the Author

    George has been developing software professionally for 19 years, first for the department of defense, and then for various other companies. In 1998, George started his software company, Orbit Software, specializing in School Bus Transportation software. His specialty is refining SQL Server queries to deliver optimal performance.
    Social SitingsTwitterLTD RSS Feed
    InstapaperVote on HN