-
Notifications
You must be signed in to change notification settings - Fork 386
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
BUG: (Completely) Missing Coverage #72
Comments
Note: Neither the |
To add to the mystery, I tried to add it to Appveyor, and it "kind of" worked: So it worked for the |
And travis (both on Linux and OSX) is even stranger: https://travis-ci.org/zkSNACKs/WalletWasabi/jobs/373441646 |
Thanks for reporting this. I'll take a look at your sample project and see if I can figure it out |
@tonerdo Thanks! I put together some build instructions for Windows so to not get stuck:
Notes:
|
Having tried this, the first obvious problem is that there's an assembly being (indirectly) referenced that's in ~/.nuget, but is not copied locally. That manifests as an assembly resolution failure when trying to write an instrumented assembly -- the process then just carries on obliviously.
|
@SteveGilham I actually tried it. Copying the assembly manually only solved the problem in |
My project is also not getting code coverage results. Its not covering all the dependent assemblies. My project is located here. https://github.com/loresoft/FluentCommand Is there a way to setup debug local? The build output is here: https://ci.appveyor.com/project/LoreSoft/fluentcommand |
I think I have related bug. On Windows all is ok, but on Linux with Travis I have 0 coverage report. dotnet build CIDemo.sln -c Release
dotnet test -c Release test/test.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover Any idea? PackageReference Include="coverlet.msbuild" Version="2.0.0" |
Downgrading to 1.2.0 Fixed problem. But for 2.0 it still exists |
I'm experiencing the same issue. 2.0 -> Travis = no coverage |
Have you tried adding the following to your test.csproj?
I was running into problems with coverlet not being able to locate dll's and seems to fix it. |
@varnotwars no problem! It would be useful if this was added to the documentation as I believe it solves a lot of the 0% coverage issues and errors |
Will keep this open until I add it to the documentation, thanks @n00j |
In my case, upgrading my test project from |
Just as a FYI, my test project is |
the same as @asbjornu no code coverage 👎 |
I found out if you run in Release mode is doesn't cover all the dlls but if you do Debug it works |
I can't remember exactly what I did, but I managed to generate a code coverage report and upload it to Codecov in linked-data-dotnet/json-ld.net#38. |
Also it might be also helpful to point out that @SteveGilham's altcover is still working for .NET Core projects. It's less straightforward to use but at least it works: Install dotnet build
dotnet C:\Users\user\.nuget\packages\altcover\5.0.663\tools\netcoreapp2.0\altcover.dll --save --inplace "-i=bin\Debug\netcoreapp2.2"
dotnet test
dotnet C:\Users\user\.nuget\packages\altcover\5.0.663\tools\netcoreapp2.0\altcover.dll runner --collect "-r=bin\Debug\netcoreapp2.2" "-l=lcov.info" Run vscode and click on "Watch": |
Just interjecting to remark that doing
to have the same effect has been supported since early last summer. |
Hi guys I saw a lot of activity on this issue..I would like to know if this issue is still relevant, if so I would like to repro on my local and in case fix or update documentation accordingly. |
close for stale...further discussion on similar issue https://github.com/dotnet/cli/issues/12705#issuecomment-535150372 |
We are still facing this issue. The workarounds mentioned here did not help. |
@PSanetra please can you file an new issue with you case? |
Maybe related: #39
Behavior.
What I do
dotnet test /p:CollectCoverage=true
.I also tried creating a new project and everything works fine, however with my current project (https://github.com/zkSNACKs/WalletWasabi/) it silently fails.
The text was updated successfully, but these errors were encountered: