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

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

2 Answers  


When should one use selenium grid?

1 Answers  


In selenium ide what are the element locators that can be used to locate elements on web page?

1 Answers  


What are the advantages of page object model framework?

1 Answers  


what will be the first salary and what will be the hike in the salary?

0 Answers  


List out the names of programming languages, browsers and operating systems that are supported by selenium.

1 Answers  


What is the difference between find elements () and find element ()?

1 Answers  


What is difference between / & //

1 Answers  


Explain what does @test(invocationcount=?) And @test(threadpoolsize=?) Indicate.

1 Answers  


How do you find element using Java Script?

3 Answers   HCL,


How to select a value from a drop-down?

1 Answers  


Can we edit recorded selenium ide test cases?

1 Answers  


Categories