Skip to content

feat: bypass Surefire, run Cucumber CLI directly for specific scenarios - #5

Merged
arun279 merged 3 commits into
mainfrom
feat/cucumber-cli-execution
Apr 14, 2026
Merged

feat: bypass Surefire, run Cucumber CLI directly for specific scenarios#5
arun279 merged 3 commits into
mainfrom
feat/cucumber-cli-execution

Conversation

@arun279

@arun279 arun279 commented Apr 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • For specific scenarios: compile with mvn test-compile, then run io.cucumber.core.cli.Main directly (same approach as IntelliJ)
  • For "Run All": unchanged, still uses mvn test -Dtest=RunnerClass
  • Deletes broken Surefire engine filtering code (v0.1.1–v0.1.3 all failed because -D properties don't reach Surefire's forked JVM)
  • Bumps version to 0.2.0

Why Surefire didn't work

System properties like -Dcucumber.features and -Dcucumber.plugin are not forwarded to Surefire's forked JVM in the user's project configuration. Three attempts with different -D flags all produced 0 tests and no JSON results file.

Test plan

  • Install extension on Windows machine with test project
  • Run a specific scenario → should compile, then run Cucumber CLI, then show results
  • Run All → should still use mvn test
  • Debug a specific scenario → JDWP agent on Java process, debugger attaches

arun279 added 3 commits April 14, 2026 00:05
Surefire's forked JVM does not receive -D system properties like
cucumber.features and cucumber.plugin, causing 0 tests and no results
across three attempts (v0.1.1-v0.1.3).

For specific scenarios, compile with Maven then invoke
io.cucumber.core.cli.Main directly -- same approach as IntelliJ.
"Run All" stays on Surefire unchanged.
@arun279
arun279 merged commit 6966e8b into main Apr 14, 2026
1 check passed
@arun279
arun279 deleted the feat/cucumber-cli-execution branch April 14, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant