I've been working on migrating existing SQL Server database projects into
Visual Studio for Database Professional projects. Most of the existing databases
have imported without major problems, but there are a few that have warnings
about cross-database joins in old unit tests.
TSD3025: The following cross-database dependencies could
not be verified: ... Your database application might fail at runtime when
... is executed.
If you are tired of being warned about a known issue, Data Dude allows you to
suppress warnings, in the database project's build properties (Project ->
Properties -> Build tab -> Suppress Warnings).
Simply put the warning numbers you want to ignore in there (without "TSD" at
the front) and save. Separate numbers with a semi colon (" ; ").
For a complete list of the errors in Data Dude, see
I've been migrating unit tests to a new Visual Studio Database Professionals
project. So far there's been no problems (other than trying to find a naming
standard). This problem had me scratching my head for a few minutes today.
SELECT TOP 1
@ItemCode = ItemCode,
@PriceLevel = PriceLevel
EXEC dbo.GetItemPrice @ItemCode, @PriceLevel
Running the unit test was resulting in the error:
Error Message Test method PricingTests.StoredProcedures.dbo_GetItemPrice threw
exception: System.Data.SqlClient.SqlException: Procedure or Function 'GetItemPrice'
expects parameter '@PriceLevel', which was not supplied..
Debug Trace Execution test script...
Sql Error: 'Procedure or Function 'GetItemPrice' expects parameter '@PriceLevel',
which was not supplied.' (Severity 16, State 4).
Huh? I checked the SQL code twice. Yup, @PriceLevel is passed in as the
second parameter. What's up?
Remember to test the things that matter to customers/consumers of the app,
and things that other apps are dependant on. Make sure you react to test results
"otherwise it is entertainment"
James Bullock says.
The whitepaper includes details steps on creating your first unit test;
automatic test generation; the standard test conditions available; and even
delves briefly into the C#/VB.Net code used by the testing framework.
I highly recommend users of Database Professionals (Data Dude) read
The full product download on MSDN is a full image only, so 2.9 GB or so, if
you already own Visual Studio Team Suite, you can simply download the trial SKU
(which is only 20MB) and install this on top of your Team Suite instance. The
installer will detect that you have a full license instead of a trial license
and do the right thing.