Bug 220812 - [JUnit] JUnit 3 test runner cannot find some tests
Summary: [JUnit] JUnit 3 test runner cannot find some tests
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 14:35 EST by Radim Kubacki CLA
Modified: 2022-12-06 02:38 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.