-
Notifications
You must be signed in to change notification settings - Fork 255
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
MSTest.TestAdapter 3.2.0 generates coverage report for 'Microsoft.ApplicationInsights' package #2816
Comments
@MarcoRossignoli @jakubch1 Is it possible for us to add some exclusions automatically so that users don't have to exclude the telemetry package? |
For what I see it's using coverlet and it shouldn't appear because we use heuristic and we don't have in local source files of it. So I suppose that's it's not the only extra package in the report or? It's already excluding something https://github.com/coverlet-coverage/coverlet/blob/master/test/coverlet.core.tests/Coverage/InstrumenterHelper.cs#L109 but not for instance mstest so also appinsight should not be there. |
Alright so closing issue here then, thanks @MarcoRossignoli! |
Thanks @Evangelink and @MarcoRossignoli . However, the only extra package I am seeing in the report is the 'Microsoft.ApplicationInsights'. Should I open an issue at the coverlet side instead? |
@dxynnez yes please do! |
Describe the bug
After upgrading to MSTest.TestAdapter >= 3.2.0, we notice that the code coverage report would now include the 'Microsoft.ApplicationInsights' package.
We run our tests with:
dotnet test --no-build --no-restore --configuration release --logger trx --collect "XPlat Code Coverage" --results-directory TestResults\ /p:ExcludeByAttribute="CompilerGeneratedAttribute"
Here is a sample coverage.cobertura.xml file:
We do notice that the 'Microsoft.ApplicationInsights' became a new transitive dependency for 'MSTest.TestAdapter', starting from v3.2.0, but we are not sure how come it would affect our test coverage report; and we are not using app insight at all. Is there a way to tell dotnet test to not include the 'Microsoft.ApplicationInsights' package?
Steps To Reproduce
Expected behavior
Report should not include the 'Microsoft.ApplicationInsights' package as it's a transitive dependency from 'MSTest.TestAdapter'
Actual behavior
Report includes the 'Microsoft.ApplicationInsights' package
The text was updated successfully, but these errors were encountered: