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

List some scenarios which we cannot automate using selenium webdriver?

0 Answers  


How you can find broken images in a page using selenium web driver?

0 Answers  


What are the Different Types of Waiting in the WebDriver?

1 Answers  


How to get a text of a web element?

0 Answers  


How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?

0 Answers   Cognizant,






What do you mean by selenese?

0 Answers  


in real world, how do we log reports using selenium? is it with log4j or testNG listener?? please answer asap

2 Answers  


How can you mark a test case as failed by using soft assertion?

0 Answers  


What is the difference between “/” and “//” in xpath?

0 Answers  


What are heightened privileges browsers?

0 Answers  


What is parameterization in testng?

0 Answers  


Explain how can you find broken links in a page using selenium webdriver?

0 Answers  


Categories