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

Explain me how can we capture screenshots in selenium?

0 Answers  


What are some limitations of selenium?

0 Answers  


How to handle ajax calls in selenium webdriver?

0 Answers  


What is group test in testng?

0 Answers  


What is the object repository?

0 Answers  






How to pause a test execution for 5 seconds at a specific point?

0 Answers  


What are the types of assertions there in selenium?

0 Answers  


What is exception test in selenium?

0 Answers  


What is the alternate way to click on the login button?

0 Answers  


Tell me how can we maximize browser window in selenium?

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 selenese command and argument can be used to transfer the value of a javascript variable into a side variable?

0 Answers  


Categories