About Me

Page views

Powered by Blogger.

Followers

Saturday, 9 May 2015



Following is the list of the most useful and favorable annotations in TestNG:
AnnotationDescription
@TestThe annotation notifies the system that the method annotated as @Test is a test method
@BeforeSuiteThe annotation notifies the system that the method annotated as @BeforeSuite must be executed before executing the tests in the entire suite
@AfterSuiteThe annotation notifies the system that the method annotated as @AfterSuite must be executed after executing the tests in the entire suite
@BeforeTestThe annotation notifies the system that the method annotated as @BeforeTest must be executed before executing any test method within the same test class
@AfterTestThe annotation notifies the system that the method annotated as @AfterTest must be executed after executing any test method within the same test class
@BeforeClassThe annotation notifies the system that the method annotated as @BeforeClass must be executed before executing the first test method within the same test class
@AfterClassThe annotation notifies the system that the method annotated as @AfterClass must be executed after executing the last test method within the same test class
@BeforeMethodThe annotation notifies the system that the method annotated as @BeforeMethod must be executed before executing any and every test method within the same test class
@AfterMethodThe annotation notifies the system that the method annotated as @AfterMethod must be executed after executing any and every test method within the same test class
@BeforeGroupsThe annotation notifies the system that the method annotated as @BeforeGroups is a configuration method that enlists a group and that must be executed before executing the first test method of the group
@AfterGroupsThe annotation notifies the system that the method annotated as @AfterGroups is a configuration method that enlists a group and that must be executed after executing the last test method of the group

0 comments:

Post a Comment

Popular Posts

Copyright © Learn Selenium Yourself | Powered by Blogger
Design by Duan Zhiyan | Blogger Theme by NewBloggerThemes.com