cargo-llvm-cov vs Kover
cargo-llvm-cov
github.comKover
kotlin.github.ioSide by side
| Figure | cargo-llvm-cov | Kover |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | — |
| macOS | Yes | — |
| Linux | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Test Coverage Tools | 8.1 (#8) | 7.4 (#19) |
| License | The project is available under either the Apache License 2.0 or the MIT License, at the user's option. | The project repository identifies its license as Apache-2.0. |
| Purpose | cargo-llvm-cov is a Cargo subcommand that wraps rustc’s LLVM source-based code coverage instrumentation. | Kover is a set of tools for collecting test coverage of Kotlin code compiled for JVM and Android platforms. |
Plans
In their own words
cargo-llvm-cov
cargo-llvm-cov is a Cargo subcommand that uses rustc’s LLVM source-based instrumentation to generate code coverage reports. It works with cargo test, cargo run, and cargo nextest through a Cargo-compatible command-line interface, and supports proc-macro UI tests. Line and region coverage are available; branch coverage is optional and requires nightly Rust. Doc-test coverage is also optional and requires nightly features. Reports can be generated as text, HTML, JSON, LCOV, Cobertura XML, or Codecov Custom Coverage format. The project provides GitHub Actions examples for uploading reports to Codecov and a GitLab CI example using Cobertura output. LCOV results can be viewed in VS Code with the Coverage Gutters extension. With compatible Clang and LLVM tools configured, the tool can include C and C++ code linked to a Rust library or binary. It supports Linux, macOS, and Windows, and is licensed under either Apache-2.0 or MIT at the user's choice. Installation requires rustc 1.87 or newer, while running it requires Cargo 1.60 or newer. Branch and doc-test coverage are unstable and have known issues, respectively.
Kover
Kover is a free, Apache-2.0-licensed toolkit maintained by Kotlin for measuring test coverage in Kotlin and Java code compiled for JVM and Android targets. It provides Gradle and Maven plugins, a command-line interface, offline instrumentation, a JVM agent, and a features artifact. The Gradle plugin creates HTML and XML reports, supports IC output, and can enforce coverage gates using line, instruction, and branch measurements. It integrates with Kotlin JVM, Kotlin Android, Kotlin Multiplatform, and the com.android.kotlin.multiplatform.library plugins, including mixed Kotlin and Java sources. JaCoCo can replace Kover for measurement and report generation. Android build variants and Android host tests are supported, but instrumented tests on devices are not collected. JavaScript and native targets are outside the Gradle plugin’s support. Requirements include Gradle 6.8.3 or later, JVM 1.7 or later for tests, and Android Gradle Plugin 7.0.0 or later. Class instrumentation during JVM test loading may affect performance or concurrent tests.