@Test: The annotated method is a part of a test case
@BeforeMethod: The annotated method will be run before
each test method.
@AfterMethod: The annotated method will be run after each
test method.
@BeforeClass: The annotated method will be run before the
first test method in the current class is invoked.
@AfterClass: The annotated method will be run after all
the test methods in the current class have been run.
@BeforeTest: The annotated method will be run before any
test method belonging to the classes inside the tag is run.
@AfterTest: The annotated method will be run after all
the test methods belonging to the classes inside the tag have run.
@BeforeSuite: The annotated method will be run before all
tests in this suite have run.
@AfterSuite: The annotated method will be run after all
tests in this suite have run.
@DataProvider : Marks a method as supplying
data for a test method. The annotated method must return an Object[][] where
each Object[] can be assigned the parameter list of the test method. The @Test
method that wants to receive data from this DataProvider needs to use
a dataProvider name equals to the name of this annotation.
Very informative ..i suggest this blog to my friends..Thank you for sharing
ReplyDeleteSelenium Training in velachery | selenium training and placement in chennai |Selenium Training in chennai
The blog gave me idea about anotation in TestNG My sincere thanks for sharing this post
ReplyDeleteSelenium Training in Chennai