Announcement Announcement Module
Collapse
No announcement yet.
TestContext framework annotation support for TestNG? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TestContext framework annotation support for TestNG?

    A quick question:

    I am considering using TestNG and looked at the Chapter 8. Testing page and in section 8.3.7.6 and noticed this statement:

    "The following annotations, however, are only supported when used in conjunction with JUnit (e.g., with the SpringJUnit4ClassRunner or the JUnit 3.8 and JUnit 4.4 support classes."
    Does this mean that these annotations are exclusive with the use of Junit?

    Does Spring 2.5 or 3 have this same annotation support for TestNG as well?

  • #2
    The section from the reference manual that you're referring to only applies to the following annotations:
    • @IfProfileValue
    • @ProfileValueSourceConfiguration
    • @ExpectedException
    • @Timed
    • @Repeat

    These annotations only make sense with JUnit since TestNG provides equivalent support with its own annotations. Furthermore, @ExpectedException and @Timed only make sense with JUnit 3.8, since JUnit 4+ provides built-in support for those semantics.

    All other annotations listed in that chapter are supported with any of the supported testing frameworks.

    In summary, Spring doesn't need to provide support for these annotations with TestNG because TestNG already provides that support.

    Hope this clears things up for you.

    Regards,

    Sam

    Comment

    Working...
    X