https://github.com/daud-nisar/ecommerce-automation
Automation suite for signup and login flows using Selenium and PyTest, featuring dynamic email generation and JSON-based data reuse.
https://github.com/daud-nisar/ecommerce-automation
automation e2e-tests pytest python qa-automation selenium selenium-webdriver test-automation testing-framework web-testing
Last synced: about 1 month ago
JSON representation
Automation suite for signup and login flows using Selenium and PyTest, featuring dynamic email generation and JSON-based data reuse.
- Host: GitHub
- URL: https://github.com/daud-nisar/ecommerce-automation
- Owner: Daud-Nisar
- Created: 2025-07-07T20:18:37.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-07T21:41:44.000Z (12 months ago)
- Last Synced: 2025-07-07T22:20:52.826Z (12 months ago)
- Topics: automation, e2e-tests, pytest, python, qa-automation, selenium, selenium-webdriver, test-automation, testing-framework, web-testing
- Language: Python
- Homepage: https://github.com/Daud-Nisar/ecommerce-automation
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Ecommerce Automation
This project automates the **Signup** and **Login** workflows of an ecommerce website using **Python**, **Selenium**, and **PyTest**. It simulates real-user behavior, generates unique credentials during signup, saves them to a JSON file, and uses the same credentials to perform login โ ensuring a complete end-to-end test.
---
## ๐ Features
- โ
Automates user **Signup** flow
- โ
Saves user credentials to a **JSON file**
- โ
Uses saved credentials in **Login** flow
- โ
Uses `webdriver_manager` for easy ChromeDriver management
- โ
Clean structure using **Page Object Model (POM)** (optional)
- โ
Configurable via `pytest.ini`
---
## ๐ Tech Stack
- Python 3.x
- Selenium
- PyTest
- WebDriver Manager
- JSON (for data sharing)
- [pytest-order](https://pypi.org/project/pytest-order/) (optional)
---
## ๐ Project Structure
```
ecommerce-automation/
โโโ tests/
โ โโโ test_signup.py #Signup automation (with data save)
โ โโโ test_login.py #Login automation (reads data)
โ โโโ init.py
โโโ utils/
โ โโโ driver_setup.py #get_driver() using Chrome + manager
โ โโโ init.py
โโโ conftest.py #Pytest fixture for browser
โโโ temp_login_data.json #Auto-generated user credentials
โโโ pytest.ini #Pytest config
โโโ requirements.txt # Dependencies
โโโ .gitignore #Ignore venv/.idea/pycache
โโโ README.md #You're reading it :)
```
---
## ๐งพ Setup Instructions
### 1. Clone the repository
```bash
git clone https://github.com/Daud-Nisar/ecommerce-automation
cd ecommerce-automation
```
### 2.Create and activate virtual environment (optional)
**๐ On Windows:**
```
python -m venv venv
venv\Scripts\activate
```
**๐ On macOS / Linux:**
```
source venv/bin/activate
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
---
### โถ๏ธ Running the Tests
```bash
pytest
```
## To run individually:
```bash
pytest tests/test_signup.py
pytest tests/test_login.py
```
## Sample Output:
๐ฅ Signup Test Running
โ
Signup successful
๐ฅ Login Test Running
โ
Login successful
---
## ๐ Sample temp_login_data.json
```bash
{
"email": "Adam1720349320@mail.com",
"password": "SecurePass123"
}
```
This file is auto-generated by the Signup test and used in the Login test
---
## โ
Requirements
```bash
Contents of requirements.txt:
selenium
pytest
webdriver-manager
pytest-order
```
## ๐งช Pytest Configuration (pytest.ini)
```bash
[pytest]
testpaths = tests
python_files = test_*.py
python_functions = test_*
addopts = -v
```
# ๐จโ๐ป Author
**Daud Nisar**
Python Automation Developer
## โญ๏ธ Support
If you liked this project:
- โญ๏ธ Star this repository
- โ
Follow me on [GitHub](https://github.com/Daud-Nisar)
- ๐ฌ Share your feedback or suggestions