18 July 2012

How to install TestNG in STS (and Eclipse)

Solution works for Eclipse 3.5/STS 2.6.0 (According to TestNG it works from Eclipse 3.4)

Bored with JUnit ??? Try TestNG .

I didn't find anything overexcited about TestNG  but it has few interesting features that JUnit doesn't have or it is easier to use in TestNG.

In STS:

1. pres Help in menu.
2. Install new software
3.  in URL field type : http://beust.com/eclipse and click Add (STS will ask you to add name... choose what you want,be if you creative is not your strong point type: testng)
4. Select testng
5. Press nexts  as many times as it required (You need  agree for terms  and agree that you use unsign stuff)
6. Press finish
7. restart STS , Eclipse
Done it! You can now have a legendary tests with TestNG

if you need quick tutorial .Use mykong's  website that contains basic tutorial:
http://www.mkyong.com/tutorials/testng-tutorials/

[UPDATE 1] 
*I strike first part of sentence as I need use spend more time with TestNG to have a proper opinion about it.
So far ,it didn't work perfectly well on Netbeans.I using at TestNG in Eclipse and it seems to not
Thanks to Tomek from  http://kaczanowscy.pl/tomek/node for interesting presentation (can be found in comment).

[UPDATE 2]
It is possible to install TestNG through Eclipse Marketplace* now and it is much easier!
Thank you for Olivier Billard's comment to inform me about it!

*  WOW . I am surprised that Eclipse Marketplace still exists and somebody actually used it .It is worst 'advertised' feature ever introduced. When I discovered  this (it was during reading some article about Java ,where autor of this post was surprised that .. it still exists and to make things more  funny most comments were " I didn't know that  Eclipse Marketplace exists ". Eclipse Marketplace sounds like great idea,but implementation and advertising was in Eclipse style.