| Summary: | [JUnit] exception in suite method causes fallback to default suite | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | T. Orf <t.orf> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | kalyan_prasad, martinae, t.orf |
| Version: | 3.3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. Still happening in Eclipse 2019-12 (4.14.0, Build id: 20191212-1212) with the JUnit 3 runner. However, the JUnit 4 runner handles it correctly and is chosen by default when creating the run configuration with: class context menu -> Run as... -> JUnit Test. Therefore, this bug has become much less relevant. 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. (In reply to T. Orf from comment #2) > Still happening in Eclipse 2019-12 (4.14.0, Build id: 20191212-1212) with > the JUnit 3 runner. > > However, the JUnit 4 runner handles it correctly and is chosen by default > when creating the run configuration with: class context menu -> Run as... -> > JUnit Test. Therefore, this bug has become much less relevant. Closing this bug based on above comment as this is much less relevant with Junit 4 and Junit 5 runners now available. |
Overview: If a JUnit suite method does not return normally, the default suite is executed instead. Steps To Reproduce: 1. Create the following TestCase: public class ExceptionInSuiteTest extends junit.framework.TestCase { public ExceptionInSuiteTest(String name) { super(name); } public void test1() { System.out.println("test1"); } public void test2() { System.out.println("test2"); } public static junit.framework.Test suite() { throw new IllegalArgumentException(); } } 2. Run it with the JUnit 3 Runner. Actual results: The default suite (test1 and test2) is executed and the status bar in the JUnit view is green. Expected results: The status bar should be red. test1 and test2 should not be executed. A stack trace of the IllegalArgumentException should be available (maybe as a single pseudo-test displayed with status Error and that exception as its Failure Trace). Eclipse 3.3.1.1 Build M20071023-1652 on Windows XP 2002 SP2