Support running tests from abstract classes by selecting concrete subclasses#235
Conversation
…tract class - Implemented `SearchTools.findConcreteSubclasses(IType)` to retrieve non-abstract implementations of a type. - Enhanced `RunTestsActionExecutor` to automatically resolve or prompt for concrete subclasses when test execution is triggered from an abstract class or its CUT. - Added "All concrete subclasses" option to the selection dialog. - Updated `JUnitTestSelectionLaunchConfigurationDelegate` to support granular `IMember` execution (types or methods). - Added JUnit tests for subclass resolution logic. - Enhanced test infrastructure to support interface definitions in `@Project` annotations. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR adds support for running tests from abstract classes. When a user tries to run tests in an abstract class (or from its corresponding Class Under Test), MoreUnit now:
This is particularly useful for test patterns where an abstract base class contains shared tests that are executed in different contexts by concrete subclasses (e.g., browser-specific tests or database-specific tests).
Changes:
SearchTools.findConcreteSubclassesutility.RunTestsActionExecutorto integrate the resolution logic.JUnitTestSelectionLaunchConfigurationDelegateto handle specificIMemberinstances, enabling method-level execution in subclasses.SearchToolsTestand updated test framework dependencies to support the new test scenarios.PR created automatically by Jules for task 2315245454879716993 started by @RoiSoleil