-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introduce parseable DiscoverySelector representations #3737
Merged
Conversation
This file contains 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
to programmatically create valid selector strings, by creating a selector via DiscoverySelectors.select* and then calling .toSelectorString() to get the serialized version of it.
Previous to this commit, only a minimal subset of characters has been escaped, thus leaving the UniqueId unsafe for use in an url. With the addition of a string representation of selectors based on the URI format, it has become necessary to make UniqueId url-safe. Instead of double-encoding the UniqueId, we make the default `toString()` form URL safe. Still some problems regarding the limits of encoding/decoding
This reverts commit 9eebabd
mpkorstanje
reviewed
Mar 18, 2024
...-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java
Outdated
Show resolved
Hide resolved
marcphilipp
force-pushed
the
leo/discovery-selectors-parse
branch
from
March 22, 2024 15:12
2e8b766
to
252f02f
Compare
@marcphilipp, it looks good, what is missing? Or, are you waiting for me to switch it from draft to rfr? |
@leonard84 Yes, it does look good and I will finish it for 5.11 M2. |
marcphilipp
reviewed
May 1, 2024
junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java
Outdated
Show resolved
Hide resolved
By using the enum singleton pattern.
marcphilipp
force-pushed
the
leo/discovery-selectors-parse
branch
from
May 16, 2024 09:11
d5c98e4
to
0688942
Compare
marcphilipp
reviewed
May 16, 2024
@@ -39,7 +40,9 @@ class TestDiscoveryOptionsMixin { | |||
@ArgGroup(validate = false, order = 2, heading = "%n@|bold SELECTORS|@%n%n") | |||
SelectorOptions selectorOptions; | |||
|
|||
@ArgGroup(validate = false, order = 3, heading = "%n@|bold FILTERS|@%n%n") | |||
@ArgGroup(validate = false, order = 3, heading = "%n For more information on selectors including syntax examples, see" | |||
+ "%n @|underline https://junit.org/junit5/docs/current/user-guide/#running-tests-discovery-selectors|@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
+ "%n @|underline https://junit.org/junit5/docs/current/user-guide/#running-tests-discovery-selectors|@" | |
+ "%n @|underline https://junit.org/junit5/docs/${junit.docs.version}/user-guide/#running-tests-discovery-selectors|@" |
I tried using a dynamic version here but hit remkop/picocli#2281
6 tasks
marcphilipp
approved these changes
May 17, 2024
marcphilipp
changed the title
Add parseable DiscoverySelector representations
Introduce parseable DiscoverySelector representations
May 17, 2024
9 tasks
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.
Overview
Before this PR, it was not possible to use the more advanced
DiscoverySelectors
without writing code. Now, we have a generic way to specify all supportedDiscoverySelectors
as strings and parse them.This will allow advanced usage scenarios. For example, Gradle can add a
Test
task parameter to pass a custom selector directly to the platform. This would allow using theIterationSelector
when delegating to Gradle in IDEA.I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations