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
Community comments
Revamped annotations and more
by Alex Popescu,
Re: Revamped annotations and more
by Floyd Marinescu,
Re: Revamped annotations and more
by BK Lau,
Re: Revamped annotations and more
by Alex Popescu,
Re: Revamped annotations and more
by Cedric Beust,
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