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 does one execute java scripts function in selenium?
To enter values onto text boxes what is the command that can be used?
What is the syntax of finding elements by id using css selector?
How many types of waits in selenium?
How to check if an element is visible on the web page?
What is Dynamic xpath in selenium ?
Which is the package which is to be imported while working with webdriver?
What are the features of selenium ide ?
What is the use of driver.get("url") and driver.navigate().to("url") command? Is there any difference between the two?
what is the use of x-path?
Tell us how many exceptions do you know in selenium webdriver?
How can we type text in a textbox element using selenium?
How does testng allow you to state dependencies? Explain it with an example.
What is a hub in selenium grid?
What kind of keyboard operations can be performed in selenium?