Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324376

Summary: [JUnit] Multiple occurrences of test classes confuse tree view when running with JUnit4
Product: [Eclipse Project] JDT Reporter: Caspar D. <caspar_d>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, martin.fluegge, saulius.tvarijonas, stepper
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Test project demonstrating the problem none

Description Caspar D. CLA 2010-09-03 01:56:13 EDT
When using the JUnit4 test runner to run a test suite that contains a
few nested test suites, each of which contains the *same* set of test
classes, the JUnit view repeatedly updates the bottom-most occurrences
of the test class elements in the tree view, and fails to update the
other ones when they are executed (which they are).

The problem doesn't occur when using the JUnit3 test runner.

I'll attach a test project demonstrating the problem in a minute.

(In case anyone wonders what the point is of including the same test
classes several times: I configure each instance differently by passing
a config object from the suite that contains them; see forthcoming
attachment.)
Comment 1 Caspar D. CLA 2010-09-03 02:12:20 EDT
Created attachment 178122 [details]
Test project demonstrating the problem

To reproduce the problem, unzip, import the project, select 
zzz.yyy.junit3.AllTests, right-click, "Run as JUnit Test".
Comment 2 Markus Keller CLA 2010-09-03 08:06:58 EDT
That's a deficiency in JUnit 4.

*** This bug has been marked as a duplicate of bug 172256 ***