gcov vs Kover
gcov
gcc.gnu.orgKover
kotlin.github.ioSide by side
| Figure | gcov | 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.5 (#5) | 7.4 (#19) |
| Purpose | gcov is a test coverage program used with GCC to find untested parts of programs and guide code optimization. | Kover is a set of tools for collecting test coverage of Kotlin code compiled for JVM and Android platforms. |
| Support | The GCC project directs users to its manuals and the gcc-help mailing list for usage questions. | The repository links to contributing guidelines and a code of conduct. |
Plans
In their own words
gcov
gcov is a free test coverage tool used with GCC to show how program code runs during testing. It reports which source lines execute and how often, producing per-line counts in `.gcov` files. Reports can include line, function, branch, condition, prime-path, and basic-block coverage. Options can report branch frequencies, show whether conditions independently affect a Boolean expression’s result, or filter reports to functions matching regular expressions. Output is available as `.gcov` text or gzip-compressed JSON; JSON generation does not require source code. The GCC documentation also describes using gcov with gprof to assess computing time, while warning that optimization can combine source lines and reduce hotspot detail. Before coverage reporting, programs must be compiled with GCC’s `--coverage` option. gcov works only with GCC-compiled code and is not compatible with other profiling or test coverage mechanisms. It runs on Linux, macOS, and Windows, supports the listed languages from C and C++ to Ada, D, and Go, and is self-hosted.
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.