Code Coverage Using tSQLt and SQLCop
You can install tSQLt and SQLCop, two open source testing tools that provide you with code testing and code coverage testing respectively. However, you can also automate code coverage through the Azure DevOps Pipeline. This video outlines how this works and results you get.