1-Annotations;
2JUnit --> @Test, @BeforeClass, @AfterClass, @Before, @After, @Ignore
3TestNG --> @Test, @BeforeTest, @BeforeClass, @BeforeSuite, @BeforeMethod,
4 @AfterTest, @AfterClass, @AfterSuite, @AfterMethod
5
6-Both are testing framework to help us running automation scripts.
7-TestNG provide HTML report.
8-TestNG has @DataProvider annotation same as Cucumber Scenario Outline for DDT
9-Both We can do parallel testing, but in different way. In TestNG we use XML
10runner. In JUnit we use Maven Surefire Plugins.
11-TestNG support group test but JUNit doesn't support.
12-TestNG and JUnit both of them have parameterized testing but TestNG
13parameterizedd test configuration is very easy to configure. There are two ways
14to achieve it in TestNG;
15@Parameters and TestNG xml file
16@DataProvider
1-Annotations;
2JUnit --> @Test, @BeforeClass, @AfterClass, @Before, @After, @Ignore
3TestNG --> @Test, @BeforeTest, @BeforeClass, @BeforeSuite, @BeforeMethod,
4 @AfterTest, @AfterClass, @AfterSuite, @AfterMethod
5
6-Both are testing framework to help us running automation scripts.
7-TestNG provide HTML report.
8-TestNG has @DataProvider annotation same as Cucumber Scenario Outline for DDT
9-Both We can do parallel testing, but in different way. In TestNG we use XML
10runner. In JUnit we use Maven Surefire Plugins.
11-TestNG support group test but JUNit doesn't support.
12-TestNG and JUnit both of them have parameterized testing but TestNG
13parameterizedd test configuration is very easy to configure. There are two ways
14to achieve it in TestNG;
15@Parameters and TestNG xml file
16@DataProvider
17