Java · Kotlin · Scala · Groovy - anything on JUnit 5 Jupiter
Your tests already say which requirement they verify.
ReqCover just counts them.
Tag a test with @ForRequirement("#reqId"), point ReqCover at a requirements source, and it tells you - every build - which requirements are covered, which are missing, and which tests verify something that isn't a requirement at all.
$ ./gradlew test # ReqCover auto-registers via the JUnit Platform Launcher - no test code changes All requirements are covered by tests. Requirements coverage: 2 out of 2 = 100.0%
Characteristics
| Sym | Parameter | Description |
|---|---|---|
| ANNOT | Annotation-driven | @ForRequirement("#reqId") on any JUnit 5 test method - repeatable, so one test can verify several requirements. |
| SRC | Requirements sources | Pluggable RequirementsSource SPI. Ships an OpenAPI source that derives requirement IDs from operationId and x-requirements. |
| GATE | Coverage gate | reqCover.minimumRequiredCoveragePercent fails the build when coverage drops below your threshold. |
| REPORT | Reporters | Pluggable RequirementsCoverageReporter SPI. Ships HTML and XML reporters, written under build/reports/tests/reqcover/. |
| AUTO | Zero-config wiring | Registers itself as a JUnit Platform TestExecutionListener via ServiceLoader - add the dependency, nothing else. |
| JVM | JVM languages | Java, Kotlin, Scala, Groovy - anything that runs its tests on JUnit 5 Jupiter. |
Quick start
testRuntimeOnly("dev.reqcover:reqcover-junit-jupiter:0.0.9")
testRuntimeOnly("dev.reqcover:reqcover-reporter-html:0.0.9")No listener registration, no test-runner wiring - the JUnit Platform Launcher discovers ReqCover via ServiceLoader the moment it's on the test classpath. Full setup and requirements-source config: Installation.
ReqCover is built as small, composable modules on top of a common engine - a coverage tracker, a requirements-source SPI, and a reporter SPI. Bring your own source (a spec, a ticket tracker export, a plain list) or reporter; the built-in OpenAPI source and HTML/XML reporters are just the first implementations.