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 page factory?

534


What are the uses of findelement() and findelements()?

465


How do you get the attribute of the web element?

484


What is junit annotations and what are different types of annotations which are useful?

502


How to export selenium ide test suite to selenium rc suites?

508






What is the difference between driver.findelement() and driver.findelements() commands?

473


Write a code snippet to launch firefox browser in webdriver.

470


How to mouse hover an element in selenium?

535


Which webdriver implementation claims to be the fastest?

556


What are some advantages of selenium grid?

528


What are the challenges and limitations of selenium webdriver?

488


Tell us how can you run selenium server other than the default port 4444?

485


How to print Duplicate values in Drop Down List

513


Hi can anyone suggest me what type of non technical questions asked in interview for experienced people, I am trying to get job with fake experience can anyone help me please

904


What is the difference between implicit wait and explicit wait?

477