Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2032

When declare the @Disabled annotation at the class level, skip displayed in other test class

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M5
    • 3.0.0-M8
    • Maven Surefire Plugin
    • None

    Description

      When declare the @Disabled annotation at the class level, skip displayed in other test class。

      junit5: 5.8.2
      surefire: 3.0.0-M5

      I have a test class like

      public abstract class TagTest {
      
        @Tag("red")
        public static class RedTest extends TagTest {
      
        }
      
        @Disabled
        @Tag("orange")
        public static class OrangeTest extends TagTest {
      
        }
      
        @Test
        public void test1() {
          // Do Nothing
        }
      
        @Test
        public void test2() {
          // Do Nothing
        }
      }
      

      Run with the following command:

      mvn test -Dgroups="red|orange"
      

       

      TagTest$RedTest has only 2 test case.

       

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gnodet Guillaume Nodet
            geektao xie tao
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment