Home Products Quality Now live: introducing Coverage summary on your Git provider!

Now live: introducing Coverage summary on your Git provider!

Author

Date

Category

You spoke; we listened! We’re very excited to announce you can now see the Coverage summary directly on GitHub as a Pull Request comment!

With this new feature, your code review process is even more seamless. You no longer need to leave GitHub to check your coverage results: you’ll have all the information you need right there on your workflow. Plus, if a user does not have access to Codacy Quality, they will no longer lose time digging for information: all relevant details will be there, in the PR, directly in their environment.

Let’s take a closer look at how to enable and use this exciting new feature!

How to enable Coverage summaries 

To get Coverage summaries, you must first add coverage to your repository. In our documentation, you have a step-by-step guide to help you generate coverage reports, upload data to Codacy Quality, and validate that the coverage setup is complete.

Once you add coverage to your repos, you’ll be able to get Coverage summaries on GitHub. New repositories added to Codacy will have the feature enabled by default, regardless of your plan, but you can easily disable it. For existing repositories, you’ll need to enable the feature.

To enable or disable Coverage summary, go to your repository Settings, tab Integrations, and you’ll see the Coverage summary option. That’s it; you are good to go!

Coverage GitHub integration
Coverage GitHub integration

Coverage summary in action

When you open a PR, you’ll see a comment from Codacy on the GitHub workflow with a summary of your coverage metrics. The summary includes the following:

  • Coverage metrics (coverage variation and diff coverage);
  • Targets and status for the quality gates;
  • Information used to calculate the metrics (number of covered and coverable lines);
  • If a report is missing, an error explaining why we couldn’t calculate Coverage;
  • Links to enable/disable the feature and to change quality gates;
  • Link to see your PR on Codacy UI.

This way, you can conveniently check the Coverage results without ever needing to leave the PR page on GitHub. When there are new coverage results, Codacy will update the last Coverage summary comment if it’s included in the last 5 comments of the PR. Otherwise, Codacy creates a new comment. You’ll always have the most current information.

Let’s see some examples of Coverage summaries.

Normal scenario (coverage variation and diff coverage)

In this scenario, you can see that the coverage variation increased by 10%, and the diff coverage is at 60%. Since the quality gate defined for diff coverage is having at least 95.06%, you’ll get feedback that the current PR is not up to standards in terms of diff coverage.

Normal scenario
Normal scenario of Coverage summary, with Coverage variation and Diff coverage

Normal scenario (coverage variation and diff coverage) without gates

In this scenario, the quality gates are not defined. However, you’ll still be able to see the Coverage summary with the metrics but with no information about the target value.

Normal scenario without gates
Normal scenario of Coverage summary without quality gates

Diff coverage is not applicable

In this scenario, the current PR didn’t add or modify any coverable lines, so the diff coverage was set to ∅ (not applicable).

Diff not applicable
Scenario of Coverage summary when Diff coverage is not applicable

Missing common ancestor

In this scenario, Codacy was not able to calculate coverage variation. However, you’ll still be able to get the summary, and we’ll show you a feedback message that will help you debug the issue.

Missing common ancestor
Scenario of Coverage summary when Codacy is not able to calculate coverage variation

A handy tutorial just for you

To help you get started, we’re sharing a video tutorial showing how the feature works and how you can enable it. Don’t forget to first add coverage to your repository by following the step-by-step guide on our docs page.

If you’ve any questions on this feature or would like further guidance on setting it up, let us know. We’d be more than happy to help you!

We’re very excited about this new release, but your feedback is essential to us! So please give us your thoughts on further improving this feature. Feel free to check our roadmap and submit an idea or contact the support team directly in the in-app chat.

Using Codacy Quality to track your code coverage will save you time, improve the quality of your code, and give you the peace of mind that your code is up to standards. Try it out and see the difference it makes in your code review process. Start a free 14-day trial of Codacy Quality today!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Recent posts

How to implement coding standards in your organization

Coding standards are a set of guidelines and best practices designed to ensure that your code is consistent and readable, making...

Leading Your Team to Engineering Excellence

On March 7th, we did a webinar called Leading Your Team to Engineering Excellence. Guest speaker Steve Berczuk, Lead Software Engineer...

3 popular C# style guides that will help your team write better code

C# is a popular programming language developed by Microsoft, and you can use it for developing web applications, games, and more....

February Product Update 🚀

Hi there 👋, Here are a few updates from February with very exciting news, so keep on...

Velocity vs. Cycle Time: understanding the key differences

Velocity and Cycle time are two standard metrics to measure the efficiency and effectiveness of software development teams. They help you...