ScottStonehouse
ScottStonehouse

Reputation: 24965

SQL Server - testing the database

What tools are people using for testing SQL Server databases?

By this I mean all parts of the database:

Most likely, there is not one tool to do it all.

Upvotes: 3

Views: 622

Answers (2)

Craig
Craig

Reputation: 12012

How do you mean "Test the database"?

If you are testing foreign keys, a simply script to insert invalid data is all you should need.

Testing a database could imply a great number of issues. Does it have all the tables? Are the tables correct? Are the indexes in place? Did the latest updates get applied? Has the data been migrated? Is the even valid? Are the foreign keys correct?

There is a lot to test in a database so you are unlikely to find a simple way to test it. I find that a combination of test stored procedures and some Nunit unit tests do most of the vetting of my databases.

Upvotes: 1

Sean Chambers
Sean Chambers

Reputation: 8680

I personally use NHibernate with SqlCe, this provides a "throw-away" database that doesn't need any specialized tear down after the tests are run.

It also provides a good way to test your nhibernate mappings if applicable.

Here is a link to an article I wrote awhile ago on how to accomplish this: http://www.codeproject.com/KB/database/TDD_and_SqlCE.aspx?display=Print

Upvotes: 0

Related Questions