Running database unit tests from the command-line

Since database unit tests are first-class test types in Team Test, you can take full advantage of the MSTest.exe command-line tool for running and automating the execution of your database unit tests.   First you need to get yourself into a command prompt with MSTest.exe in your path. The easiest way to do this is…

1

Link: Erich Gamma JUnit Unit Testing

Ed Burnette has a great post looking back on the successes of Erich Gamma. While I think of him most for his pivotal book on design patterns, he also made a large contribution with Kent Back on JUnit, one of the first real unit testing frameworks.  The post describes the revolution that took place, bringing…


What is the Inconclusive Test Condition?

Several people have asked me about what the Inconclusive Test Condition is and why we add it by default to database unit tests. I thought I’d take a moment to address this here on the blog.   If an Inconclusive Test Condition is added to a database unit test, the test will always fail with…

1

Automatic Test Script Generation

One of the powerful features of Team Edition for Database Professionals is its ability to automatically generate a stub SQL test script for stored procedures, functions, and triggers.   This feature allows you to right-click on an existing sproc, function, or trigger in your database project in Solution Explorer, select Create Unit Tests…, and automatically…

3

Database Unit Testing and Debugging

With Team Edition for Database Professionals, you can create database unit tests and debug the objects under tests. This is an important technique that is very useful for investigating failed database unit tests.   An important thing to remember here is that debugging the objects under test is enabled in Team Data, but you cannot…

1

Article: Developer.com – Test Driven Development

Developer.com has a great article on Test Driven Development. This methodology is gaining momentum and is as important for database professionals to master as it is for application developers.   http://www.developer.com/design/article.php/3622546   Take a look! Are you doing TDD with your database today? I’d love to hear about your experiences!   Sachin Rekhi

1

Trying out Team System

As you know, Team Edition for Database Professionals is part of the larger Visual Studio Team System. Much of the value of this toolset is only realized when you leverage the entire Team Suite.   Some of the tighter integration you get when you use the entire Team Suite with Team Foundation Server includes:  …


Checkin Policy for Database Unit Testing

Team Edition for Database Professionals, combined with Team Test and Team Foundation Server, provides a facility for allowing you to enforce a team-wide policy requiring that a set of tests are run and pass before every check-in. This is a practice that can be added to your team’s processes to ensure high quality of your…

5

Best Practice: Deploying Database Rename Refactorings

Team Edition for Database Professionals is targeted primarily at managing iterative changes for preproduction database development.   The primary use case for deploying rename refactorings is to your local sandbox server. The cleanest way to setup this sandbox server is to always drop and re-create the database at each deployment. Data can be regenerated for…

3

Link: Beck Testing Framework

For many database professionals, unit testing is a foreign concept. Many of you may have never heard of the xUnit family of test frameworks, including modern-day frameworks like NUnit and JUnit.   I thought I would link you back to an early article by the man who first developed the design of these frameworks, Kent…

1