Complete TestNG Framework Topics
1. Introduction to TestNG
- What is TestNG?
- Features of TestNG
- Advantages over JUnit
2. Setting Up TestNG
- How to install TestNG in Eclipse/IntelliJ
- Adding TestNG dependency (Maven/Gradle)
- TestNG XML configuration file
3. Annotations in TestNG
- @Test
- @BeforeMethod / @AfterMethod
- @BeforeClass / @AfterClass
- @BeforeTest / @AfterTest
- @BeforeSuite / @AfterSuite
- @BeforeGroups / @AfterGroups
4. Writing Test Cases
- Writing simple test methods
- Using assert statements (Hard vs Soft Assertions)
- Prioritizing tests
- Enabling/Disabling tests
- Timeout and expected exceptions
5. TestNG XML Suite File
- Structure and syntax
- Running tests via XML
Complete TestNG Framework Topics
- Grouping and including/excluding tests
- Parameterizing through XML
6. TestNG Groups
- Defining and using groups
- Include/Exclude groups
- Using groups in XML configuration
7. Parameterization
- Using @Parameters annotation
- Passing parameters from XML
- Using @DataProvider for data-driven testing
- DataProvider with Object[][]
- Parallel execution with DataProvider
8. Dependency Testing
- dependsOnMethods
- dependsOnGroups
9. Parallel Execution
- ThreadPool and parallel attributes
- Parallel methods, classes, and tests
- Managing concurrency
10. TestNG Listeners
- ITestListener
- ISuiteListener
- IAnnotationTransformer
Complete TestNG Framework Topics
- Custom listeners
- Logging test events
11. TestNG Reports
- Default TestNG reports
- Creating custom reports
- Using Reporter class
- Integration with third-party tools (e.g., Allure, ExtentReports)
12. Assertions
- Hard Assertion (Assert)
- Soft Assertion (SoftAssert)
- Difference between them
- When and how to use
13. Retry Analyzer
- Retrying failed tests automatically
- Implementing IRetryAnalyzer
14. TestNG with Selenium
- Integrating TestNG with Selenium
- Page Object Model with TestNG
- Parallel testing in Selenium using TestNG
15. TestNG with Build Tools
- TestNG with Maven
- TestNG with Gradle
- Running tests from command line
Complete TestNG Framework Topics
16. Advanced Features
- Factory in TestNG
- InvocationCount and invocationTimeOut
- TestNG Parameters from Excel (using Apache POI)
- Cross-browser testing setup
17. TestNG Best Practices
- Project structure
- Naming conventions
- Grouping strategies
- Effective parallel testing