Enlist different annotations available in TestNG?

Deshai
Deshai

Posted On: Apr 06, 2020

 

Some of the different annotations available in TestNG are,

  • @BeforeSuite - It will run before the execution of the test method in the suite.
  • @AfterSuite - It will run after the execution of the test method in the suite.
  • @BeforeTest - It will run before the execution of the test methods of available classes belonging to the folder.
  • @AfterTest - It will run after the execution of the test methods of available classes belonging to the folder.
  • @BeforeClass - it will run before the first method of the current class is invoked.
  • @AfterClass - it will run after the first method of the current class is invoked.
  • @BeforeMethod - it will be executed before the execution of each test method.
  • @AfterMethod - it will be executed after the execution of each test method.
  • @BeforeGroups - It will run once before the execution of all test cases belonging to the group.
  • @AfterGroups - It will run once after the execution of all test cases belonging to the group.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    TestNG Interview Questions

    What is TestNG?

    TestNG is a testing framework written in Java to cover a wide array of test categories like unit testing, functional testing, end-to-end test, integration test, etc. It is inspired from JUnit and NUni...

    TestNG Interview Questions

    List some features of TestNG Framework?

    Some of the important features of TestNG framework are,Support for Annotation. Support for data-driven-testing and parameters. Support for multiple instances in the same test class. Has a good ...

    TestNG Interview Questions

    What is Testng full form?

    The full form of TestNG is Test Next Generation....