https://github.com/aljazarifoundation/seleniumjavafunctional
this is the main repository testing for web automation using selenium
https://github.com/aljazarifoundation/seleniumjavafunctional
allure-report automation-testing functional java maven selenium testng webautomationtesting
Last synced: about 2 months ago
JSON representation
this is the main repository testing for web automation using selenium
- Host: GitHub
- URL: https://github.com/aljazarifoundation/seleniumjavafunctional
- Owner: aljazarifoundation
- Created: 2025-02-19T02:15:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-19T02:21:02.000Z (over 1 year ago)
- Last Synced: 2025-05-20T00:38:58.607Z (about 1 year ago)
- Topics: allure-report, automation-testing, functional, java, maven, selenium, testng, webautomationtesting
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
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
```sh
mvn clean install
```
### 4. Run the Tests
```sh
mvn test
```
### 5. Generate Allure Report
```sh
allure serve target/allure-results
```
## Running the Main Class
A simple Java example is included in `Main.java`.
```sh
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
https://github.com/user-attachments/assets/c4c65e53-5a63-4fa7-a17b-938bdd71c4e0