What is the execution sequence of testng annotations in selenium Test?

This is a commonly asked interview question in automation testing, especially related to Selenium. Below, I am providing the sequence of execution for TestNG annotations in a test.

1st in execution sequence -@BeforeSuite

2nd – @BeforeTest

3rd – @BeforeClass

4th – @BeforeMethod

5th – @Test

6th – @AfterMethod

7th – @AfterClass

8th- @AfterTest

last in execution- @AfterSuite

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Testingtalkslatest.com - A project by CreativeHub IT Solutions.
Contact Us At: support@testingtalkslatest.com
Our Partner websites - Classified Hub , CodesToolbox , CodesToolbox
Scroll to Top
0
Would love your thoughts, please comment.x
()
x