FAQ
Does ReqCover replace code coverage tools like JaCoCo?
Section titled “Does ReqCover replace code coverage tools like JaCoCo?”No. Code coverage measures which lines your tests execute. ReqCover measures which requirements your tests verify - a test suite can have 100% line coverage and 0% requirements coverage if it never asserts anything meaningful about the behavior a requirement describes. The two are complementary.
What counts as “covered”?
Section titled “What counts as “covered”?”A requirement is covered when a test annotated @ForRequirement("id") for that ID passes. A failing,
erroring, or skipped test does not count - see Core Concepts.
What languages does ReqCover support?
Section titled “What languages does ReqCover support?”Any JVM language whose tests run on JUnit 5 Jupiter - Java, Kotlin, Scala, and Groovy are all common choices.
reqcover-core’s annotations are defined in Kotlin Multiplatform, so non-JVM targets are technically possible
in the future, but the engine, listener, sources, and reporters are JVM-only today.
Do I have to use OpenAPI as my requirements source?
Section titled “Do I have to use OpenAPI as my requirements source?”No - reqcover-source-openapi is the one source ReqCover ships, but RequirementsSource is a public SPI. See
Requirements Sources for how to write one against a plain requirement list, a different spec
format, or an export from a requirements-management tool.
What happens if I annotate a test with a requirement ID that isn’t in my requirements source?
Section titled “What happens if I annotate a test with a requirement ID that isn’t in my requirements source?”It shows up in unexpectedRequirements() and in the “unexpected” section of both built-in reporters. It won’t
fail the build by itself, but it’s usually a sign of a typo in the ID or a stale reference to a requirement
that was removed from the spec.
Can I use ReqCover without failing the build on low coverage?
Section titled “Can I use ReqCover without failing the build on low coverage?”Yes - set reqCover.failIfBelowMinimum=false. ReqCover will still log and report the shortfall; it just won’t
exit with a non-zero status. See Configuration Reference.
Where are the coverage reports written?
Section titled “Where are the coverage reports written?”build/reports/tests/reqcover/requirements-coverage.html and .xml, relative to the working directory the
test JVM was started in - see Reporters.