One framework which is often compared to JUnit is TestNG, a testing framework inspired by JUnit. Michael Minella provides a brief but useful comparison between JUnit and TestNG.
Feature | JUnit | TestNG |
User Defined Life Cycle | ![]() |
![]() |
Test Organization (groups, etc) | ![]() |
|
Distributed Test Execution | ![]() |
|
Parallel Test Execution | ![]() |
|
Data Driven Tests | ![]() |
|
Dependency Testing | ![]() |
|
IDE Integration | ![]() |
![]() |
Ant Integration | ![]() |
![]() |
Maven Integration | ![]() |
![]() |
Domain Specific Extensions (Database, HTTP, etc) | ![]() |
|
Active Community | ![]() |
![]() |
To summarize his thoughts, JUnit has been adopted and extended more so than TestNG, however, TestNG seems to offer more functionality and has the ability to invoke JUnit tests, making it a tempting choice in testing frameworks.
In conclusion, JUnit may not be in the spotlight as much as it was a year ago, but is it really walking closer towards the 'bright light'? What do you think, what does the future have in store for JUnit?