-
Notifications
You must be signed in to change notification settings - Fork 109
Copilot/add context menu for disabled tests #2717
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
Closed
carstenartur
wants to merge
25
commits into
eclipse-jdt:master
from
carstenartur:copilot/add-context-menu-for-disabled-tests
Closed
Copilot/add context menu for disabled tests #2717
carstenartur
wants to merge
25
commits into
eclipse-jdt:master
from
carstenartur:copilot/add-context-menu-for-disabled-tests
Conversation
This file contains hidden or 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
* Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.4.0 (#19) * Formaster3 (#20) * Update maven.yml (#9) * Formaster4 (#8) * Create dependabot.yml * Update dependabot.yml * Update dependabot.yml * Update dependabot.yml * Create codacy.yml * Update pom.xml * Bump tycho.version from 2.3.0 to 2.7.3 Bumps `tycho.version` from 2.3.0 to 2.7.3. Updates `tycho-surefire-plugin` from 2.3.0 to 2.7.3 Updates `tycho-source-plugin` from 2.3.0 to 2.7.3 - [Release notes](https://github.com/eclipse/tycho/releases) - [Changelog](https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md) - [Commits](eclipse-tycho/tycho@tycho-2.3.0...tycho-2.7.3) Updates `tycho-p2-plugin` from 2.3.0 to 2.7.3 --- updated-dependencies: - dependency-name: org.eclipse.tycho:tycho-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.tycho:tycho-source-plugin dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.tycho:tycho-p2-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Create codeql.yml * Create maven.yml * Update README.md * Update README.md * Update README.md * Bump tycho.version from 2.7.3 to 2.7.4 Bumps `tycho.version` from 2.7.3 to 2.7.4. Updates `tycho-surefire-plugin` from 2.7.3 to 2.7.4 Updates `tycho-source-plugin` from 2.7.3 to 2.7.4 - [Release notes](https://github.com/eclipse/tycho/releases) - [Changelog](https://github.com/eclipse/tycho/blob/tycho-2.7.4/RELEASE_NOTES.md) - [Commits](eclipse-tycho/tycho@tycho-2.7.3...tycho-2.7.4) Updates `tycho-p2-plugin` from 2.7.3 to 2.7.4 --- updated-dependencies: - dependency-name: org.eclipse.tycho:tycho-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.eclipse.tycho:tycho-source-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.eclipse.tycho:tycho-p2-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump tycho.version from 2.7.4 to 2.7.5 Bumps `tycho.version` from 2.7.4 to 2.7.5. Updates `tycho-surefire-plugin` from 2.7.4 to 2.7.5 Updates `tycho-source-plugin` from 2.7.4 to 2.7.5 - [Release notes](https://github.com/eclipse/tycho/releases) - [Changelog](https://github.com/eclipse-tycho/tycho/blob/tycho-2.7.5/RELEASE_NOTES.md) - [Commits](eclipse-tycho/tycho@tycho-2.7.4...tycho-2.7.5) Updates `tycho-p2-plugin` from 2.7.4 to 2.7.5 --- updated-dependencies: - dependency-name: org.eclipse.tycho:tycho-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.eclipse.tycho:tycho-source-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.eclipse.tycho:tycho-p2-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update README.md * Update maven.yml * Update codeql.yml * Update README.md * Update README.md * Update README.md * Update README.md * Update dependabot.yml Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update maven.yml * Update maven.yml (#10) * Update maven.yml for java 20 (#11) * Update codeql.yml (#12) * Update maven.yml * Update codeql.yml * Update codeql.yml * Bump actions/setup-java from 2 to 4 (#17) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v2...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github/codeql-action from 2 to 3 (#16) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.3.0 (#15) Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 1.1.0 to 4.3.0. - [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases) - [Commits](codacy/codacy-analysis-cli-action@d840f88...5cc54a7) --- updated-dependencies: - dependency-name: codacy/codacy-analysis-cli-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump cirrus-actions/rebase from 1.7 to 1.8 (#14) Bumps [cirrus-actions/rebase](https://github.com/cirrus-actions/rebase) from 1.7 to 1.8. - [Release notes](https://github.com/cirrus-actions/rebase/releases) - [Commits](cirrus-actions/rebase@1.7...1.8) --- updated-dependencies: - dependency-name: cirrus-actions/rebase dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update codeql.yml * Update codacy.yml * Bump actions/checkout from 3 to 4 (#13) * Update codacy.yml --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump stCarolas/setup-maven from 4.5 to 5 (#22) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: carstenartur <[email protected]>
…ze loop Co-authored-by: carstenartur <[email protected]>
Co-authored-by: carstenartur <[email protected]>
…r, improve type safety Co-authored-by: carstenartur <[email protected]>
Co-authored-by: carstenartur <[email protected]>
Co-authored-by: carstenartur <[email protected]>
Co-authored-by: carstenartur <[email protected]>
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.
What it does
Adds a Quick Assist Processor that provides context menu actions to disable and enable JUnit test methods in Eclipse JDT.
Features
Detects JUnit test methods (both JUnit 4 and JUnit 5)
Supports JUnit 5 parameterized tests (@ParameterizedTest)
Supports JUnit 5 repeated tests (@RepeatedTest)
Supports JUnit 5 test factories (@testfactory)
Supports JUnit 5 test templates (https://github.com/testtemplate)
Offers to add @disabled (JUnit 5) or @ignore (JUnit 4) annotations to disable tests
Offers to remove these annotations to enable disabled tests
Automatically handles imports for the annotations
How to Use
Place cursor on a JUnit test method (annotated with @test, @ParameterizedTest, @RepeatedTest, etc.)
Press Ctrl+1 (or Cmd+1 on Mac) to open the Quick Assist menu
Select "Disable test with @disabled" or "Disable test with @ignore"
To enable a disabled test, select "Enable test (remove @disabled)" or "Enable test (remove @ignore)"
Implementation
JUnitQuickAssistProcessor: Detects test methods and provides appropriate proposals
AddAnnotationProposal: Adds @disabled or @ignore annotation to test methods
RemoveAnnotationProposal: Removes @disabled or @ignore annotation from test methods
Registered as a Quick Assist Processor in plugin.xml
All message strings properly externalized in JUnitMessages.properties
Annotation Logic
@disabled is used for JUnit 5 tests (methods annotated with org.junit.jupiter.api.Test, @ParameterizedTest, @RepeatedTest, @testfactory, or @testtemplate)
@ignore is used for JUnit 4 tests (methods annotated with org.junit.Test)
How to test
Add @disabled to JUnit 5 test
Remove @disabled from JUnit 5 test
Add @ignore to JUnit 4 test
Remove @ignore from JUnit 4 test
No proposals for non-test methods
Add @disabled to parameterized test (@ParameterizedTest)
Add @disabled to repeated test (@RepeatedTest)
Author checklist