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
What are some limitations of selenium?
Write a code snippet to perform right-click an element in webdriver.
How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?
What selenese command and argument can be used to transfer the value of a javascript variable into a side variable?
sorting java array
What is testng and how is it better than junit?
What are the different methods to refresh a web page in webdriver?
Explain what is selenium ide?
To generate pdf reports mention what java api is required?
What are the different exceptions you got when working with webdriver?
Which is the package which is to be imported while working with webdriver?
How to print Duplicate values in Drop Down List
What is the super interface of webdriver?
How to delete cookies in selenium?
Mention what are the advantages of using git hub for selenium?