Posted On: Feb 22, 2018
|In JUnit the naming convention for annotation is a bit complicated for, e.g., “Before”, “After” and “Expected”.||In TestNG it is easier to understand annotations like “BeforMethod”, “AfterMethod” and “ExpectedException”.|
|In JUnit, for a method declaration you have to follow a specific style like using “@BeforeClass” and “@AfterClass”.||In TestNG, there is no restriction like you have to declare methods in a specific format.|
|In JUnit method name constraint is present.||In TestNG method name constraint is not present, and you can determine any test method names.|
|JUnit framework does not have “Parameterized Test” or “Dependency Test” features.||TestNG use “dependOnMethods” to implement the dependency testing.|
|In JUnit grouping of test cases are not available.||In TestNG, grouping of test cases is available.|
|JUnit does not support parallel execution on Selenium test cases.||In TestNG Parallel execution of Selenium test cases are possible.|
|It cannot re-run the failed cases.||It can rerun the failed tests.|
Never Miss an Articles from us.
Exceptional or analogous conditions during program execution require special processing methods and this exception hand..
JUnit is more often used by developers to implement unit tests in JAVA. It is designed for unit testing that is more ..