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

An easier way to exclude test code from code coverage #15

Open
atlaste opened this issue Jun 29, 2017 · 0 comments
Open

An easier way to exclude test code from code coverage #15

atlaste opened this issue Jun 29, 2017 · 0 comments
Milestone

Comments

@atlaste
Copy link
Owner

atlaste commented Jun 29, 2017

While #pragma works fine, it's not really convenient for excluding unit test code from the code coverage process. You basically end up writing that in every piece of code...

What we need is a simple way to exclude complete namespaces from the coverage tool. That way, our coverage results don't get messed up with all test code that isn't hit when everything works correctly...

This is absolutely non-trivial, because the application doesn't have knowledge of the coverage tool.

One way to do this is to create a special stub 'PassToCoverageTool' call, and intercept that using a breakpoint, thereby passing information to the coverage tooling. The implementation in the application should be a stub that's never inlined. Once that's implemented, we have a way of passing data to the coverage engine, which will help significantly with this issue.

It's tricky, it might just do the job...

atlaste pushed a commit that referenced this issue Jun 30, 2017
Implemented runtime passing of information to the coverage tool, as per issue #15
@atlaste atlaste added this to the beta milestone Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant