BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News TestNG 5.0 Released

TestNG 5.0 Released

Bookmarks
Cedric Beust has announced the launch of TestNG, the popular Testing framework and alternative to JUnit.  Alexandru Popescu (TestNG co-founder) is also InfoQ's Chief Architect.  Cedric blogged about the announcement and provided insights into the new features and why they were added.

The major new features in TestNG are:
  • Configuration annotations are now called @BeforeTest, @BeforeSuite, which are terse and also support IDE auto-completion for users who might type @Before
  • When executing multiple test suites, reports are now kept distinct in each suite's directory. Report UI's have also been improved.
  • New SuiteName and testName attributes in the @Test annotation allows grouping tests to specific suites in the code instead of TestNG.XML. Useful for grouping reports for tests executed via ant or command line.
  • @ExpectedAnnotations deprecated in favour of an expectedExceptions attribute in @Test.
  • Improved StackTrace readibility by hiding unnecessary portions of the stack trace
TestNG was started by Cedric Beust out of frustration for some JUnit deficiencies which he has documented  here, here, here and in particular, here.  TestNG has become popular over the years due to it's improvements over JUnit, culminating in JUnit 4.0's replication of some TestNG features.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Revamped annotations and more

    by Alex Popescu,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The new TestNG 5.0 version introduces a completely revamped set of annotations that are meant to make things more clear and the tests extremely readable. Considering, also the reporting improvements and also the new features of the TestNG Ant task, I would say that TestNG 5.0 is one of the most important versions in its history.

    ./alex
    --
    .w( the_mindstorm )p.

  • Re: Revamped annotations and more

    by Floyd Marinescu,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Congragulations guys!

  • Re: Revamped annotations and more

    by BK Lau,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Cederic/Alex:

    Congrats!. I want to say that now that TestNG is gaining traction, my suggestion in minor release would be really nice to put some efforts to "buff" up reporting. The current out-of-box reporting is an improvement but... from my experience management are mesmerized by reports and those nice html presentations, maybe DHTML/AJAX.
    I kid you not..that's what managers look at.(Read: Stats and something they can present in meetings....)
    TestNG needs to have a "signature" reporting that caused "wow!"s and not let Junit pretty reporting take the lead.
    Keep up with the good job.

    -BK-

  • Re: Revamped annotations and more

    by Alex Popescu,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    BK we are open to any suggestions. So, come on the TestNG mailing list and tell us how can we improve the reports, so that they become shiny ;-).

    ./alex
    --
    .w( the_mindstorm )p.

  • Re: Revamped annotations and more

    by Cedric Beust,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    BK,

    No argument there, I know how important presentation is, but unfortunately, I'm pretty bad at design. I'm still hoping that someone with some decent HTML/CSS/DHTML sense will come in and beef up our HTML reports...

    --
    Cedric

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT