SupercovCompare
← All comparisons

Kotlin · Comparison

Kotlin coverage: Kover, JaCoCo, and Supercov

Compare Kover, JaCoCo and Supercov for Kotlin: Gradle reports and verification, per-test coverage for Kotest and Spock, MC/DC and assertion coverage.

Kover vs JaCoCo vs Supercov

Start with Kover if your Kotlin project builds with Gradle: it is the Kotlin team’s own coverage plugin. JaCoCo is the long-standing JVM option. Supercov measures per test and adds MC/DC and assertion coverage.

Coverage features
FeatureKover0.9.9JaCoCo0.8.15Supercov2.0.0
Code quality scoringNot built inNot built inSupported
Security reviewNot built inNot built inSupported
Line coverageSupportedSupportedSupported
Branch coverageSupportedSupportedSupported
MC/DCNot built inNot built inSupported
Per-test coverageNot built inNot built inSupported
Assertion coverageNot built inNot built inSupported
ReportsSupportedSupportedSupported

✓ Supported · × Not built in. Standard coverage workflows in the versions shown; custom plugins are outside this table.

Supercov measures Kotlin through the same JVM path as Java, taking test identity from the framework’s own lifecycle, so Kotest and Spock tests keep the names they report. A condition that also narrows a type carries no MC/DC obligation, and the run names every such case.

Kover measures with its own coverage library by default and can switch to JaCoCo. Both report line and branch coverage per run; neither computes MC/DC or per-test coverage.

Per-test coverage means individual tests, not just test files. Supercov needs a supported runner. Assertion coverage links source to checked properties through agent review; it is not a mutation score or a correctness guarantee. Security review comes from Supercov’s Jev checks; reports means a browsable HTML report from the tool itself.

Kover: Gradle tasks and its own agent

Kover instruments bytecode with its own coverage library by default. The Gradle plugin reports lines by default, and instructions or branches when you ask:

./gradlew koverHtmlReport
./gradlew koverXmlReport
./gradlew koverVerify

The XML report is JaCoCo-compatible, so CI tools that read JaCoCo read it too, and koverVerify fails the build below the bounds you configure. useJacoco() switches the engine to JaCoCo, with fewer filters available. Either way the report covers the run, not each test.

JaCoCo on Kotlin

JaCoCo’s Gradle plugin works on Kotlin as on Java:

./gradlew test jacocoTestReport

It counts bytecode, and its counters are the same as for Java: instructions, branches, lines, methods and classes. Neither JaCoCo nor Kover computes MC/DC or per-test coverage.

What Supercov adds

With JDK 17 or newer and Gradle:

brew install supercorp-ai/tap/supercov
supercov -- ./gradlew test
supercov runs latest gaps

Supercov measures Kotlin through the same JVM path as Java. It takes test identity from the framework’s own lifecycle, so Kotest and Spock tests keep the names they report, and each covered line is tied to the tests that ran it.

For MC/DC it observes each condition in a decision. The one exception is a condition the compiler also reads: x is String or x != null narrows the type for the code beneath it, and wrapping it to watch its operands would stop the code compiling. Supercov leaves such an if as written, records which way it went from inside its arms, and gives it no MC/DC obligation. The run names every such case instead of skipping it silently. Assertion coverage then shows which statements a passing test actually checks. The Kotlin guide has the setup and a runnable example.

Keep Kover for its Gradle integration and reports. Use Supercov when you, or your coding agent, need per-test evidence and the missing conditions and checks named. None of these scores proves the program correct.

Feature sources