Installation
ReqCover 0.0.12 is published to GitHub Packages; this page shows how to configure the repository and which modules to add.
Get a token for GitHub Packages
Section titled “Get a token for GitHub Packages”ReqCover is published to https://maven.pkg.github.com/reqcover/reqcover. It is not on Maven Central.
GitHub Packages requires authentication even for public packages: you need your GitHub username and a personal access token (classic) with the read:packages scope.
Configure the repository in Gradle
Section titled “Configure the repository in Gradle”In build.gradle.kts:
repositories { mavenCentral() maven("https://maven.pkg.github.com/reqcover/reqcover") { credentials { username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR") password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN") } }}Put the credentials in ~/.gradle/gradle.properties (never in the project):
gpr.user=your-github-usernamegpr.key=ghp_your_tokenWithout these properties, Gradle falls back to the GITHUB_ACTOR and GITHUB_TOKEN environment variables.
Configure the repository in Maven
Section titled “Configure the repository in Maven”In pom.xml:
<repositories> <repository> <id>github</id> <url>https://maven.pkg.github.com/reqcover/reqcover</url> </repository></repositories>In ~/.m2/settings.xml, add a server with the same id, github:
<settings> <servers> <server> <id>github</id> <username>your-github-username</username> <password>ghp_your_token</password> </server> </servers></settings>Choose the modules
Section titled “Choose the modules”Add one engine for your test framework, at least one requirements source, and one or more reporters. All modules use the group dev.reqcover.
| Module | Role | Notes |
|---|---|---|
reqcover-engine-junit-jupiter |
Engine for JUnit Jupiter (JUnit 5 and 6) | Registers itself with the JUnit Platform |
reqcover-engine-testng |
Engine for TestNG | Registers itself with TestNG |
reqcover-engine-cucumber |
Engine for Cucumber 7 and 8 (tested 7.31.0, 8.0.4) | Registered with cucumber.plugin |
reqcover-source-openapi |
Reads requirements from OpenAPI documents | See Requirement sources |
reqcover-reporter-html |
Writes requirements-coverage.html |
See Reporters |
reqcover-reporter-xml |
Writes requirements-coverage.xml |
See Reporters |
Each engine brings reqcover-core (the @ForRequirement annotation) and reqcover-engine with it.
Add the dependencies
Section titled “Add the dependencies”Gradle resolves the Kotlin Multiplatform modules by their plain names. Maven needs the JVM artifacts, which have a -jvm suffix.
| Gradle | Maven |
|---|---|
reqcover-engine-junit-jupiter |
reqcover-engine-junit-jupiter-jvm |
reqcover-engine-testng |
reqcover-engine-testng-jvm |
reqcover-engine-cucumber |
reqcover-engine-cucumber-jvm |
reqcover-source-openapi |
reqcover-source-openapi-jvm |
reqcover-reporter-html |
reqcover-reporter-html-jvm |
reqcover-reporter-xml |
reqcover-reporter-xml-jvm |
Gradle (Kotlin DSL):
dependencies { testImplementation("dev.reqcover:reqcover-engine-junit-jupiter:0.0.12") // or -engine-testng, -engine-cucumber testImplementation("dev.reqcover:reqcover-source-openapi:0.0.12") testImplementation("dev.reqcover:reqcover-reporter-html:0.0.12") testImplementation("dev.reqcover:reqcover-reporter-xml:0.0.12")}Maven:
<dependencies> <dependency> <groupId>dev.reqcover</groupId> <artifactId>reqcover-engine-junit-jupiter-jvm</artifactId> <!-- or -engine-testng-jvm, -engine-cucumber-jvm --> <version>0.0.12</version> <scope>test</scope> </dependency> <dependency> <groupId>dev.reqcover</groupId> <artifactId>reqcover-source-openapi-jvm</artifactId> <version>0.0.12</version> <scope>test</scope> </dependency> <dependency> <groupId>dev.reqcover</groupId> <artifactId>reqcover-reporter-html-jvm</artifactId> <version>0.0.12</version> <scope>test</scope> </dependency> <dependency> <groupId>dev.reqcover</groupId> <artifactId>reqcover-reporter-xml-jvm</artifactId> <version>0.0.12</version> <scope>test</scope> </dependency></dependencies>If no reporter is on the classpath, ReqCover prints No reporter configured. Please add a RequirementsCoverageReporter implementation to the classpath. and still checks the coverage.
Upgrade from 0.0.9 or earlier
Section titled “Upgrade from 0.0.9 or earlier”Version 0.0.10 renamed reqcover-junit-jupiter to reqcover-engine-junit-jupiter (Maven: reqcover-engine-junit-jupiter-jvm) and removed the reqCover.requirementsUri setting.
Follow the migration guide when you upgrade.
Next steps
Section titled “Next steps”- Getting Started: a first coverage gate in five minutes
- JUnit, TestNG, Cucumber, Maven guides
- Configuration: all settings