This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 254565

Summary: Hierarchical JUnit Descriptions
Product: java Reporter: Cobra1117
Component: JUnitAssignee: Theofanis Oikonomou <theofanis>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description Cobra1117 2015-08-21 02:09:45 UTC
Currently, the JUnit test runner does not properly support JUnit Descriptions with child Descriptions. This causes any suite runners to display incorrectly. 

For example, if you use the experimental Enclosed runner, the results should be displayed hierarchically, but instead only the child nodes are displayed.

Thus this:
@RunWith(Enclosed.class)
public class SandboxTest {
    public static class TestClass1 {
        @Test
        public void enclosedTest1() {
            
        }
        @Test
        public void enclosedTest2() {
            
        }
    }
    
    public static class TestClass2 {
        @Test
        public void enclosedTest1() {
            
        }
        @Test
        public void enclosedTest2() {
            
        }
    }
}


Should have results like this:
SandboxTest 
\- TestClass1
  |- enclosedTest1
  \- enclosedTest2
\- TestClass2
  |- enclosedTest1
  \- enclosedTest2

But instead, it currently displays this:
SandboxTest
|- enclosedTest1
|- enclosedTest2
|- enclosedTest1
\- enclosedTest2