October 19th, 2023

Improved Code Coverage Tab Experience

Vinayak Joshi
Software Engineer

If you’re using Azure DevOps for your CI/CD pipeline, you may be interested in our recent improvements to code coverage testing. Code coverage tests can help you identify areas of your code that are not tested, or not tested enough, and improve the quality of your automated tests and overall code quality.

With our recent updates, you can now view code coverage tab by default for all the code coverage formats. Additionally, if you have enabled code coverage policy, you will see comments in the pull request indicating whether or not the policy has been met, including comments about missing test cases or test executables.

We are continuously collecting feedback to improve our automated testing capabilities, so you can expect more updates and improvements in the future. More details on the released features below:

Default view for code coverage:

Previous Experience:

Previously, The code coverage tab is displayed only when the build is completed. Due to this, the users would not have much idea about whether the code coverage tab would be visible or not. This created an unsatisfied experience for the customers as the code coverage tab was completely dependent on the status of the build.

Also, the code coverage tab was not informative in case when there were any failures. Due to this, the users would not have much information on what actually caused the code coverage tab to not show up.

New Experience:

With the new experience of the code coverage, we would start showing the Code Coverage tab by default. The Code coverage tab would be displaying the appropriate messages related to the state of the build pipeline or the code coverage process. This would provide the information to the users on the current state of the code coverage. For example, “Pipeline is queued”, “Code coverage in progress” etc. We would also be displaying the InProgress results of the code coverage data.

For the successful scenarios, we would be showing the code coverage data as it was before. There would not be any changes with respect to this behavior. Code Coverage success

For the failure scenarios, we would be displaying the code coverage tab along with the message that would help the users understand the root cause of why the code coverage data was not generated.

Code Coverage failed

For the scenarios ,where code coverage is not configured or if there are no test modules involved, we would be still showing the code coverage tab along with a message and an image with “Code Coverage not configured”.

Code Coverage not configured

With these improvements, we tend to enhance the user experience in viewing the code coverage tab and also onboard new users to enable code coverage in their repos to increase their test coverage percentages and ensure they ship quality products.

Author

Vinayak Joshi
Software Engineer

I am a Software Engineer working in Azure Devops Test team.

3 comments

Discussion is closed. Login to edit/delete existing comments.

  • Jens Schmitz

    Will there be branch coverage one day?
    I only see line coverage all the time.

  • Thomas VAILLIER

    Nice addition !
    Will it be available on Azure Devops Server ?

    • Tore Østergaard Jensen (TORE)

      Or rather, when 🙂