Code Coverage on Bitbucket PR

Is code coverage available for PR? Can I specify a quality gate parameter to pass or fail based on code coverage? If this is supported, how do I set up code coverage analysis for PR?

Thanks

Hi,

Yes, coverage reporting is available for PRs in the latest versions, assuming you feed in the reports. To do that, you’ll use exactly the same parameters you do for non-PR analyses.

Regarding the Quality Gate, for PRs only conditions “on New Code” are enforced, so you’ll want to make sure your QG contains a condition on Coverage on New Code.

 
HTH,
Ann

1 Like

Thanks Ann. Is there any documentation on how the QG on New Code can be enforced? i.e PRs that don’t meet the QG are rejected.

Hi,

It’s not entirely clear what you mean by “rejected”, but I guess you’re looking for webhooks.

 
Ann