A.* Annotations are lines of code that provide the configuration information. They are always preceded by @ symbol.
@BeforeSuite: Once, before all Tests in the suite.
@BeforeTest: Once, Prior to the first Test case in the TestNG file.
@BeforeClass: Once before the first Test method in the current class.
@BeforeMethod: Before each Test method.
@Test: Actual Test case, the business logic.
@AfterMethod: After each Test method.
@AfterClass: Once after all the Test methods in the current class.
@AfterTest: Once, after all Test cases in the TestNG file.
@AfterSuite: Once, after all Tests in the suite.
@BeforeGroups: The list of groups that this method will run before.
@AfterGroups: The list of groups that this method will run after.
@Parameters: to pass parameters in Test methods.
@DataProvider: Marks a method as supplying data for a Test method.
@Factory: Marks a method as a factory that returns objects that will be used by TestNG as Test classes.
@Listeners: Defines listeners on a Test class, helpful for logging purpose.
@BeforeSuite: Once, before all Tests in the suite.
@BeforeTest: Once, Prior to the first Test case in the TestNG file.
@BeforeClass: Once before the first Test method in the current class.
@BeforeMethod: Before each Test method.
@Test: Actual Test case, the business logic.
@AfterMethod: After each Test method.
@AfterClass: Once after all the Test methods in the current class.
@AfterTest: Once, after all Test cases in the TestNG file.
@AfterSuite: Once, after all Tests in the suite.
@BeforeGroups: The list of groups that this method will run before.
@AfterGroups: The list of groups that this method will run after.
@Parameters: to pass parameters in Test methods.
@DataProvider: Marks a method as supplying data for a Test method.
@Factory: Marks a method as a factory that returns objects that will be used by TestNG as Test classes.
@Listeners: Defines listeners on a Test class, helpful for logging purpose.
No comments:
Post a Comment