Skip to content

Skip JUnit Platform reporting when allure-cucumber8-jvm is present - #1499

Merged
baev merged 1 commit into
allure-framework:mainfrom
MohabMohie:fix/1497-cucumber8-junit-platform-exclusion
Nov 4, 2026
Merged

baev merged 1 commit into
allure-framework:mainfrom
MohabMohie:fix/1497-cucumber8-junit-platform-exclusion

Conversation

@MohabMohie

Copy link
Copy Markdown
Contributor

Context

Fixes #1497.

AllureJunitPlatform.shouldSkipReportingFor already skips the cucumber engine when allure-cucumber7-jvm is on the classpath, so the dedicated Cucumber adapter owns those scenarios. After allure-cucumber8-jvm landed, the same double-reporting gap appeared for Cucumber 8: JUnit Platform still wrote empty top-level scenarios beside the real Cucumber 8 results.

Changes

  • Probe io.qameta.allure.cucumber8jvm.AllureCucumber8Jvm the same way as Cucumber 7 and skip the cucumber engine when either adapter is present.
  • Mirror the classpath check in AllureTestNg and AllureJunit4 so the exclusion stays consistent across adapters.
  • Add a test-classpath marker and a focused unit test for the Cucumber 8 skip predicate (same pattern as the existing Karate marker).

Verification

  • ./gradlew :allure-junit-platform:test
  • ./gradlew :allure-junit4:compileJava :allure-testng:compileJava

AllureJunitPlatform already deferred to allure-cucumber7-jvm for the
cucumber engine. Extend the same classpath exclusion to
allure-cucumber8-jvm so Cucumber 8 scenarios are not double-reported,
and mirror the check in the TestNG and JUnit 4 adapters.

Fixes allure-framework#1497
@MohabMohie

Copy link
Copy Markdown
Contributor Author

This repository requires exactly one pr: label for CI. I cannot apply labels from a fork; please add pr:bug when you have a moment (this fixes double-reporting of Cucumber 8 scenarios under allure-junit-platform).

@baev baev added the pr:bug Something isn't working label Nov 4, 2026
@baev
baev merged commit b2258e3 into allure-framework:main Nov 4, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allure-junit-platform missing report exclusion for allure-cucumber8-jvm

2 participants