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

Support for annotated JUnit @Category

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.12
    • None
    • Junit 4.x support
    • None

    Description

      The current implementation of Surefire seems to look for explicit @Category annotations in the test classes. And will only consider those. Suppose I'd like to add a more concise annotation for this:

      @Category(IntegrationTests.class) <== JUnit @Category
      @Target(

      {ElementType.TYPE}

      )
      @Retention(RetentionPolicy.RUNTIME)
      @Documented
      public @interface IntegrationTest {}

      Annotating my test class with @IntegrationTest does not work. Although I think it looks much better than repeating everywhere in my code "@Category(com.foo.bar.IntegrationTests.class)". For which I add an additional dependency in the interface class btw.

      Attachments

        1. SUREFIRE-833-spraguep.patch
          34 kB
          Paul Sprague
        2. SUREFIRE-833-spraguep-2.patch
          22 kB
          Paul Sprague

        Activity

          People

            tibordigana Tibor Digana
            jan_goyvaerts Jan Goyvaerts
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: