What are the types of annotations used in TestNG (In the sequence of execution/hierarchy)?
There are nine types of annotations used in TestNG. In order of their execution sequence, they are as follows:
@BeforeSuite@BeforeTest@BeforeClass@BeforeMethod@Test@AfterMethod@AfterClass@AfterTest@AfterSuite
@BeforeSuite
@BeforeTest
@BeforeClass
@BeforeMethod
@Test
@AfterMethod
@AfterClass
@AfterTest
@AfterSuite