Code Coverage on Pull requests

sonarcloud
vsts

(michael hill) #1

Hello,

I’m having difficulty with code coverage metrics on pull requests.

VSTS will report “Code Quality check passed” even though the code contains 0% test coverage and therefore fails the Quality Gate.

Please could some assist me in getting this resolved asap.

Thanks,

Michael


(Fabrice Bellingard) #2

Hi Michael,

code coverage is currently not computed on PR. Which is why you get the current behaviour. The good news is that we plan to fix this huge limitation in the upcoming months (see MMF-1118).


(Aminul Hasan) #3

hey, is this feature complete by any chance? If so, I’ve been having trouble finding screencaps on what the metrics is computed. Is there any online resources demonstrating this feature?


(Benoit) #4

Coverage in Pull Request is currently available but it’s still not taken into account when computing the pr status. But custom quality gates for PR are coming soon with MMF-1369 which is currently under development.


(Melvin Biamont) #5

Hi, is it normal I still don’t see the Code Coverage on my Github PR decoration ?


(Benoit) #6

Hi,

No it’s not normal. If you haven’t read it already, I invite you to take a look at our coverage guide/faq:


If it doesn’t help fixing your issue, open a new thread with details about:

  • how you run the scanner (the parameters/config, are you using one of our integration with a CI services, maven/gradle plugin, etc…).
  • Your project (the link if it’s a public project) which languages, build system, etc…

Best