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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of creating a reference variable- ‘driver’ of type

456


What is the command to insert text into the HTML text box using Selenium?

496


What do we mean by selenium 1 and selenium 2?

500


What do you mean by xpath?

497


What you know about selenium?

520






How to validate the dropdown value contains specific value or not?

426


How to send alt/shift/control key in selenium webdriver?

1051


Tell me what is a node in selenium grid?

496


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

512


What exactly is selenium remote-control (rc) tool?

502


What types of cases can be automated with Selenium?

540


What is Dynamic xpath in selenium ?

521


What are the different ways of locating a web element in selenium?

463


What are some of the advantages of selenium grid?

498


What is the selenium's recording language?

533