Skip to content

Improve interface and implementation support in jump actions#236

Merged
RoiSoleil merged 4 commits into
masterfrom
support-testing-against-interfaces-18132929899494660556
Apr 24, 2026
Merged

Improve interface and implementation support in jump actions#236
RoiSoleil merged 4 commits into
masterfrom
support-testing-against-interfaces-18132929899494660556

Conversation

@RoiSoleil

Copy link
Copy Markdown
Contributor

The "Jump to Test/Code" functionality in MoreUnit now better supports interfaces and their implementations.

Key changes:

  1. Supertypes Search: When searching for tests for a class, MoreUnit now also considers tests for its superclasses and interfaces (excluding java.lang.*). This allows jumping from a class like FooImpl to FooTest if FooImpl implements Foo.
  2. Implementation Discovery: When searching for the code under test from a test class, MoreUnit now includes concrete implementations of any matched interface or abstract class.
  3. Refined UX for Interfaces: To avoid jumping to "empty" interfaces when concrete code exists, MoreUnit will now exclude interfaces or abstract classes from the jump targets if:
    • At least one concrete implementation was found.
    • The interface/abstract class itself contains no non-abstract methods (e.g., no default methods in an interface).
  4. Unit Tests: Added InterfaceCorrespondingTypeSearcherTest to verify these navigation scenarios.

PR created automatically by Jules for task 18132929899494660556 started by @RoiSoleil

- Enhanced CorrespondingTypeSearcher to look for tests of supertypes and implementations.
- Included concrete implementations in the results when an interface/abstract class is matched.
- Excluded 'pure' interfaces/abstract classes from results when concrete implementations are found, unless they have default methods or non-abstract methods.
- Added comprehensive tests in InterfaceCorrespondingTypeSearcherTest.

Closes #205

Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@RoiSoleil RoiSoleil left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

google-labs-jules Bot and others added 3 commits April 23, 2026 13:17
- Enhanced CorrespondingTypeSearcher to look for tests of supertypes and implementations.
- Included concrete implementations in the results when an interface/abstract class is matched.
- Excluded 'pure' interfaces/abstract classes from results when concrete implementations are found, unless they have default methods or non-abstract methods.
- Optimized subclass search in SearchTools to use SearchEngine instead of full hierarchy.
- Added comprehensive tests in InterfaceCorrespondingTypeSearcherTest.

Closes #205

Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
- Enhanced CorrespondingTypeSearcher to look for tests of supertypes and implementations.
- Included concrete implementations in the results when an interface/abstract class is matched.
- Excluded 'pure' interfaces/abstract classes from results when concrete implementations are found, unless they have default methods or non-abstract methods.
- Refined TypeHierarchy usage to avoid compilation issues and improve reliability.
- Added comprehensive tests in InterfaceCorrespondingTypeSearcherTest.

Closes #205

Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
@RoiSoleil RoiSoleil merged commit 0e02bde into master Apr 24, 2026
5 checks passed
@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@538b845). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             master   #236   +/-   ##
=======================================
  Coverage          ?      0           
=======================================
  Files             ?      0           
  Lines             ?      0           
  Branches          ?      0           
=======================================
  Hits              ?      0           
  Misses            ?      0           
  Partials          ?      0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RoiSoleil RoiSoleil deleted the support-testing-against-interfaces-18132929899494660556 branch April 24, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant