Search code examples
testingcontinuous-integrationcode-coverageappveyor

Purpose of Test scripts for Appveyor? Intergration with Codecov


We have started using Appveyor for CI with our Github repo and all has went fine. We have our build script working (appveyor.yml) in the repo, and it successfully builds and produces an artifact. Now on to my question

We are trying to pair our builds now with codecov.io which says it will scan it during the CI build. And it does support appveyor, it merely says to add this to the yml

after_test: - bash <(curl -s https://codecov.io/bash)

Which we did, but nothing happens. Does this mean i need an actual test script to run, before it will send off the code to codecov? It is a C# project, and we have it compile, and generate the .exe which we then package into a zip which can be downloaded.

What are the point of these "test scripts" when we already know it compiles and produces an exe? I am a bit confused on how to use this properly..


Solution

  • I believe here https://github.com/codecov/example-csharp is good example of running codecov tests on C# project with working Appveyor configuration. Please look at readme.md file in that repo for greater detail.

    From the Documentation

    You need to add the OpenCover nuget package to your Visual Studio solution which is used to generate code coverage analysis:

    PM> Install-Package OpenCover
    

    Secondly, you need to either write a PowerShell script (if you intend to generate code coverage and upload the result interactively) or you need to add a few entries in you CI config file (if you intend to let your CI generate the coverage).