Skip to content

Installation

ReqCover is split into small modules under the dev.reqcover group, published from the reqcover/reqcover monorepo. Add only what you need.

Module Purpose
reqcover-core The @ForRequirement and @RequirementsSource annotations. Kotlin Multiplatform (JVM today; iOS targets exist in the build for future use).
reqcover-engine The RequirementsCoverageTracker, plus the RequirementsSource and RequirementsCoverageReporter SPIs and their ServiceLoader-based lookup.
reqcover-junit-jupiter The RequirementsCoverageListener - a JUnit Platform TestExecutionListener that wires the tracker into a real test run. This is the module most projects depend on directly.
reqcover-reporter-html Writes build/reports/tests/reqcover/requirements-coverage.html.
reqcover-reporter-xml Writes build/reports/tests/reqcover/requirements-coverage.xml.
reqcover-source-openapi A RequirementsSource that reads requirement IDs out of an OpenAPI 3.x document.
dependencies {
testRuntimeOnly("dev.reqcover:reqcover-junit-jupiter:0.0.9")
// Pick one or more reporters
testRuntimeOnly("dev.reqcover:reqcover-reporter-html:0.0.9")
testRuntimeOnly("dev.reqcover:reqcover-reporter-xml:0.0.9")
// If your requirements source is OpenAPI
testRuntimeOnly("dev.reqcover:reqcover-source-openapi:0.0.9")
}

All four artifacts are runtimeOnly because ReqCover attaches itself via ServiceLoader discovery - your test code only needs a compile-time dependency on reqcover-core for the @ForRequirement annotation:

dependencies {
testImplementation("dev.reqcover:reqcover-core:0.0.9")
}
<dependency>
<groupId>dev.reqcover</groupId>
<artifactId>reqcover-core</artifactId>
<version>0.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dev.reqcover</groupId>
<artifactId>reqcover-junit-jupiter</artifactId>
<version>0.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dev.reqcover</groupId>
<artifactId>reqcover-reporter-html</artifactId>
<version>0.0.9</version>
<scope>test</scope>
</dependency>

ReqCover’s build publishes to GitHub Packages (and GitLab’s Maven registry, when built there) rather than to Maven Central. Check the releases on GitHub for the current version and repository coordinates before wiring up a new project.

  • JUnit 5 Jupiter (junit-jupiter-engine) and the JUnit Platform Launcher - both are already on your classpath if you’re using Gradle’s test task or Maven Surefire with JUnit 5.
  • ReqCover itself is built with JDK 21 (see the project’s jitpack.yml); check its release notes for the minimum JDK it supports at runtime.