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
How you can find broken images in a page using selenium web driver?
What are the advantage and features of selenium ide?
Which is the latest Selenium tool?
How to press enter key on text box in selenium webdriver?
How to check if a button is enabled on the page?
Tell me what is a hub in selenium grid?
What are the important selenium ide commands or selenese commands?
Could you explain the line of code webdriver driver = new firefoxdriver()?
How can we move to nth child element using css selector?
What is the use of @listener annotation in testng?
What do we mean by selenium 1 and selenium 2?
How selenium grid works?
Can WebDriver test mobile applications?
what is assertion in selenium and what are the types of assertion?
How to scroll down to a particular element?