RFR: 7903934: Add support for query strings to the IntelliJ plugin [v6]

Jorn Vernee jvernee at openjdk.org
Thu Feb 6 16:58:38 UTC 2025


> 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.
> 
> Here is a picture of what the new configuration UI looks like:
> 
> ![JTReg Configuration UI](https://github.com/user-attachments/assets/4d2ebe45-74ad-4c27-8a91-101238fc6663)
> 
> The 'Query string' field can only be used in combination with the `File` field, and is disabled otherwise.

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  update copyright years

-------------

Changes:
  - all: https://git.openjdk.org/jtreg/pull/240/files
  - new: https://git.openjdk.org/jtreg/pull/240/files/2d138fe3..688a8fb6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jtreg&pr=240&range=05
 - incr: https://webrevs.openjdk.org/?repo=jtreg&pr=240&range=04-05

  Stats: 5 lines in 5 files changed: 0 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jtreg/pull/240.diff
  Fetch: git fetch https://git.openjdk.org/jtreg.git pull/240/head:pull/240

PR: https://git.openjdk.org/jtreg/pull/240


More information about the jtreg-dev mailing list