cucumber-jvm icon indicating copy to clipboard operation
cucumber-jvm copied to clipboard

[JUnit Platform] Use EngineDiscoveryRequestResolver

Open mpkorstanje opened this issue 1 year ago • 2 comments

🤔 What's changed?

⚡️ What's your motivation?

Fully utilize the EngineDiscoveryRequestResolver API to reduce our own complexity (https://github.com/junit-team/junit5/pull/3705, https://github.com/junit-team/junit5/pull/3718)

🏷️ What kind of change is this?

  • :bank: Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • [x] 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.

mpkorstanje avatar Dec 16 '23 23:12 mpkorstanje

Codecov Report

Attention: Patch coverage is 91.81034% with 19 lines in your changes missing coverage. Please review.

Project coverage is 84.86%. Comparing base (6549826) to head (b6ab3cb). Report is 33 commits behind head on main.

:exclamation: Current head b6ab3cb differs from pull request most recent head 294d880

Please upload reports for the commit 294d880 to get more accurate results.

Files Patch % Lines
...it/platform/engine/CucumberDiscoverySelectors.java 81.25% 9 Missing and 3 partials :warning:
...ucumber/junit/platform/engine/FeatureResolver.java 95.65% 2 Missing and 3 partials :warning:
...junit/platform/engine/PackageFilteringVisitor.java 81.81% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2835      +/-   ##
============================================
+ Coverage     84.80%   84.86%   +0.06%     
+ Complexity     2728     2719       -9     
============================================
  Files           331      334       +3     
  Lines          9428     9569     +141     
  Branches        902      932      +30     
============================================
+ Hits           7995     8121     +126     
- Misses         1111     1118       +7     
- Partials        322      330       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 17 '23 00:12 codecov[bot]

The current implementation of the JUnit Platform Engine treats @SelectClasspathResource aimed at directories as if all resources in that directory should be considered. This is not the intended usage, for this @SelectPackages should be used.

Cucumbers documentation consistently uses @SelectClasspathResource.

This will become a problem if/when we start to use the EngineDiscoveryRequestResolver with (#2835, https://github.com/junit-team/junit5/pull/3705, https://github.com/junit-team/junit5/pull/3718) because @SelectClasspathResource will cause an exception to be thrown when used with a non-existing resource.

mpkorstanje avatar Mar 08 '24 20:03 mpkorstanje