https://github.com/aljazarifoundation/seleniumpythonfunctional
this is the main repository testing for web automation using selenium
https://github.com/aljazarifoundation/seleniumpythonfunctional
allure-report automation pytest quality selenium software-testing
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/seleniumpythonfunctional
- Owner: aljazarifoundation
- Created: 2025-02-12T09:19:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-12T09:37:33.000Z (over 1 year ago)
- Last Synced: 2025-04-13T13:38:58.733Z (about 1 year ago)
- Topics: allure-report, automation, pytest, quality, selenium, software-testing
- Language: Python
- Homepage: https://www.tiktok.com/@aljazarifoundation/video/7470353153007930631
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Selenium UI Testing with Allure Reports
## 📂 Folder Structure
```bash
SeleniumPythonFunctional/
│── tests/
│ ├── test_checkout.py # Selenium checkout test
│ ├── test_login.py # Selenium login test
│── conftest.py # Selenium browser setup
│── pytest.ini # pytest configuration
│── requirements.txt # Dependencies
│── allure-results/ # Allure test results
│── README.md # Project documentation
```
## 📌 Prerequisites
Before running the tests, ensure you have the following installed:
- **Python** (>=3.7)
- **Google Chrome, Firefox, Edge, or Safari (Selenium 4 includes a built-in browser, so no additional setup is needed)**
- **Selenium & Allure dependencies, refer to https://allurereport.org/docs/install-for-windows**
### Install Dependencies
```bash
pip install pytest selenium allure-pytest
```
or
```bash
pip install -r requirements.txt
```
---
## 🚀 Running Tests
### Run All Tests
```bash
pytest .\tests\test_login.py --alluredir=allure-results
```
### Run a Specific Test (`-k`)
Run tests that match a keyword:
```bash
pytest -k "login" --alluredir=allure-results
```
👉 This runs tests like `test_checkout_process`.
### Run Tests in a Specific Browser
```bash
pytest --browser-type=firefox --alluredir=allure-results
```
👉 Supports **`chromium`**, **`firefox`**, **`edge`**, and **`safari`**.
### Run Tests in Headless Mode
```bash
pytest --headless --alluredir=allure-results
```
---
## 📊 Viewing Allure Reports
After running tests, generate and open the report:
```bash
allure serve allure-results
```
This launches a web-based report.
---
## ⚙️ Advanced Options
| Command | Description |
|---------|------------|
| `--headed` | Run in visible mode |
| `--headless` | Run in headless mode |
Example running in visible mode:
```bash
pytest --headed --browser-type=edge --alluredir=allure-results
```
---
## 🎥✅ Results
https://github.com/user-attachments/assets/d5bbb00f-a65e-4644-935d-6ced6c54a299
---
## 🎯 Conclusion
This guide helps you quickly set up, run, and analyze Selenium UI tests with Allure reports. 🚀