Skip to content
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

System diagram procedures are currently included in the code coverage results #45

Open
davidlyes opened this issue Oct 30, 2019 · 3 comments

Comments

@davidlyes
Copy link

The system diagram procedures are currently included in the code coverage results.
These shoudn't be included as they are system procedures so we shouldn't need to write tests for them, and it negatively impacts the total coverage %.

I believe they can be recognised by either their name (sp_%diagram) or by the extended property microsoft_database_tools_support.

2019-10-31 08_44_18-SQL Test - Microsoft SQL Server Management Studio

I am currently using Code Coverage as part of the RedGate SQLTest plugin.
I had approached RedGate about this and they pointed me to here :)
https://forum.red-gate.com/discussion/85304/how-can-i-exclude-the-system-stored-procedures-for-diagrams-from-code-coverage-results

@GoEddie

@GoEddie
Copy link
Owner

GoEddie commented Oct 30, 2019

Hi @davidlyes,

SQLCover already has the ability to take a filter to exclude specific objects ("sp_.*diagram" would work for you) but there is nothing in the SQLTest ui to allow you to specify anything that can be passed to SQLCover.

I am a bit hesitant to add in specific filters because although you don't want to see these someone else might want to see them.

A half way measure might be to get SQLCover to look in a config file in a known place for additional filters, that way it will work with SQLTest and anywhere else.

So your options are:

  1. Don't use the Redgate UI to generate your coverage reports
  2. Ask Redgate to include the ability to add a filter as part of their UI
  3. Wait for me to implement an additional config file for extra filters - to make sure people didn't get additional filters they didn't know about I would want these displayed on the output somehow so there are a few things to do here. (you would also need Redgate to use the updated version of the dll)

ed

@davidlyes
Copy link
Author

Thanks for your quick feedback @GoEddie!

I will go back to RedGate to see if they would be able to implement filters into their UI, since it is something that is already supported by SQLCover.

@kishorechikka
Copy link

Hi @davidlyes,

SQLCover already has the ability to take a filter to exclude specific objects ("sp_.*diagram" would work for you) but there is nothing in the SQLTest ui to allow you to specify anything that can be passed to SQLCover.

I am a bit hesitant to add in specific filters because although you don't want to see these someone else might want to see them.

A half way measure might be to get SQLCover to look in a config file in a known place for additional filters, that way it will work with SQLTest and anywhere else.

So your options are:

  1. Don't use the Redgate UI to generate your coverage reports
  2. Ask Redgate to include the ability to add a filter as part of their UI
  3. Wait for me to implement an additional config file for extra filters - to make sure people didn't get additional filters they didn't know about I would want these displayed on the output somehow so there are a few things to do here. (you would also need Redgate to use the updated version of the dll)

ed

Hi Ed.
there is no documentation is provided how to filter stored procedures while calculating code coverage if we use SQLCover. it would be great if you show one example for this. thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants