Skip to content

this is the main repository testing for web automation using selenium

Notifications You must be signed in to change notification settings

aljazarifoundation/SeleniumJavaFunctional

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Test Automation with Allure Report

Prerequisites

  • Install Java 17 (Ensure JAVA_HOME is set correctly)
  • Install Maven (Check installation with mvn -version)
  • Install Allure CLI (Check installation with allure --version)
  • Install Google Chrome & Chromedriver

Project Structure

SeleniumJavaProject/
│-- src/
│   ├── main/
│   │   ├── java/
│   │   │   ├── utils/
│   │   │   │   ├── ScreenshotUtil.java
│   │   │   │   ├── AllureEnvironmentUtil.java
│   │   │   ├── Main.java
│   ├── resources/
│   ├── test/
│   │   ├── java/
│   │   │   ├── tests/
│   │   │   │   ├── hiselenium.java
│   │   │   │   ├── SauceDemoTest.java
│   ├── resources/
│-- pom.xml
│-- testng.xml
│-- README.md

Step-by-Step Guide

1. Clone the Repository

git clone https://github.com/your-repo/SeleniumJavaProject.git](https://github.com/aljazarifoundation/SeleniumJavaFunctional.git
cd SeleniumJavaProject

2. Configure Environment Variables

Set JAVA_HOME, MAVEN_HOME, and add Allure to your system PATH.

3. Install Dependencies

mvn clean install

4. Run the Tests

mvn test

5. Generate Allure Report

allure serve target/allure-results

Running the Main Class

A simple Java example is included in Main.java.

mvn exec:java -Dexec.mainClass="Main"

Notes

  • Modify ScreenshotUtil.java to match your WebDriver setup.
  • Ensure testng.xml is correctly configured for your test suite.
  • Screenshots are saved in target/screenshots/ and attached in Allure reports.

For troubleshooting, check the logs/ folder for errors.

Video

Selenium-Java.mp4

Releases

No releases published

Packages

No packages published

Languages