Repository navigation
feat(cucumber): add JUnit Platform engine support and runner parity (… - #158
Merged
shossain786 merged 1 commit intoOct 18, 2026
Merged
shossain786 merged 1 commit into
shossain786 merged 1 commit into
Conversation
shossain786
added a commit
that referenced
this pull request
Oct 18, 2026
Remove unused variable/imports from the new tests and document the isTestNgExecution heuristic. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
This PR implements Phase 2 of the Cucumber modernization agreed with @shossain786 in #155.
Following the initial compiler warning cleanups in #157 (PR 1), this PR provides first-class support for executing Cucumber scenarios via
cucumber-junit-platform-enginealongside legacy TestNG execution:SkipExceptioncaused scenarios to be marked asFAILED(an unhandled runtime exception) rather than skipped.CucumberHooks: throwsorg.testng.SkipExceptionwhen executing under TestNG andorg.opentest4j.TestAbortedExceptionwhen running under JUnit Platform.SeleniumBootContext.isInitialized()to handle early hook evaluation safely.SeleniumBootLauncherListener.testPlanExecutionStartedto mirrorSuiteExecutionListener.onStart(): initializesApiHealthChecker.clearCache(),PreConditionRegistry.loadAll(), andTestManagementReporter.getInstance().onSuiteStart().AtomicBoolean suiteStartedguards to bothSeleniumBootLauncherListenerandTestManagementReporterto ensure suite start hooks are strictly idempotent if both JUnit extension hooks and launcher listeners fire.docs-site/docs/cucumber.mdwith setup and runner examples for both Option A: JUnit Platform Engine (Recommended) (@Suite,@IncludeEngines("cucumber")) and Option B: TestNG (Legacy / Backwards Compatible).BaseCucumberTest(supported through 3.x, planned for removal in 4.0.0).CucumberQuarantineTesttesting TestNG skip behavior, JUnit Platform abort behavior, and an end-to-end launcher execution test verifying 1 aborted scenario with 0 failures.SeleniumBootLauncherListenerTestcovering lifecycle idempotency and state reset across test plans.Closes #155
Type of change
Checklist
mvn clean verify/mvn test)@SeleniumBootApipublic APIs (or a major version bump is justified below)docs-site/)Notes for reviewers
BaseCucumberTestcontinue to run exactly as before with no changes required.CucumberHooks.isTestNgExecution()inspectsorg.testng.Reporter.getCurrentTestResult() != null. In unit and launcher engine tests, this cleanly distinguishes between TestNG runs and JUnit Platform runs.