ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - Kotlin/kotlinx-kover
Contribute to Kotlin/kotlinx-kover development by creating an account on GitHub.
Visit Site

GitHub - Kotlin/kotlinx-kover

GitHub - Kotlin/kotlinx-kover

Kover

Kotlin Beta official JetBrains project GitHub license

Kover is a set of solutions for collecting test coverage of Kotlin code compiled for JVM and Android platforms.

Kover Toolset:

Kover Gradle Plugin

For full information about latest stable release of Kover Gradle Plugin, please refer to the documentation.

Features

  • Collection of code coverage through JVM tests (JS and native targets are not supported yet).
  • Generating HTML and XML reports.
  • Support for Kotlin JVM, Kotlin Multiplatform projects.
  • Support for Kotlin Android projects with build variants (instrumentation tests executing on the Android device are not supported yet).
  • Support mixed Kotlin and Java sources
  • Verification rules with bounds in the Gradle plugin to keep track of coverage.
  • Using JaCoCo library in Gradle plugin as an alternative for coverage measuring and report generation.

The recommended way of applying Kover is with the plugins DSL.

Minimum supported version of Gradle is 6.8.

Add the following to your top-level build file:

plugins {
     id("org.jetbrains.kotlinx.kover") version "0.9.0-RC"
}
plugins {
    id 'org.jetbrains.kotlinx.kover' version '0.9.0-RC'
}

After you applied Kover Gradle plugin, Kover tasks will be created for generating reports and verification. E.g. to generate HTML report run ./gradlew koverHtmlReport - this will automatically start code compilation, execution of instrumented tests, and an HTML report will be generated with measurement results in the build folder.

It is also important that after applying Kover Gradle plugin, during the running tests, the classes are modified (instrumented) when loaded into the JVM which may lead to some performance degradation, or affect concurrent tests.

Legacy Plugin Application

Legacy method of applying plugins can be used if you cannot use the plugins DSL for some reason.

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath("org.jetbrains.kotlinx:kover-gradle-plugin:0.9.0-RC")
    }
}

apply(plugin = "org.jetbrains.kotlinx.kover")

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.jetbrains.kotlinx:kover-gradle-plugin:0.9.0-RC'
    }
}
  
apply plugin: 'org.jetbrains.kotlinx.kover'

To create report combining coverage info from different Gradle projects

You have to add dependency on the project, in which the report task will be run

dependencies {
  kover(project(":another:project"))
}

in this case report will be generated for current project joined with :another:project project.

More examples of Gradle plugin applying can be found in example folder

Kover Aggregated Plugin

Kover Aggregated Plugin as a prototype of Gradle Settings plugin, created to simplify the setup of multi-project builds. It is in its infancy, it is recommended to use it only for test or pet projects.

Refer to the documentation for details.

Kover Maven Plugin

The Kover Maven Plugin can be applied by specifying build plugin

<plugin>
    <groupId>org.jetbrains.kotlinx</groupId>
    <artifactId>kover-maven-plugin</artifactId>
    <version>0.9.0-RC</version>
</plugin>

The list of Kover goals is specified in this document section.

For full information about latest stable release of Kover Maven Plugin, please refer to the documentation.

Kover CLI

Standalone JVM application used for offline instrumentation and generation of human-readable reports.

Documentation of the Kover CLI.

Kover offline instrumentation

Offline instrumentation is the modification of class-files stored on disk to measure their coverage.

The ways of offline instrumentation and running of the instrumented applications are described in the documentation.

Kover JVM agent

JVM agent is a jar file that modifies the bytecode of loaded into the JVM classes in order to measure coverage. Documentations.

Kover features artifact

A JVM dependency that allows to programmatically instrument class-files on a disk.

Documentation of Kover features artifact

Building locally and Contributing

See Contributing Guidelines.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory