SQL Script Unit Testing made easy with Docker Desktop Container

preview_player
Показать описание
Generally, Dev environment is not clean and periodically scripts that run successfully in Dev fail in QA environment. The proposed solution is to stand a clean database from repository, assuming repo has all the scripts to stand up a Production equivalent SQL Database, add some dummy data to your newly created local database then run your new scripts. If successful, then it is a good indication that your scripts will not fail in QA and Prod. At this point you can commit (or check in) your new code to repo.

Standing up SQL server in docker container takes seconds or minutes depending on your hardware. Please consult your infrastructure and engineering team before you do that. Some organization do not want you to run Docker on physical (or virtual) machines.

Reference material:

Рекомендации по теме
join shbcf.ru