You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jan Goyvaerts (JIRA)" <ji...@codehaus.org> on 2012/02/09 13:04:02 UTC

[jira] (SUREFIRE-833) Support for annotated JUnit @Category

Jan Goyvaerts created SUREFIRE-833:
--------------------------------------

             Summary: 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


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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-833) Support for annotated JUnit @Category

Posted by "Jan Goyvaerts (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291284#comment-291284 ] 

Jan Goyvaerts commented on SUREFIRE-833:
----------------------------------------

Why not allow the selection of *any* annotation ? 
                
> 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
>
> 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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-833) Support for annotated JUnit @Category

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291927#comment-291927 ] 

Kristian Rosenvold commented on SUREFIRE-833:
---------------------------------------------

As long as patches contains test coverage and they don't seem totally "off" from a JUnit perspective I'm all for flexible solutions 
                
> 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
>
> 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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-833) Support for annotated JUnit @Category

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291281#comment-291281 ] 

Kristian Rosenvold commented on SUREFIRE-833:
---------------------------------------------

I will happily review any patch that implements this. Remember test-cases ;)
                
> 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
>
> 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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira