Mutation testing

Mutation testing is a way of judging the quality of your tests, just as tests are a way of judging the quality of your code.  Usually, the tests that mutation testing works with are automated unit tests.  In theory it could apply to manual and/or higher-level tests like integration or system tests, but I hope … Continue reading Mutation testing

Named parameters with default values can help unit tests

Introduction I find myself using default values much more in unit tests than in production code.  That is, I do it more often, and use more parameters with defaults per method.  This isn't because default values are bad, but they are often particularly useful when setting data up for unit tests.  It makes the tests … Continue reading Named parameters with default values can help unit tests

Practical considerations with tSQLt tests

This is the third article in a series on tSQLt: Introduction Anatomy of a test Practical considerations Dealing with transactions Getting organised One stored procedure under test is likely to need several stored procedures to test it properly.  This means that the number of stored procedures in your database will increase greatly.  (This is one … Continue reading Practical considerations with tSQLt tests