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 can we fetch a text written over an element?
How can I learn to automate testing using selenium?
How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?
What is parameterized testing in testng?
What is the alternate way to click on login button?
Explain what is selenium ide?
How to pause a test execution for 5 seconds at a specific point?
Explain the meaning of the statement in Selenium and what are the types of assertion?
Explain what does @test(invocationcount=?) And @test(threadpoolsize=?) Indicate.
How you will switch from one frame to another?
What is selenium webdriver or google webdriver or selenium 2.0?
What is pom (page object model)? What are its advantages?
Explain what is the difference between borland silk and selenium?
How would you test your element locator?
How can we launch different browsers in selenium webdriver?