Bug 220812

Summary: [JUnit] JUnit 3 test runner cannot find some tests
Product: [Eclipse Project] JDT Reporter: Radim Kubacki <radim.kubacki>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Radim Kubacki CLA 2008-02-28 14:35:38 EST
Have a class like this:

public class AllTests extends TestSuite {

  public static TestSuite suite() {
    ...

Eclipse will not be able to execute its tests and will show an error message "No tests found with test runner JUnit 3". This is because of implementation of TestSearchEngine.findSuiteMethods that looks for 'suite() Test' and ignores this method that returns TestSuite (implements Test) accepted by JUnit test runner.
Comment 1 Martin Aeschlimann CLA 2008-02-29 07:00:25 EST
Really? All these years I didn't know this.

As this is very rare and would take extra computation costs: No action planed at the moment. Can you change your code to 'Test'?
Comment 2 Radim Kubacki CLA 2008-11-05 20:18:04 EST
Re changing: I have several hundred occurences of this pattern across the codebase.

Re computational cost: you can consider running the extra search only if the first one fails (though it is an ugly solution).
Comment 3 Eclipse Genie CLA 2020-08-31 18:31:55 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2022-12-06 02:38:29 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.