YUNOVA · Selenium & Test Automation
Module 9: Automation frameworks
TestNG annotations and test suites
Key points
- Annotations like @Test, @BeforeMethod and @AfterClass control when code runs.
- testng.xml groups classes and methods into suites.
- Groups, priorities and dependsOnMethods control what runs and in which order.
Cucumber BDD with Selenium
Key points
- Feature files describe behaviour in Gherkin: Given, When, Then.
- Step definition methods link each Gherkin step to code.
- A runner class connects the features, the steps and the test framework.
Maven project for Selenium
Key points
- pom.xml declares dependencies such as Selenium and TestNG.
- Maven downloads the libraries and builds the project.
- mvn test runs the tests from the command line.
Data driven testing with Apache POI Excel
Key points
- Apache POI reads and writes Excel files from Java.
- Test data rows are fed into one test method, often through a DataProvider.
- Keeping data outside the code makes tests easier to extend.