OpenCover does not work

shahabganji's Avatar

shahabganji

05 Oct, 2019 08:08 PM

I have teste almost all possible running commands for OpenCover on my repository https://ci.appveyor.com/project/shahabganji/funx/builds/27905213

but, I get several errors, from this one which indicates config file not found to those indicating that they could not find xunit.dll

I also got this:
System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll (v2) in C:\projects\funx\tests\Funx\bin\Debug\netcoreapp2.2

in one of the builds: https://ci.appveyor.com/project/shahabganji/funx/builds/27905153

I tried to follow https://github.com/codecov/example-csharp and https://www.appveyor.com/blog/2017/03/17/codecov/

 did I miss something?

  1. Support Staff 1 Posted by Feodor Fitsner on 05 Oct, 2019 08:42 PM

    Feodor Fitsner's Avatar

    I'm not sure what could be wrong with your tests on AppVeyor environment. Have you tried following this article yet: https://dev.to/codingdefined/how-i-added-appveyor-codecov-to-net-co...?

  2. 2 Posted by shahabganji on 06 Oct, 2019 07:11 AM

    shahabganji's Avatar

    I did but to no vail, looks something is wrong with my command for OpenCover, cause it is not also working on a local windows machine. I will investigate more and will update ASAP

  3. 3 Posted by shahabganji on 06 Oct, 2019 07:52 AM

    shahabganji's Avatar

    I switched to coverlet instead, and all work just fine.

  4. Support Staff 4 Posted by Feodor Fitsner on 07 Oct, 2019 03:47 PM

    Feodor Fitsner's Avatar

    Nice! Could you drop a link to a working build then, as an example? Thank you!

  5. 5 Posted by shahabganji on 08 Oct, 2019 05:37 AM

    shahabganji's Avatar

    This is the latest build ATM on appveyor CI: https://ci.appveyor.com/project/shahabganji/funx

    And this is the link to the latest appveyor.yml file in my repository:

    https://github.com/shahabganji/Funx/blob/master/appveyor.yml

  6. Support Staff 6 Posted by Feodor Fitsner on 08 Oct, 2019 02:33 PM

    Feodor Fitsner's Avatar

    Thanks!

  7. 7 Posted by dmitriy.litiche... on 04 Nov, 2019 11:23 PM

    dmitriy.litichevskiy's Avatar

    Try to use `-register:appveyor` instead of `-register:user`, it helped me solve the same case. May be it's worth to correct this in the guide https://www.appveyor.com/blog/2017/03/17/codecov/.

  8. Support Staff 8 Posted by Feodor Fitsner on 05 Nov, 2019 02:17 AM

    Feodor Fitsner's Avatar

    Hi Dmitriy,

    You can actually contribute to that blog post: https://github.com/appveyor/website/blob/master/src/_posts/2017-03-...

  9. 9 Posted by dmitriy.litiche... on 05 Nov, 2019 09:34 PM

    dmitriy.litichevskiy's Avatar

    Feodor, I'm afraid that correcting the guide was my hasty decision. According to issues
    https://github.com/OpenCover/opencover/issues/911
    https://github.com/OpenCover/opencover/issues/914
    https://github.com/OpenCover/opencover/issues/915
    the problem was caused by the combination of the software inside the image and specifying the concrete user name in the build configuration may be wrong decision in the long run. So this topic needs more investigation, I guess)
    What do you think about it?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac