Skip to content

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jul 10, 2025

⚡️ What's your motivation?

The SBT JUpiter Interface assumes that all tests are classes but does discovery on the classpath root. As a result, it turns feature names into class selectors. Which doesn't quite work.

Setting cucumber.junit-platform.discovery.as-root-engine to false in junit-platform.properties should ensure Cucumber only discovers tests when called by another engine (e.g. the JUnit Platform Suite Engine) and by pass this behaviour.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

Does this work?

📋 Checklist:

  • Extract constant, document constant.
  • Add workaround to README
  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

The SBT JUpiter Interface assumes that all tests are classes[1] but
does discovery on the classpath root. As a result, it turns feature
names into class selectors. Which doesn't quite work.

Setting `cucumber.junit-platform.discover-as-root-engine=false` should
ensure Cucumber only discovers tests when called by another engine (e.g.
the JUnit Platform Suite Engine) and by pass this behaviour.

sbt/sbt-jupiter-interface#142
@mpkorstanje mpkorstanje changed the title Workaround for discovery with SBT Add cucumber.junit-platform.discovery.as-root-engine Jul 13, 2025
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