Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1500 JUnit 5 there is no posibilities how run Nested test class
  3. NETBEANS-1744

Support Run/Debug Focused Test Method for @Nested JUnit 5 test classes in Maven projects

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: In Progress
    • Trivial
    • Resolution: Unresolved
    • 10.0
    • None
    • None

    Description

      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");
      		}
      	}
      }
      

      When you try to test a single method in Netbeans (Run/Debug Focused Test Method), Netbeans assumes that the method is in the outermost class in the file. So for example, if you try to run inner1Test, Netbeans will do mvn test -Dtest=TopLevelTest#inner1Test, instead of mvn test -Dtest=TopLevelTest$InnerTest#inner1Test.

      Attachments

        Issue Links

          Activity

            People

              srdo Stig Rohde Døssing
              srdo Stig Rohde Døssing
              Votes:
              1 Vote for this issue
              Watchers:
              3 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