0

I am using VSTS build pipline to build my project ( ASP .Net Core 2.1 ) .
I have added test command to run test project and enabled Publish test results and code coverage checkbox to be able to view code coverage results.

enter image description here

I can see the test results are getting uploaded but can't see any information regarding code coverage.

enter image description here

Am I missing anything ?

UPDATE 1 I am using Hosted VS2017 Agent Pool

enter image description here

4
  • Possible duplicate of VSTS - how to get Code Coverage results Commented Dec 10, 2018 at 7:37
  • @ShaykiAbramczyk , I have gone through that post but it looks like that post belongs to .Net framework 4.6 framework, I am having issue with .Net core 2.1 and I am 100% sure that I have enabled code coverage in my task. Commented Dec 10, 2018 at 7:47
  • Do you use hosted agent or private agent? Commented Dec 10, 2018 at 8:12
  • @ShaykiAbramczyk I have updated original question. I am using 'Hosted VS 2017' Agent Pool Commented Dec 10, 2018 at 20:25

1 Answer 1

2

Code coverage can be collected by adding --collect "Code coverage" option to the command line arguments. This is currently only available on the Windows platform.

In your case your arguments should look like --configuration $(BuildConfiguration) --collect "Code coverage"

This information is available if you hover your mouse over the (!) icon besides the checkbox for "Publish test results and code coverage"

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.