TestNG Annotations and execution order
@BeforeSuite
@BeforeTest
@BeforeClass
@BeforeMethod
@Test@AfterMethod
@AfterClass
@AfterTest
@AfterSuite
@Parameter
Use Of Above Annotations:
@Test - This is work as main function in our script.We will write the script inside those are needs to execute.
@BeforeSuite - You can write tests like start selenium driver.
@AfeterSuite - You can write tests like stop or quit selenium driver.
@BeforeTest - You can write tests like start browser.
@AfterTest - You can write tests like generating report or end results.
@BeforeClass - You can setup the driver and browser properties.
@AfterClass - Stop driver.
@BeforeMethod - You can write tests for DB connection.
@AfterMethod - You can stop DB connection here.
Copyright © 2017 qatoolsguide.blogspot.com || ALL RIGHTS RESERVED