An open API service indexing awesome lists of open source software.

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.

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**.