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

Can we improve code coverage reporting in CI #23650

Open
jhendrixMSFT opened this issue Oct 23, 2024 · 1 comment
Open

Can we improve code coverage reporting in CI #23650

jhendrixMSFT opened this issue Oct 23, 2024 · 1 comment
Labels
EngSys This issue is impacting the engineering system. test-enhancement

Comments

@jhendrixMSFT
Copy link
Member

Changes in code coverage reporting in the latest two versions of Go impact total percentages. It's likely related to our usage of ./... which causes all packages to be included. While this is useful for ensuring that all tests are executed, it has a direct impact on how CC numbers are generated.

For example, consider azcore/internal/exported.HasStatusCode. This is exported in azcore/runtime and there's a test for it there. However, since we use ./... both versions are included in CC numbers which means we need to have a test in both packages (i.e. redundant tests) else we'll get a zero for the internal version, dragging down CC numbers.

I believe we can fix this with the -coverpkg flag however it's not clear what that looks like yet.

@jhendrixMSFT jhendrixMSFT added EngSys This issue is impacting the engineering system. test-enhancement labels Oct 23, 2024
@jhendrixMSFT
Copy link
Member Author

See golang/go#68627 which links various issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EngSys This issue is impacting the engineering system. test-enhancement
Projects
None yet
Development

No branches or pull requests

1 participant