jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Surefire
  • SUREFIRE-833

Support for annotated JUnit @Category

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.12
  • Fix Version/s: None
  • Component/s: Junit 4.x support
  • Labels:
    None
  • Complexity:
    Intermediate

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.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Kristian Rosenvold added a comment - 09/Feb/12 9:51 AM

I will happily review any patch that implements this. Remember test-cases

Show
Kristian Rosenvold added a comment - 09/Feb/12 9:51 AM I will happily review any patch that implements this. Remember test-cases
Hide
Permalink
Jan Goyvaerts added a comment - 09/Feb/12 10:26 AM

Why not allow the selection of any annotation ?

Show
Jan Goyvaerts added a comment - 09/Feb/12 10:26 AM Why not allow the selection of any annotation ?
Hide
Permalink
Kristian Rosenvold added a comment - 16/Feb/12 9:09 AM

As long as patches contains test coverage and they don't seem totally "off" from a JUnit perspective I'm all for flexible solutions

Show
Kristian Rosenvold added a comment - 16/Feb/12 9:09 AM As long as patches contains test coverage and they don't seem totally "off" from a JUnit perspective I'm all for flexible solutions

People

  • Assignee:
    Unassigned
    Reporter:
    Jan Goyvaerts
Vote (0)
Watch (0)

Dates

  • Created:
    09/Feb/12 6:03 AM
    Updated:
    16/Feb/12 9:09 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.