Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions allure-cucumber8-jvm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# allure-cucumber8-jvm

Cucumber JVM 8 plugin for Allure Java.

Use this module when your BDD tests run on Cucumber JVM 8 and you want features, scenarios, hooks, steps, tags, attachments, and examples to appear in Allure Report.

This adapter mirrors `allure-cucumber7-jvm` and reads Gherkin line numbers from the Cucumber 8 messages API. `Location.getLine()` is a Java `int` there. Bytecode compiled against the cucumber 7 `Long getLine()` descriptor throws `NoSuchMethodError` on this runtime.

## Supported Versions

- Allure Java 3.x requires Java 17 or newer.
- This module targets Cucumber JVM 8.x.
- The test suite validates against Cucumber JVM 8.0.4.

## Installation

Gradle:

```kotlin
dependencies {
testImplementation(platform("io.qameta.allure:allure-bom:<allure-version>"))
testImplementation("io.qameta.allure:allure-cucumber8-jvm")
}
```

Maven, with `allure-bom` imported in dependency management:

```xml
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber8-jvm</artifactId>
<scope>test</scope>
</dependency>
```

## Setup

Register the plugin with Cucumber:

```java
@CucumberOptions(plugin = "io.qameta.allure.cucumber8jvm.AllureCucumber8Jvm")
```

You can also pass the plugin through your Cucumber runner or build tool configuration.

## Report Output

- Features, scenarios, scenario outlines, examples, hooks, and steps.
- Cucumber attachments and write events.
- Labels, links, parameters, status, and status details from tags and annotations.
30 changes: 30 additions & 0 deletions allure-cucumber8-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
description = "Allure CucumberJVM 8.0"

val cucumberVersion = "8.0.4"

dependencies {
implementation("org.slf4j:slf4j-api")
api(project(":allure-java-commons"))
compileOnly(platform("io.cucumber:cucumber-bom:$cucumberVersion"))
compileOnly("io.cucumber:cucumber-plugin")
compileOnly("io.cucumber:gherkin")
testImplementation("commons-io:commons-io")
testImplementation(platform("io.cucumber:cucumber-bom:$cucumberVersion"))
testImplementation("io.cucumber:cucumber-core")
testImplementation("io.cucumber:cucumber-java")
testImplementation("io.cucumber:gherkin")
testImplementation("io.github.glytching:junit-extensions")
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.slf4j:slf4j-simple")
testImplementation(project(":allure-assertj"))
testImplementation(project(":allure-java-commons-test"))
testImplementation(project(":allure-junit-platform"))
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

tasks.test {
useJUnitPlatform()
systemProperty("allure.test.cucumber.version", cucumberVersion)
}
Loading