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

7903934: Add support for query strings to the IntelliJ plugin #240

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JornVernee
Copy link
Member

@JornVernee JornVernee commented Jan 10, 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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • CODETOOLS-7903934: Add support for query strings to the IntelliJ plugin (Enhancement - P4)

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 10, 2025

👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jan 10, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@JornVernee JornVernee changed the title Add support for running individual test methods to the IntelliJ plugin Add support for query strings to the IntelliJ plugin Jan 13, 2025
@JornVernee JornVernee changed the title Add support for query strings to the IntelliJ plugin 7903934: Add support for query strings to the IntelliJ plugin Jan 21, 2025
@JornVernee JornVernee marked this pull request as ready for review January 21, 2025 13:11
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 21, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 21, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant