I have an issue with VSTS build agent as I can't seem to produce code coverage info out of it when I run it locally. The build plan is the default one: get the source, build, execute test assemblies, create build artifact, etc. In the Test assemblies step, the Code coverage enabled checkbox is checked.
When I execute it using the Hosted VS2017 agent, the Code coverage tab shows a link to download the result and also the related charts can display that data.
I downloaded and installed the build agent from VSTS main page -- Project settings -- Agent pools. After installation, I queued a build using that. It builds fine, but the Code coverage tab shows the following message:
No code coverage data is available.
Enable code coverage via the test framework used in your build pipeline, such as JUnit, Visual Studio Test, or xUnit.
In case it matters, I use xUnit, the xunit.runner.visualstudio package is referenced in the test projects.
My question is: what should I modify in my setup to enable code coverage info for the local build agent?
