A robust, maintainable end-to-end test automation framework built with Java, Selenium WebDriver, and Cucumber BDD. Designed for scalable web application testing with readable Gherkin scenarios and detailed HTML reports.
- ✅ BDD with Cucumber — Human-readable Gherkin test scenarios
- ✅ Page Object Model (POM) — Clean, reusable, and maintainable test structure
- ✅ Cross-browser support — Chrome, Firefox, Edge
- ✅ HTML Test Reports — Detailed reports with screenshots on failure
- ✅ Data-Driven Testing — Scenario Outline & Examples table support
- ✅ CI/CD Ready — Easily integrated with Jenkins, GitHub Actions
| Tool | Purpose |
|---|---|
| Java 11+ | Core programming language |
| Selenium WebDriver | Browser automation |
| Cucumber (BDD) | Gherkin-based test scenarios |
| TestNG | Test runner & assertions |
| Maven | Dependency management & build |
| WebDriverManager | Automatic driver management |
| ExtentReports | HTML test reporting |
test-automation/
├── src/
│ ├── test/
│ │ ├── java/
│ │ │ ├── pages/ # Page Object classes
│ │ │ ├── steps/ # Cucumber step definitions
│ │ │ ├── hooks/ # Before/After hooks
│ │ │ └── runners/ # TestNG test runners
│ │ └── resources/
│ │ └── features/ # Gherkin .feature files
├── reports/ # Generated HTML test reports
├── pom.xml # Maven dependencies
└── README.md
- Java 11 or higher
- Maven 3.6+
- Chrome / Firefox browser installed
# Clone the repository
git clone https://github.com/ozeg8/test-automation.git
# Navigate to project directory
cd test-automation
# Install dependencies
mvn clean install -DskipTests# Run all tests
mvn test
# Run specific feature
mvn test -Dcucumber.features="src/test/resources/features/login.feature"
# Run with specific browser
mvn test -Dbrowser=firefox
# Run specific tag
mvn test -Dcucumber.filter.tags="@smoke"After test execution, HTML reports are generated under /reports directory.
Open reports/index.html in your browser to view:
- Test execution summary
- Pass/Fail statistics
- Step-by-step breakdown
- Screenshots on failure
Feature: User Login
@smoke
Scenario: Successful login with valid credentials
Given the user is on the login page
When the user enters valid username and password
Then the user should be redirected to the dashboard
@regression
Scenario Outline: Login with multiple user roles
Given the user is on the login page
When the user logs in as "<role>"
Then the user sees the "<dashboard>" view
Examples:
| role | dashboard |
| admin | Admin Panel |
| user | User Home |- Fork the repository
- Create your feature branch (
git checkout -b feature/new-test) - Commit your changes (
git commit -m 'Add new test scenario') - Push to the branch (
git push origin feature/new-test) - Open a Pull Request
This project is licensed under the MIT License.
Built with ❤️ by ozeg8