Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JUnit Platform] Use EngineDiscoveryRequestResolver #2835

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Dec 16, 2023

🤔 What's changed?

⚡️ What's your motivation?

Fully utilize the EngineDiscoveryRequestResolver API to reduce our own complexity (junit-team/junit5#3705, junit-team/junit5#3718)

🏷️ What kind of change is this?

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

♻️ Anything particular you want feedback on?

📋 Checklist:

  • 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.

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (a6b13a3) 84.99% compared to head (b6ab3cb) 84.86%.

❗ Current head b6ab3cb differs from pull request most recent head b78dac7. Consider uploading reports for the commit b78dac7 to get more accurate results

Files Patch % Lines
...it/platform/engine/CucumberDiscoverySelectors.java 81.25% 9 Missing and 3 partials ⚠️
...ucumber/junit/platform/engine/FeatureResolver.java 95.65% 2 Missing and 3 partials ⚠️
...junit/platform/engine/PackageFilteringVisitor.java 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2835      +/-   ##
============================================
- Coverage     84.99%   84.86%   -0.13%     
+ Complexity     2733     2719      -14     
============================================
  Files           331      334       +3     
  Lines          9557     9569      +12     
  Branches        918      932      +14     
============================================
- Hits           8123     8121       -2     
- Misses         1109     1118       +9     
- Partials        325      330       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mpkorstanje
Copy link
Contributor Author

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, junit-team/junit5#3705, junit-team/junit5#3718) because @SelectClasspathResource will cause an exception to be thrown when used with a non-existing resource.

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.

None yet

1 participant