Hi, I am using very often TSQLTester from the moment it was created. And it saved me a lot of time with my performance challenges. Of course my favorite advantage of TSQLTester is testing content of data. Today I would like to extend first implementation and give you option for mocking of procedures of functions that in standard production cases connecting to the Service Bus or writing to some Queue implementations in the middle of our code that we want to optimize. So that can be very painful for our work, because we do not want to send any external data during optimization. And for that stored procedure for example called SendToLongTimeProcessing we want to create empty mock that do not send anything, but in the same time we want to put it back on development SQL Server after our work and of course all of those operations should be done automatically without any more steps. So, this is invocation of TSQLTester as an example.
TSQLTester.exe conectionString.cfg test.sql new.sql old.sql mock.sql unmock.sql
Last two parameters are optional and we can not put them at all. So this is for backward compatibility of the new TSQLTester and its previous version.
And In this post I would like to share of the source code of this tool that I am proud of TSQLTesterWithMocking (3716 downloads). Enjoy!