Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1500

JUnit 5 there is no posibilities how run Nested test class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 10.0
    • None
    • java - JUnit
    • None

    Description

      JUnit 5 has Nested test. Nested test is inner class with annotation @Nested. There is no posibilities how run nested test (only one method with Run Focused Test Method). Test methods from top level class are running after Test File only. 

      Example: 

      class TopLevelTest {
      	@Test
      	void topLevelTest() {
      		System.out.println("topLevelTest");
      	}
      
      	@Nested
      	class InnerTest {
      
      		@Test
      		void inner1Test() {
      			System.out.println("Inner 1");
      		}
      
      		@Test
      		void inner2Test() {
      			System.out.println("Inner 2");
      		}
      	}
      }
      

      I am not able to run whole InnerTest class.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Saljack Tomáš Poledný
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 20m
                3h 20m