Code Coverage Report (with JaCoCo) in Azure DevOps Pipeline

Image Taken from

Changes in build.gradle

build.gradle file
  • jacoco/test.exec file
  • reports/jacoco/test/jacocoTestReport.xml file
  • reports/jacoco/test/html folder

Configuring JaCoCo Code Coverage in Azure DevOps

  • Open your Azure DevOps pipeline, click Edit Pipeline (If u already have one or create a new pipeline)
  • In your Gradle task, enable the checkmark “Publish to Azure Pipelines” under JUnit Test Results
  • Add a new task “Publish code coverage results” by clicking + button
  • Under Publish code coverage result task, choose the Code Coverage Tool as JaCoCo
  • Summary file Location${System.DefaultWorkingDirectory}/**/reports/jacoco/test/jacocoTestReport.xml
  • Report Directory${System.DefaultWorkingDirectory}/**/reports/jacoco/test/html
  • Save & Queue your pipeline




Twitter @IamVickyAV

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to build an Optimization Model for a business problem with implementation in SciPy

Doubly linked list using Java

Many Nodes, One Distributed System

Swift Generics <Plug and Play>

The Worst Time-Based Coding Mistakes in History

Python Tutorial

Calculus Features — File Retrieval Service

The guard statement in swift

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vicky AV

Vicky AV

Twitter @IamVickyAV

More from Medium

Configuring Auth0 with WSO2 API Manager for SSO

Rapid App Development with Azure Spring Cloud Enterprise

Building Spring Boot 3 apps is easier than ever!

Dockerizing a Maven Project