Comments
3 comments
-
Hi @hoytm,
Thank you for your forum post.
SQL Test is just a UI wrapper for the tSQLt unit test framework. The actual tests created are Stored Procedures created in the database that a user adds to SQL Test.
There is nothing in place to prevent the Stored Procedures from being executed outside of SQL Test. Ideally you would want to run the tests with SQL Test / tSQLt framework, as each test within the tool will drop any objects it creates.
Many Thanks
Eddie -
@hoytm when you said "regular execute statement" did you mean that you executed the tSQLt.Run stored proc & passed in the name of your test stored proc like this?
EXEC [tSQLt].[Run] @TestName=N'[TestSchemaOne].[test The Number One Equals the Numeral One]'
-
Yep, that's what I meant. Further review of the test revealed it had issues. I guess the morals to the story are 1) review tests that fake tables carefully before executing them and 2) execute within SQL test or at least have a rollback ready in case something goes bad.
Add comment
Please sign in to leave a comment.
Thank you!
Matt