What is the difference between TESTNG and JUNIT? List out Annotations?



What is the difference between TESTNG and JUNIT? List out Annotations?..

Answer / chandra shekar u

JUNIT performs on serial Testing. Where as TESTNG can do both parallel and serial testing. This is the main difference. CUCUMBER can work only with JUNIT.

JUNIT annotations are:
@Test, @Before, @After, @Ignore, @BeforeClass, @AfterClass, @Rule, @Runwith(Suite.class), @SuiteClasses({}), @Parameters and @RumWith(Parameterized.class).

TESTNG Annotations are:
@Test, @Parameters, @BeforeMethod, @AfterMethod, @BeforeTest, @AfterTest, @BeforeClass, @AfterClass, @BeforeGroups, @AfterGroups, @BeforeSuite, @AfterSuite and @DataProvider

Is This Answer Correct ?    15 Yes 0 No

Post New Answer

More Selenium Interview Questions

How to handle https website in selenium? Or how to accept the ssl untrusted connection?

0 Answers  


What do you mean by xpath?

0 Answers  


If one wanted to display the value of a variable named answer in the log file, what would the first argument to the previous command look like?

0 Answers  


What is the difference between poi and jxl jar?

0 Answers  


Do you know a way to refresh browser by using selenium?

0 Answers  






Explain how selenium grid works?

0 Answers  


What are the Different Types of Waiting in the WebDriver?

1 Answers  


What is difference between / & //

1 Answers  


What programing language is most useful for creating selenium evaluations?

0 Answers  


What type of tests have you automated?

0 Answers  


What test can selenium do?

0 Answers  


What is selenium rc?

0 Answers  


Categories