Comparison Analysis of TESTNG and JUNIT frameworks for Automation with Java
Oshin, Vineet Chaudhary · Journal of Emerging Technologies and Innovative Research · 2018
Junit and TestNG work on principle of test driven development. These frameworks are used because Selenium Webdriver lacks the reporting feature. This paper attempts to compare the Junit and TestNG test frameworks for Java. TestNG proved to be better in terms of diverse annotations, maintain dependency tests, easier parameter handling mechanism, better interactive reporting. However, library code from Junit is mainly used and sometimes replicated to TestNG since JUnit libraries have better organized unit tests. TestNG is useful in case of high level testing whereas JUnit is mainly useful for developers in unit testing.