Tag Archives: tsqlt

Quick Tests for a Function

I was writing a poorly performing UDF the other day and then wanted to replace it with a better performing one. However, I wanted to be sure that the function was the acting the same externally. In other words, does … Continue reading

Posted in Blog | Tagged , , ,

Testing T-SQL Made Easy

Abstract: Everyone tests that code, but most people run a query, execute a procedure and run another query. This ad hoc, non-repeatable testing isn’t reliable, and encourages regression bugs. In this session you will learn how to begin introducing testing … Continue reading

Posted in Presentations | Tagged , ,

Quick Tests–Function Returns

I ran across a neat piece of code recently from Gail Shaw. She answered a question on returning the base path from a path in a string. Meaning if I had this string: c:\Users\Sjones\Documents\text.txt I’d want to return this: c:\Users\Sjones\Documents … Continue reading

Posted in Blog | Tagged , , ,

Webinar: Unit Testing with SQL Server and tSQLt

I ran into Sebastian Meine at the PASS Summit a few weeks ago and we were talking testing. Sebastian is the founder and developer of tSQLt, which I really like using. We’ve done some teaching together and I’ve delivered a … Continue reading

Posted in Blog | Tagged , , , | 2 Comments

Using Automated Tests to Raise Code Quality

Abstract Agile development practices can speed the development of applications and increase the rate at which you can deploy features for your customers. But unless you include a high level of test coverage in your code, these practices can also … Continue reading

Posted in Blog, Presentations | Tagged , , , ,

A tSQLt Mistake – Debugging a Test

While I was working on a test the other day, it kept failing. Not a big surprise, but I couldn’t figure out why. When I looked at tsqlt.testresults, I saw extra rows. Double rows in fact, and that threw me. … Continue reading

Posted in Blog | Tagged , , | 2 Comments

Testing Sum By Month

I’ve been on a testing kick, trying to formalize the ad hoc queries I’ve run into something that’s easier to track. As a result, when I look to solve a problem, I’ve written a test to verify that what I … Continue reading

Posted in Blog | Tagged , , , ,

tSQLt in Azure SQL Database

I was excited to hear about the v12 Azure databases supporting CLR assemblies. Mainly because I’ve been doing testing work with tSQLt and wanted to run tests in an Azure database. I upgraded a SQL Azure database to v12 and … Continue reading

Posted in Blog | Tagged , , , | 2 Comments

Unit Testing in Philadelphia

I’m helping teach a pre-conference session on Friday, June 5, 2015 at the Microsoft office in Philadelphia. This is an all day, paid for event, that looks at how you can use a framework to write unit tests for your … Continue reading

Posted in Blog | Tagged , , , ,

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 , , ,