7903934: Add support for query strings to the IntelliJ plugin #240
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.
This patch adds support for JTReg query strings to the IntelliJ plugin. Query strings can be used to run individual test methods in JUnit and TestNG tests, and nested test classes (
@Nested
) in JUnit tests. When creating a run configuration from an element in a source file, e.g. by clicking on the little green 'play' button in the margin, the plugin will automatically compute a query string to run that element (if it knows how to).One issue I faced when implementing this, is that the IntelliJ type API
PsiType
does not have a way to retrieve the binary name of that type, which is required to run JUnit tests that have parameters. So, I had to manually implement this. You'll see this back in the code.I've tested this by creating and running a variety of configurations for different test methods, accepting different parameter types, as well as running
@Nested
test classes.Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jtreg.git pull/240/head:pull/240
$ git checkout pull/240
Update a local copy of the PR:
$ git checkout pull/240
$ git pull https://git.openjdk.org/jtreg.git pull/240/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 240
View PR using the GUI difftool:
$ git pr show -t 240
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jtreg/pull/240.diff
Using Webrev
Link to Webrev Comment