Documentation
Kotlin test coverage
Set up Supercov with your agent, or run it yourself with Gradle.
Ask your coding agent to set up Supercov in your project:
Install Supercov with brew install supercorp-ai/tap/supercov, or take the
platform archive from the GitHub release. Read supercov docs and check the
supported JDK before running our existing Gradle tests. Show the coverage
report and any measurement limits. Don't change application code or tests.Run it yourself
Kotlin support requires a JDK 17 or newer with Gradle or Maven. Kotlin has no package registry of its own here, so the project takes the binary directly:
brew install supercorp-ai/tap/supercov
supercov --version
npx supercov works where Node.js is already present, and the platform
archives on the latest release
carry the same build at the same version.
Run your tests
From your project root:
supercov -- ./gradlew test
Keep the flags your build normally uses. Supercov drives Gradle as your test
command rather than as a plugin: it adds the JUnit Platform launcher it needs
to the build file inside its own isolated workspace copy, so your
build.gradle.kts is never edited.
Kotest and Spock run on the JUnit Platform, so Supercov measures them the same way it measures JUnit 5 and TestNG.
Inspect the run:
supercov runs latest
supercov runs latest gaps --limit 5Check what the tests assert
Line coverage tells you a statement ran. It does not tell you that a test
checked the result. Supercov can ask Jev whether each test would fail if a
statement it ran changed. runs latest assertions assess saves the answers
(it needs TYPESAFE_API_KEY), and runs latest assertions then lists the
statements no test checks, file by file. A statement that is not asserted
runs in some test, but nothing that test checks depends on it. See
Assertion coverage.
Kotlin-specific limits
Supercov measures the classes your build compiles for the test run. Inline functions and generated sources have measurement limits of their own. See runner support for the detail available from each engine.
Already using Kover or JaCoCo? See how the reports differ.
supercov docs coverage-model prints the guide for your installed version.