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

What is the difference between driver.close() and driver.quit command?

0 Answers  


how to Handle dropdown?

2 Answers   Cryptopy Technologies,


What are the features of testng and list some of the functionality in testng which makes it more effective?

0 Answers  


Why to use testng with selenium rc?

0 Answers  


Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.

0 Answers  






What is the difference between driver.getwindowhandle() and driver.getwindowhandles() in selenium webdriver?

0 Answers  


How does one capture a page title in selenium 2.0?

0 Answers  


How does one calculate the number of rows using selenium 2.0?

0 Answers  


How to run a group of test cases using testng?

0 Answers  


How do you find element using Java Script?

3 Answers   HCL,


Explain me what could be the cause of selenium webdriver test to fail?

0 Answers  


What are the advantages of the automation structure?

0 Answers  






Categories