Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317313 - [junit] view does not display multiples tests with the same name correctly
Summary: [junit] view does not display multiples tests with the same name correctly
Status: CLOSED DUPLICATE of bug 172256
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 12:04 EDT by John Dean CLA
Modified: 2010-06-18 12:11 EDT (History)
1 user (show)

See Also:


Attachments
Show mal-formed junit results (90.04 KB, application/pdf)
2010-06-18 12:04 EDT, John Dean CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Dean CLA 2010-06-18 12:04:01 EDT
Build Identifier: 

When two test classes are run back-to-back then all of the results for all of the tests with the same name show up in the last test of that grouping.

We have been experimenting with new test drivers which can be the same test run over and over again but with different data points, but the junit test results in the Junit view are hard to interpret.  

The only known workaround is to insert a dummy test between test duplicates which does have the fringe benefit of artificially raising test case numbers, but can be cumbersome to catch all instances.

Reproducible: Always

Steps to Reproduce:
Compile and run this Junit4 test:

If the results look like the attached picture, then BUG

package junitview.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.nokia.carbide.automation.debug.test.blackflag.JunitViewTest.TestDriver;

import static org.junit.Assert.assertEquals;


@RunWith(Suite.class)
@SuiteClasses( { TestDriver.class, TestDriver.class, TestDriver.class, TestDriver.class } )
public class JunitViewTest {

	protected static int count = 0;
	
	public static class TestDriver {
		@Test
		public void runTest() {
			assertEquals(2, count++);
		}
	}
	
}
Comment 1 John Dean CLA 2010-06-18 12:04:44 EDT
Created attachment 172228 [details]
Show mal-formed junit results
Comment 2 John Dean CLA 2010-06-18 12:07:16 EDT
Sorry, forgot to include the Eclipse build number.  Last seen on Eclipse 3.6 RC4 Build id: I20100603-1500
Comment 3 Markus Keller CLA 2010-06-18 12:11:23 EDT

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