Tag Archives: tsqlt

Refactoring Mistakes Are Why We Write Tests

I wrote a short piece the other day trying to show how one can use tSQLt to test code. It’s a simple test built against a user defined function. It works well and when the test is run, it passes. … Continue reading

Posted in Blog | Tagged , , , | Comments Off on Refactoring Mistakes Are Why We Write Tests

Why Test Table MetaData Tests with tSQLt

I wrote at SQLServerCentral about using tSQLt to check table metadata. In essence we are testing the API of our table. However, since the table could change, and may need to, what’s the value of having a test fail if … Continue reading

Posted in Blog | Tagged , , , | Comments Off on Why Test Table MetaData Tests with tSQLt

tSQLt with TRY..CATCH

Someone asked me the question recently about how tSQLt works with TRY..CATCH blocks and the exceptions that we might test for. It works fine, just as it would with other code, but you need to understand that a CATCH still … Continue reading

Posted in Blog | Tagged , , , | Comments Off on tSQLt with TRY..CATCH

tSQLt – SQLCop – Checking Naming Conventions

I’ve been using tSQLt a bit to do some testing and one of the things I’ve tested is standards for code. I’ve been using a framework on top of tSQLt called SQLCop. These are a series of tests written to … Continue reading

Posted in Blog | Tagged , , , , | Comments Off on tSQLt – SQLCop – Checking Naming Conventions