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 ?    13 Yes 0 No

Post New Answer

More Selenium Interview Questions

How can we get a text of a web element?

0 Answers  


What is selenium? What are the different selenium components?

0 Answers  


Difference between @findByMethod and @findelement?

3 Answers   HCL,


What are the verification points available in selenium?

0 Answers  


Do you know what are the main advantages of selenium grid?

0 Answers  






What are the different types of wait statements in selenium webdriver? Or how do you achieve synchronization in webdriver?

0 Answers  


What the webdriver supported mobile testing drivers do you know?

0 Answers  


What are desiredcapabilities in selenium webdriver?

0 Answers  


Give ide's main parts and components?

0 Answers  


Mention what are the types of listeners in testng?

0 Answers  


how to handle staleelementreferenceexception?

0 Answers  


Explain how you can switch back from a frame?

0 Answers  






Categories