*********TestNG Annotations******** (Very Important)
TestNG Annotations are used to control the methods to be executed in the test script.
Configuration information for a TestNG class:
@BeforeSuite: The annotated method will be run before all tests in this suite have run. (Pr: 1)
@BeforeTest: The annotated method will be run before any test method belonging to the classes inside the test tag is run. (Pr:2)
@BeforeGroups: The list of groups that this configuration method will run before.
This method is guaranteed to run shortly before the first test method that belongs
to any of these groups is invoked. (Pr:3)
@BeforeClass: The annotated method will be run before the first test method in the current class is invoked. (Pr: 4)
@BeforeMethod: The annotated method will be run before each test method. (Pr: 5)
@Test: (Pr: 6)
@AfterMethod: The annotated method will be run after each test method. (Pr: 7)
@AfterClass: The annotated method will be run after all the test methods in the current class have been run. (Pr: 8)
@AfterGroups: The list of groups that this configuration method will run after. This method is guaranteed to run shortly after the last test method that belongs to any of these groups is invoked. (Pr: 9)
@AfterTest: The annotated method will be run after all the test methods belonging to the classes inside the test tag have run. (Pr: 10)
@AfterSuite: The annotated method will be run after all tests in this suite have run. (Pr: 11)