Skip to content

This project utilizes Cucumber, Java, Selenium, and TestNG to automate Web test cases using Gherkin syntax.

Notifications You must be signed in to change notification settings

sschuckk/cucumber-java-test-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cucumber Java Test Automation/

cucumber-java-test-automation/

Report Bug · Request Feature

About The Project

The objective of this project is to develop a basic Web Test Automation framework using Cucumber as a tool for writing tests in a BDD style (Behavior Driven Development). This framework will facilitate the automated testing of web applications, ensuring functionality and performance align with expected behaviors. It also utilizes the Page Object Model (POM) design pattern with Selenium, which can simplify the process of enhancing and updating the tests.

PROJECT FOLDER
├───src
│   ├───main
│   │   └───java
│   │       └───org
│   │           └───schuck
│   │               └───page_objects
│   │                       LoginPage.java          # Page Object representing WebElements and Actions
│   │
│   └───test
│       ├───java
│       │   ├───org
│       │   │   └───schuck
│       │   │       └───step_definitions
│       │   │               LoginPageSteps.java     # Test step definitions for the Login Page
│       │   │
│       │   └───runner
│       │           CucumberTestRunner.java         # Cucumber test runner
│       │
│       └───resources
│           │   testng.xml                          # TestNG suite configuration
│           │
│           └───features
│                   LoginPage.feature               # File describing the Login Page testing
│
└───target
    └───surefire-reports
            index.html                              # Results by surefire

This is a basic project. If you want to see a POM design with Page Factory, you can check out this other project: https://github.com/sschuckk/selenium-java-test-automation.

Built With

Cucumber Java Selenium Java Apache Maven


Getting Started

Prerequisites

Installation

Clone the repository to your machine.

git clone https://github.com/sschuckk/cucumber-java-test-automation/

Usage

The project can be run by a terminal or directly in your IDE.

In your terminal go to the project folder and run:

Running the tests using Maven:

Basic execution:

mvn test

Redirect the Maven terminal log to a file for debug purpose:

mvn test --log-file ./target/mvn-test.log 

Reports:

After the execution of all tests, a link will be provided where you can click to access an online report, as shown below: Reports Reports

About

This project utilizes Cucumber, Java, Selenium, and TestNG to automate Web test cases using Gherkin syntax.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published