How can I exclude the system stored procedures for diagrams from Code coverage results?
I have recently noticed that the sp_%diagram procedures are now being listed in the Code coverage results, but they didn't use to.
They all have an extended property of microsoft_database_tools_support, which could be an easy way to identify them.
Is there a way to exclude these from the results of the Code coverage?
They all have an extended property of microsoft_database_tools_support, which could be an easy way to identify them.
Is there a way to exclude these from the results of the Code coverage?
Tagged:
Answers
I can see severa parts in the static analysis code base where it's looking for objects but excluding diagram related things like:
And
And
So it seems like it is excluding them in at least some cases. Can you give specific example of what and where it is being included?
Kind regards,
Alex
Have you visited our Help Center?
What you've mentioned above sounds like it should exclude most of them, but it doesn't line up with what I can see.
When I run my tests on a database which has the diagramming objects, these ones show up in the Code coverage section.
I am using the latest available version - SQL Test Version 3.1.3.585
Righto, the bits I saw were related to some of the SQL Cop static analysis tests rather than code coverage.
The code coverage is handled by SQL Cover which is this open source project: https://github.com/GoEddie/SQLCover and so you will need to direct questions or requests for it there as we don't control it!
Kind regards,
Alex
Have you visited our Help Center?
Have you visited our Help Center?
I came across the need for this again this week, and posted it as an issue on the SQLCover github page.
Eddie replied confirming that SQLCover already has the ability to take a filter to exclude specific objects ("sp_.*diagram" would work in this instance) but there is nothing in the SQLTest ui to allow you to specify anything that can be passed to SQLCover.
Is this something which could be added to SQLTest?
Link to GitHub comment : https://github.com/GoEddie/SQLCover/issues/45#issuecomment-548136446