-
Notifications
You must be signed in to change notification settings - Fork 2
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
empty code-coverage when coverlet runs on project which refrences the nuget-package #30
Comments
If leaving out ReproStep. B, there are no files generated, hence it looks like coverage is working again. |
looks like coverlet is unable to instrument the generated files:
|
maybe connected to |
possible workaroundfall back to using coverlet 2.5.1
starting from coverlet 2.6.0 seems to provoke the issue:
|
The generated sources itself do not seem to be the problem. When emitting the generated files to the file-system, move them into the project hierarchy and removing the source-generator, coverage comes out as intended. |
The generated sources itself does not be the problem. When emitting the generated files to the file-system, move them into the project hierarchy and removing the source-generator, coverage comes out as intended. |
Trying out solution suggested in |
confirmed: appending "g.cs" fixes the issue |
repro steps
See full repro-sample here:
https://github.com/earloc/TypealizR/tree/repros/no-code-coverage/repros/30_Empty_CodeCoverage
create an
app
create an XUnit
test-project
for theapp
create a test-case hitting something from within
app
add coverlet.msbuild to the
test-project
configure coverlet-properties in the
test-project
run
dotnet test
on thetest-projet
reproduce the issue
app
expected
an output like this:
generated coverage-files contain detailed coverage-data
actual
generated coverage-files are (kind-of) empty
The text was updated successfully, but these errors were encountered: