Process jacoco reports and print the code coverage to the Azure DevOps

Overview

PrintCoverage

PrintCoverage plugin allows you easily integrate coverage badge into your Azure DevOps pull requests!

Build Status License: MIT

How to use

In the module build.gradle:

plugins {
    id('com.intermedia.printcoverage').version('0.0.2')
}

import com.intermedia.printcoverage.azure.AzurePrinterFactory
import com.intermedia.printcoverage.azure.AzureRepo

printCoverage {
    setPrinterFactory(
            new AzurePrinterFactory(
                    new AzureRepo(
                            "<azure token>",
                            "<azure base url>",
                            "<azure organization>" ,
                            "<azure project>",
                            "<azure repo>"
                    )
            )
    )
    setJacocoReportFile(file("${project.buildDir}/outputs/jacoco/report.xml"))
}

Where azure token is a personal access token with custom scopes:

  • Code (Status)
  • Code (Read & Write)

And then run it in the Azure pipeline as a policy for a target branch:

./gradlew testDebugUnitTest printCoverage

How it works

The plugin processes the jacoco report xml file, analyzes the test coverage stat, and then posts it via Azure DevOps api as a pull request status update.

You might also like...
Social share - Social Sharing Plugin For Private Use only (Code without error checking)
Social share - Social Sharing Plugin For Private Use only (Code without error checking)

Flutter Social Share plugin for sharing file to media with multiple (More option

Dokka plugin to render Mermaid graphics, from your code comments to your Dokka documentation.
Dokka plugin to render Mermaid graphics, from your code comments to your Dokka documentation.

Dokka plugin to render Mermaid graphics, from your code comments to your Dokka documentation.

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Gradle Play Publisher Gradle Play Publisher is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and

Helper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Central, Corporate staging/snapshot servers and local Maven repositories).

GradleMavenPush Helper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Cen

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Maven Plugin for Android Application development and more

ANDROID MAVEN PLUGIN A plugin for Android application development with Apache Maven 3.0.5+ and the Android SDK. Please check out our website for furth

 Gradle plugin which downloads and manages your Android SDK.
Gradle plugin which downloads and manages your Android SDK.

DEPRECATED This plugin is deprecated and is no longer being developed. Tools and dependencies are automatically downloaded using version 2.2.0 of the

This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base color you specify.

alpha-color Description This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base c

Owner
Intermedia Cloud Communications
We help over 122,000 businesses connect better – through voice, video conferencing, chat, contact center, email, file sharing, security, archiving, and more.
Intermedia Cloud Communications
CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native.

C Klib CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native. The Problem When you want to access C-etc code f

Touchlab 73 Nov 8, 2022
Manage pull requests and conduct code reviews in your IDE with full source-tree context.

String Manipulation IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162 Sponsored by Manage pull requests and conduct code reviews in your IDE

Vojtěch Krása 582 Dec 22, 2022
UTBotJava generates test cases by code, trying to cover maximum statements and execution paths.

UTBotJava generates test cases by code, trying to cover maximum statements and execution paths. We treat source code as source of truth assuming that behavior is correct and corresponds to initial user demand. Generated tests are placed in so-called regression suite

null 60 Jan 3, 2023
A webserver interface to the same methods and code that Cordova plugins install.

cordova-plugin-webserver Cordova plugin for localhost web server written in Kotlin and Ktor Install plugin cordova plugin add https://github.com/Qbix/

Qbix 0 May 5, 2022
IntelliJ Plugin for Android Parcelable boilerplate code generation.

IntelliJ/Android Studio Plugin for Android Parcelable boilerplate code generation This tool generates an Android Parcelable implementation based on fi

Michał Charmas 2.1k Dec 27, 2022
A plugin for Jetbrains IDE, Your code is powerful, unleash it like playing osu!

Osu! Mode A plugin for Jetbrains IDE, Your code is powerful, unleash it like playing osu! Demo 2021-10-15.18-50-30.mp4 Bilibili Feature open project /

Nthily 8 Sep 8, 2022
Intellij Idea Plugin that can convert HTML to Compose for Web code.

HtmlToComposeWebConverter Intellij Idea Plugin that can convert HTML to Compose for Web code. Turn this: Into this: Show some ❤️ and star the repo to

Jens Klingenberg 90 Oct 10, 2022
Kirill Rakhman 4 Sep 15, 2022
An IntelliJ IDEA plugin is used to inspire you to write code.

InspireWritingPlugin An IntelliJ IDEA plugin is used to inspire you to write code. Whenever you write code that exceeds the specified character, the p

Airsaid 6 Feb 11, 2021
Ownership-gradle-plugin - Gradle code ownership verification plugin

Gradle code ownership verification plugin A gradle plugin that will verify owner

null 4 Dec 15, 2022