What is difference b/w @BeforeClass and @BeforeTest annotation, both are used before @Test annotation.?
Annotation @BeforeMethod: This method will be run before each test method.
Annotation @BeforeClass : This method will be run before the first test method in the current class is invoked.
Annotation @BeforeTest : This method will be run before any test method belonging to the classes inside the <test> tag is run.
The hierarchy in TestNG will be like this