Is it possible to run SQL unit tests during the build process in VSTS (which would ideally cause the build to fail if any tests fail)? Or, can I only run tests after build/deploy on the drop server's SQL Server?
Thanks!
Is it possible to run SQL unit tests during the build process in VSTS (which would ideally cause the build to fail if any tests fail)? Or, can I only run tests after build/deploy on the drop server's SQL Server?
Thanks!
You need to deploy the objects under test somewhere before they can be exercised, whether this is by SQL Server Unit Tests (of the Visual Studio variety) or by tsqlt tests.
As you point out, one possible location is after the artefacts have gone to the drop server, but there are a couple more possibilities:
Update: CLR doesn't work in SQL Azure any more, and this is required for tSQLt