[
https://jira.codehaus.org/browse/SUREFIRE-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=322356#comment-322356
]
Andreas Gudian commented on SUREFIRE-833:
-----------------------------------------
Cool patch, I like the feature already - having to add Interfaces in order to
put them into a {{@Category}}-annotation always feels weird to me, too.
If you'd like to make that thing sound and complete, we already have some
documentation on grouping on the
[examples-pages|http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories]
that would also need some extensions. Source is in
{{maven-surefire-plugin/src/site/apt/examples/junit.apt.vm}}. But please
mention that these annotations work on class-level only, and that it's a
Surefire addition to what JUnit offers (for those people executing their tests
in an IDE without Surefire, but some IDE-specific JUnit integration).
If you don't have the time to append the docs, I will do it after we applied
your patches.
> Support for annotated JUnit @Category
> -------------------------------------
>
> Key: SUREFIRE-833
> URL: https://jira.codehaus.org/browse/SUREFIRE-833
> Project: Maven Surefire
> Issue Type: Improvement
> Components: Junit 4.x support
> Affects Versions: 2.12
> Reporter: Jan Goyvaerts
> Fix For: 2.15
>
> Attachments: SUREFIRE-833-spraguep-2.patch,
> SUREFIRE-833-spraguep.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira