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 the content of data. Today I would like to extend the first implementation and give you the option for mocking procedures of functions that, in standard production cases, connect 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 an empty mock that does not send anything, but at the same time, we want to put it back on the development SQL Server after our work. Of course, those operations should be done automatically without any more steps. So, this is an 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 (3784 downloads). Enjoy!
Pingback: Happy Holidays at The End of 2014 @ coding by to design