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 - Hierarchical JUnit Descriptions
Summary: Hierarchical JUnit Descriptions
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-21 02:09 UTC by Cobra1117
Modified: 2015-08-21 02:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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