I want to know that what's the difference between NG and Junit and which one is best for automation in Selenium Webdriver. Please explain with example
Asked
Active
Viewed 6,111 times
1
-
3possible duplicate of [Selenium-Webdriver Java Framework - TestNG or JUnit?](http://stackoverflow.com/questions/12257435/selenium-webdriver-java-framework-testng-or-junit) – Abhishek Oct 09 '13 at 07:24
2 Answers
6
My recommendation is Testng because, click here the Advantages of Testng & Advantages of TestNG over Junit. also check this

Chetan
- 2,360
- 3
- 18
- 33
-
-
check latest comparison http://www.mkyong.com/unittest/junit-4-vs-testng-comparison/ – Chetan Oct 09 '13 at 08:17
-
@ franz Ebner i am saying Junit & testng both are stronger & i used both but testng is ahead in case of Group test, object parametrization & Dependency tests. – Chetan Oct 09 '13 at 08:23
-
1So think I, but in 2010 the difference was much bigger. JUnit 4 is not that bad though. – Franz Ebner Oct 09 '13 at 13:04
0
On a rough note... TestNG is nothing but Junit along with some extra features like Reports and some annotations. If you are least bothered about the test execution reports, you can go with Junit. If you need html reports you can go with TestNG.

HemChe
- 2,249
- 1
- 21
- 33