-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to exclude database objects from coverage reports? #72
Comments
Hi @GoEddie , I am also looking to tackle similar issue reported above. My usecase is to exclude a list of stored procedures for which I Know I will not write unit tests. In that scenario, I would want to exclude those in the total coverage metrics as well. Could you help suggest if this is possible in the existing version ? Thanks, |
Hello @KrylixZA , Were you able to find any solution for the issue you have reported ? Please let me know if you have found something. Thanks, |
hi @KrylixZA , Found a working solution where sql objects can be excluded from coverage.
Referece : https://the.agilesql.club/2016/04/sqlcover-code-coverage-for-sql-server-t-sql/ Thanks |
Closing this issue with this comment. Thanks @priyasomangali 👍 |
Hey @GoEddie :)
Thanks for this awesome library. I am running some tests against our DB in a Docker container in a CI pipeline and while there's nothing necessarily wrong, I am trying to figure out how to exclude objects from coverage. There appears to be little (to possibly no) documentation no how to do the exclusions correctly?
The
SQLCover.CodeCoverage
(PowerShell) has a couple of options, the one I am interested is:New-Object SQLCover.CodeCoverage($connectionString, $DbName, $ObjectFilters, $DebugLogging)
It seems to support the notion of filtering out objects but I actually don't know how to do this 😢
Any help would be nice.
In particular, I have two schemas on my DB:
dbo
Versioning
I would like to exclude the
Versioning
schema from coverage.The text was updated successfully, but these errors were encountered: