This project is an automated testing framework using Selenium WebDriver, Cucumber, TestNG, and Allure for reporting.
project-root/
│—— src/
│ ├—— main/ (Empty, since this is a test project)
│ ├—— test/
│ │ ├—— java/
│ │ │ ├—— definitions/
│ │ │ │ ├—— Hooks.java
│ │ │ │ ├—— LoginPageDefinitions.java
│ │ │ ├—— runners/
│ │ │ │ ├—— CucumberRunnerTests.java
│ │ ├—— resources/
│ │ │ ├—— features/
│ │ │ │ ├—— login.feature
│—— pom.xml
│—— testng.xml
│—— README.md
Ensure the following are installed:
- Java 17+
- Maven
- Chrome Browser
- ChromeDriver (matching Chrome version)
- Clone the repository:
git clone https://github.com/aljazarifoundation/SeleniumJavaUsingBDD.git cd <repo-folder>
- Install dependencies:
mvn clean install
- To execute tests using Maven:
mvn test
- To generate an Allure Report:
mvn allure:report
- Allure Reports are generated in
target/allure-results/
- Open the report using:
allure serve allure-results/
Modify environment.properties
inside target/allure-results/
to set test environment details.
- If WebDriverException occurs, update your ChromeDriver.
- If **Allure results are outside **``, check
pom.xml
allure plugin configuration. - Ensure Java & Maven paths are correctly set in system environment variables.
For further assistance, refer : https://qaautomation.expert/2024/01/15/allure-report-with-cucumber-and-selenium-testng/.