Module 1: Introduction to BDD
- What is BDD?
- Why BDD is required
- BDD vs TDD vs ATDD
- Business + QA + Developer collaboration
- Real-time BDD usage in Agile
Module 2: Introduction to Cucumber
- What is Cucumber?
- Cucumber architecture
- Cucumber with Java
- Cucumber vs TestNG
Module 3: Gherkin Language
- Feature files
- Given / When / Then
- And / But
- Scenario vs Scenario Outline
- Background
Feature: Login Feature
Scenario: Valid Login
Given user is on login page
When user enters valid credentials
Then user should be logged in
Module 4: Cucumber Project Setup
- Maven project structure
- Cucumber dependencies
- Feature folder
- Step definition folder
- Runner class
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.15.0</version>
</dependency>
Module 5: Step Definitions
- Glue code
- Regex & parameterization
- Mapping steps to Java methods
@Given("user is on login page")
public void openLogin(){
driver.get("login.html");
}
Module 6: Cucumber Runner Class
- @RunWith
- @CucumberOptions
- Features & glue
- Plugin configuration
@RunWith(Cucumber.class)
@CucumberOptions(
features="src/test/resources/features",
glue="stepdefinitions",
plugin={"pretty","html:target/report.html"}
)
public class TestRunner {}
Module 7: Scenario Outline & Examples
- Data-driven testing in BDD
- Multiple test data sets
Scenario Outline: Login
Given user enters "" and ""
Examples:
| username | password |
| admin | admin123 |
| user | user123 |
Module 8: Hooks in Cucumber
- @Before
- @After
- Setup & teardown
- Screenshot on failure
@Before
public void setup(){
driver = new ChromeDriver();
}
@After
public void tearDown(){
driver.quit();
}
Module 9: Tags & Selective Execution
- @smoke
- @regression
- @sanity
- Tag expressions
@smoke
Scenario: Smoke Test
Module 10: Assertions & Validations
- JUnit assertions
- TestNG assertions
- BDD-style validations
Module 11: Selenium Integration
- Selenium WebDriver setup
- Page Object Model (POM)
- Reusable methods
- Cross-browser execution
Module 12: Cucumber Reports
- HTML reports
- JSON reports
- Extent Reports
- Allure Reports
Module 13: Cucumber with TestNG
- TestNG runner
- Parallel execution
- Retry logic
Module 14: Framework Design (BDD)
- Hybrid framework
- Page Objects
- Utilities
- Config files
- Data management
Module 15: CI/CD Integration
- Maven execution
- Jenkins integration
- GitHub webhook triggers
- Automated reports
mvn test
Module 16: Real-Time BDD Automation Project
- End-to-end web application
- Login, Registration, Dashboard
- Smoke + Regression suite
- CI/CD execution
Module 17: Interview Questions & Real-Time Usage
- BDD vs traditional automation
- Why Gherkin?
- Difference between Scenario & Scenario Outline
- How Cucumber used in Agile?
- Tags & hooks questions