This project is designed for testing a UI, API using Selenium WebDriver and RestAssured with the TestNG and cucumber framework in Java. It allows you to automate UI,API testing.
Before you begin, ensure you have the following installed:
- Java JDK 8 or higher
- Maven
- An IDE (Eclipse, IntelliJ IDEA, etc.)
selenium-java-cucumber-framework
├── src
│ ├── test
│ │ ├── java
│ │ │ └── com
│ │ │ └── cucumber
│ │ │ ├── base
│ │ │ │ └── Base.java
│ │ │ ├── pages
│ │ │ │ └── ui
│ │ │ │ ├── AddToCartPage.java
│ │ │ │ ├── HomePage.java
│ │ │ │ ├── LoginPage.java
│ │ │ │ └── SideBarValidation.java
│ │ │ ├── stepdefinitions
│ │ │ │ ├── api
│ │ │ │ │ └── BookingSteps.java
│ │ │ │ └── ui
│ │ │ │ ├── SauceDemoLoginTest.java
│ │ │ │ ├── SauceDemoCheckoutTest.java
│ │ │ │ ├── SauceDemoSideBarTest.java
│ │ │ │ ├── SauceDemoSortingTest.java
│ │ │ └── testrunner
│ │ │ └── TestRunner.java
│ │ └── resources
│ │ └── features
│ │ ├── api
│ │ │ └── booking.feature
│ │ ├── ui
│ │ │ ├── login.feature
│ │ │ ├── add_to_cart.feature
│ │ │ ├── sorting.feature
│ │ │ └── sidebarvalidation.feature
│ └── reports
│ └── Extentreport.html
├── pom.xml
└── testng.xml
-
Clone the Project : Clone the project repository from GitHub using the following command:
https://github.com/feuji-testing-frameworks/selenium-java-cucumber-framework.git -
Install dependencies : If you are using IDE it will automatically install dependecies present in pom.xml or if we use command prompt for download the dependencies using the following command
mvn clean install -
Running Tests : For running the tescases using the following command in command prompt or if we use IDE right click on testng.xml file and select Run As then click on TestNG suite
mvn test