https://github.com/mytechnotalent/jtf
Java Selenium & Cucumber automation framework integrated with TestNG for BDD (Behavior-Driven Development) testing. This project enables writing test cases in Gherkin syntax and mapping them to Java step definitions for UI automation.
https://github.com/mytechnotalent/jtf
cucumber cucumber-java java selenium selenium-java
Last synced: 28 days ago
JSON representation
Java Selenium & Cucumber automation framework integrated with TestNG for BDD (Behavior-Driven Development) testing. This project enables writing test cases in Gherkin syntax and mapping them to Java step definitions for UI automation.
- Host: GitHub
- URL: https://github.com/mytechnotalent/jtf
- Owner: mytechnotalent
- License: apache-2.0
- Created: 2025-02-17T20:40:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-17T23:11:58.000Z (about 1 year ago)
- Last Synced: 2025-02-18T00:20:04.702Z (about 1 year ago)
- Topics: cucumber, cucumber-java, java, selenium, selenium-java
- Language: Java
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Test Framework
Java Selenium & Cucumber automation framework integrated with TestNG for BDD (Behavior-Driven Development) testing. This project enables writing test cases in Gherkin syntax and mapping them to Java step definitions for UI automation.
# 🚀 Getting Started
### 1️⃣ Clone the Repository
```bash
git clone https://github.com/mytechnotalent/jtf.git
cd CucumberTraining
```
### 2️⃣ Install Dependencies
Ensure **Maven** is installed, then run:
```bash
mvn clean install
```
### 3️⃣ Run Tests
To execute Cucumber tests:
```bash
mvn test
```
### 4️⃣ Generate Reports
```bash
mvn verify
```
### 5️⃣ Create `src/test/resources/secrets.properties` File
```bash
TEST_USERNAME=
TEST_PASSWORD=
```
Reports will be generated in `target/cucumber-reports.html`.
# 🛠 Dependencies
This project uses:
- **Java 21**
- **Maven**
- **Selenium WebDriver**
- **Cucumber** (cucumber-java, cucumber-testng)
- **TestNG**
- **WebDriverManager** (for automatic driver management)
# 📌 Feature Example (Gherkin Syntax)
```cucumber
Feature: Login functionality
Scenario: User logs in with valid credentials
Given the user is on the login page
When the user enters valid username and password
And clicks the login button
Then the user should be redirected to the homepage
```
# 📝 Running Individual Tests
Run a single feature file:
```bash
mvn test -Dcucumber.features=src/test/resources/features/login.feature
```
Run tests by **tag**:
```bash
mvn test -Dcucumber.options="--tags @SmokeTest"
```
# 🔥 Contributors
- **Kevin Thomas** - Creator & Maintainer
# 📜 License
This project is licensed under the **Apache License**.