Annotations & Test Lifecycle — Roadmap Step & Resources
@BeforeMethod, @Test, @AfterMethod and controlling exactly when setup/teardown runs
- Level: intermediate
- Estimated time: 1 days
- Roadmap: SDET / Automation Testing
Before this step
Interview questions
- What's the difference between @BeforeMethod and @BeforeClass, and when would you use each?
Study resources
- TestNG Annotations (Article) — The official TestNG documentation's full reference for annotations and test lifecycle.
- TestNG Annotations Explained (Video) — A practical walkthrough of @BeforeMethod, @Test, @AfterClass and other lifecycle annotations.
Part of
- Test Frameworks: TestNG/JUnit — section
- SDET / Automation Testing roadmap — the full learning path