JacocoEverywhere Gradle plugin

Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests

Лицензия

Лицензия

Категории

Категории

JaCoCo Тестирование приложения и мониторинг Code Coverage
Группа

Группа

com.trickyandroid
Идентификатор

Идентификатор

jacoco-everywhere
Последняя версия

Последняя версия

0.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

JacocoEverywhere Gradle plugin
Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests
Ссылка на сайт

Ссылка на сайт

https://github.com/paveldudka/JacocoEverywhere
Система контроля версий

Система контроля версий

https://github.com/paveldudka/JacocoEverywhere.git

Скачать jacoco-everywhere

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.trickyandroid/jacoco-everywhere/ -->
<dependency>
    <groupId>com.trickyandroid</groupId>
    <artifactId>jacoco-everywhere</artifactId>
    <version>0.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.trickyandroid/jacoco-everywhere/
implementation 'com.trickyandroid:jacoco-everywhere:0.2.1'
// https://jarcasting.com/artifacts/com.trickyandroid/jacoco-everywhere/
implementation ("com.trickyandroid:jacoco-everywhere:0.2.1")
'com.trickyandroid:jacoco-everywhere:jar:0.2.1'
<dependency org="com.trickyandroid" name="jacoco-everywhere" rev="0.2.1">
  <artifact name="jacoco-everywhere" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.trickyandroid', module='jacoco-everywhere', version='0.2.1')
)
libraryDependencies += "com.trickyandroid" % "jacoco-everywhere" % "0.2.1"
[com.trickyandroid/jacoco-everywhere "0.2.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

JacocoEverywhere

Gradle plugin which allows to generate Jacoco coverage report for both integration & unit tests

Warning!

This plugin is not maintained anymore and is deprecated!

Why?

Android plugin has built-in support for generating test coverage report:

android {
    buildTypes {
        debug {
            testCoverageEnabled = true
        }
    }
}

However, this report only shows test coverage for your integration tests (aka UI tests, aka those ones you run with ./gradlew connectedCheck).

But what we really want - is to see test coverage report for both integration AND unit test suites!

jacoco-everywhere plugin does just that!

Usage

  1. Enable code coverage like you normally would for your integration tests:
android {
    buildTypes {
        debug {
            testCoverageEnabled = true
        }
    }
}
  1. Add jacoco-everywhere dependency to Android module buildscript and apply jacoco-everywhere plugin: build.gradle:
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.trickyandroid:jacoco-everywhere:0.2.1'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'jacoco-everywhere'
  1. execute ./gradlew connectedCheck from your command line

  2. Observe Jacoco test coverage report in <your_project_dir>/<android_module>/build/reports/coverage/debug/index.html

Версии библиотеки

Версия
0.2.1
0.2.0
0.1.1
0.1.0