Skip to content

Commit 0f08f97

Browse files
committed
chore: prioritize Python language detection
1 parent a3d5a93 commit 0f08f97

File tree

64 files changed

+70
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+70
-160
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.html linguist-generated=true
2+
allure-report/* linguist-generated=true
3+
reports/* linguist-generated=true
4+
allure-results/* linguist-generated=true

README.md

Lines changed: 55 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,67 @@
1-
Automated Web Testing Framework with Selenium and PytestA beginner-friendly QA automation project demonstrating end-to-end (E2E) testing for the SauceDemo e-commerce demo app (https://www.saucedemo.com/). This framework uses the Page Object Model (POM) for maintainable tests, covering login scenarios (successful and error cases), inventory management (add/sort), cart operations (add/remove/verify), and full checkout flows. Built with Python, Selenium, and Pytest for modular, scalable testing. Includes data-driven tests, cross-browser support (Firefox/Chrome), and advanced reporting.
1+
# 🛡️ Selenium + Pytest SauceDemo E2E Framework with Allure
22

3-
[![Python](https://img.shields.io/badge/python-3.9+-blue)](https://www.python.org/)
4-
[![Selenium](https://img.shields.io/badge/selenium-4.35-green)](https://www.selenium.dev/)
5-
[![Pytest](https://img.shields.io/badge/pytest-8.4-orange)](https://pytest.org/)
3+
[![Python](https://img.shields.io/badge/Python-3.9+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
4+
[![Selenium](https://img.shields.io/badge/Selenium-4.0+-43B02A?style=for-the-badge&logo=selenium&logoColor=white)](https://www.selenium.dev/)
5+
[![Pytest](https://img.shields.io/badge/pytest-7.0+-0A9EDC?style=for-the-badge&logo=pytest&logoColor=white)](https://pytest.org/)
6+
[![Allure](https://img.shields.io/badge/Allure-2.0+-FF0000?style=for-the-badge&logo=allure&logoColor=white)](https://allurereport.org/)
7+
[![CI](https://img.shields.io/badge/CI-Passing-brightgreen?style=for-the-badge&logo=github)](https://github.com/jerryfinol17/Automated-testing-project/actions)
8+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)
69

7-
## Overview
8-
Goal: Automate key user flows like authentication, product sorting/adding to cart, item management, and complete checkout processes.
9-
App Under Test: SauceDemo – a sample e-commerce site for testing login, inventory, cart, and checkout.
10-
Current Coverage: 12+ tests (4 login variants, 4 inventory flows, 4 cart/E2E checkouts) with data-driven parametrization and ~90% pass rate.
11-
Run Environment: Firefox/Chrome (headless for CI; non-headless for local debugging) via WebDriver Manager (no manual driver setup needed).
12-
Scalability: Easy to extend with more browsers, APIs, or mobile emulation.
10+
**Enterprise-ready End-to-End automation framework** for SauceDemo using **Selenium WebDriver**, **pytest**, **Page Object Model** and **Allure reporting** — with rich interactive dashboards, screenshots, timelines and CI/CD artifacts.
1311

12+
Demonstrates key skills companies seek: stable Selenium automation, beautiful stakeholder reports (Allure), maintainable POM, data-driven tests, cross-browser, and automated pipelines.
1413

15-
## Tech Stack
16-
## Languages/Tools:
17-
- Python 3.9+
18-
- Selenium WebDriver
19-
- Pytest
20-
- WebDriver Manager
21-
## Reporting:
22-
- Pytest-HTML (basic logs)
23-
- Allure (interactive dashboards with steps, timelines, and screenshots).
24-
## Design Pattern:
25-
-Page Object Model (POM) for clean separation of locators, actions, and config.
26-
## CI/CD:
27-
-GitHub Actions for automated runs on push/PR, with report artifacts.
28-
## Other:
29-
- Data-driven testing via @pytest.mark.parametrize, explicit waits for stability.
14+
### ✨ Key Highlights
15+
- ✅ Full **Page Object Model** (dedicated pages + config modules)
16+
- ✅ Cross-browser (Chrome & Firefox via WebDriver Manager)
17+
- ✅ All SauceDemo users & edge cases (locked-out, invalid creds, empty fields)
18+
- ✅ Comprehensive flows: login, inventory (add/multi/sort/price validation), cart (consistency/remove), full parametrized checkout E2E
19+
-**Allure reporting** — steps, attachments, timelines, screenshots, failure details
20+
- ✅ Pytest-HTML fallback + auto artifacts in CI
21+
- ✅ GitHub Actions CI (runs on push/PR, green status, reports downloadable)
22+
- ✅ Data-driven with `@pytest.mark.parametrize`
3023

31-
automated-testing-project/
32-
├── config/
33-
│ ├── config_for_login_page.py # Test credentials (standard_user, locked_out, invalid, empty)
34-
│ ├── config_for_inventory_page.py # Product locators and details (add/remove selectors)
35-
│ └── config_for_cart_page.py # Cart product mappings (display names, actions)
36-
├── pages/
37-
│ ├── login_page.py # Login actions (open, enter creds, error handling, logout)
38-
│ ├── inventory_page.py # Inventory actions (add single/multi, sort by price, badge count, go to cart)
39-
│ ├── cart_page.py # Cart verification (get items, remove, badge, start checkout)
40-
│ └── checkout_page.py # Checkout steps (fill info, continue, complete)
41-
├── tests/
42-
│ ├── test_login.py # Login tests (success, errors)
43-
│ ├── test_inventory.py # Inventory tests (add, multi-add, sort, prices)
44-
│ └── test_cart.py # Cart and E2E tests (verify, remove, checkout)
45-
├── reports/ # Generated HTML reports (run pytest to create)
46-
├── allure-results/ # Raw Allure data (auto-generated)
47-
├── allure-report/ # Generated Allure HTML dashboard
48-
├── docs/ # Screenshots and docs (e.g., report_screenshot.png)
49-
├── requirements.txt # Dependencies (selenium, pytest, allure-pytest, etc.)
50-
├── .github/workflows/ci.yml # GitHub Actions for CI/CD
51-
└── README.md # You're reading it!
24+
### 📁 Project Structure
5225

53-
## Quick StartClone the Repo:
26+
```bash
27+
Automated-testing-project/
28+
├── config/ # Credentials & locators per page
29+
├── pages/ # POM core (login, inventory, cart, checkout)
30+
├── test/ # Test suites (login, inventory, cart/E2E)
31+
├── reports/ # Pytest-HTML reports
32+
├── allure-results/ # Raw Allure data
33+
├── allure-report/ # Generated Allure dashboard
34+
├── docs/ # Screenshots & extras
35+
├── .github/workflows/ # CI pipeline (main.yml)
36+
└── requirements.txt
37+
```
5438

55-
- git clone https://github.com/your-username/automated-testing-project.git
56-
- cd automated-testing-project
57-
- Install Dependencies:
58-
- pip install -r requirements.txt
59-
- Run Tests:All tests: pytest tests/ -v
60-
- With HTML report: pytest tests/ --html=reports/report.html --self-contained-html -v
61-
- With Allure: pytest tests/ --alluredir=allure-results -v then allure serve allure-results
62-
## Specific test:
63-
- pytest tests/test_cart.py::test_full_e2e_checkout -v
64-
- Cross-browser (if marked): pytest -m cross_browser -v
39+
### 🚀 Quick Start
40+
```bash
41+
git clone https://github.com/jerryfinol17/Automated-testing-project.git
42+
cd Automated-testing-project
43+
pip install -r requirements.txt
44+
```
6545

66-
## View Reports:
67-
:HTML: Open reports/report.html in your browser for logs and pass/fail summaries.
68-
- HTML Report Example
69-
- Allure: Run allure serve allure-results for an interactive dashboard (timelines, steps, attachments). Example screenshot:
70-
- Allure Dashboard
71-
## Tests CoveredLogin (test_login.py):
72-
- Successful login
73-
- Locked-out user
74-
- Invalid credentials
75-
- Empty username (4 tests).
76-
## Inventory (test_inventory.py):
77-
- Add single product to cart
78-
- Multi-add products
79-
- Sort by price (lo-hi/hi-lo)
80-
- Validate prices (4 tests).
81-
## Cart & E2E (test_cart.py):
82-
- Verify cart items/badge
83-
- Remove single/all items
84-
- Start checkout
85-
- Full E2E checkout (parametrized with user data) (4+ tests).
46+
### Run Tests:
47+
```bash
48+
pytest test/ -v # Full suite
49+
pytest --alluredir=allure-results -v # With Allure
50+
allure serve allure-results/ # Open interactive report
51+
```
8652

87-
All tests include asserts for URLs, elements, text, and edge cases. Data-driven for efficiency (e.g., multiple products/usernames).
88-
89-
CI/CD IntegrationGitHub Actions runs tests on every push/PR to main.
90-
Artifacts: Download allure-report or html-report from Actions tab for post-run analysis.
91-
Badges update automatically for build status.
92-
93-
Contributing & Next StepsFork, PRs welcome! Add more tests (e.g., responsive checks) or browsers.
94-
For production: Integrate coverage (pytest-cov) or parallel runs (pytest-xdist).
95-
Questions? Open an issue.
53+
### CI Reports:
54+
Download Allure/HTML artifacts from Actions tab after runs.
55+
### Reporting Demo
56+
Allure dashboard: steps, screenshots, failure reasons — perfect for sharing with PMs/devs.
57+
(Agrega screenshot de Allure si podés: sube uno a docs/ y enlaza: Allure Sample)
9658

9759
![html report.png](docs/html%20report.png)
9860
![Screenshot 2025-09-29 145456.png](docs/Screenshot%202025-09-29%20145456.png)
99-
Built by Jerry Finol | Last Updated: October 6, 2025
100-
https://github.com/jerryfinol17/Automated-testing-project/actions/runs/18293106423/artifacts/4196777875
61+
62+
### Why this Framework stands out
63+
Classic Selenium (enterprise staple) + modern Allure reporting = combo que muchas compañías pagan bien. Listo para escalar a tu proyecto real.Open for freelance/contract QA roles (Selenium/Playwright/Python/API/CI). → DM @GordoRelig3d
64+
65+
→ Email: jerrytareas17@gmail.com¡Tests green, reports stunning!
66+
67+
Built by Jerry Finol | Last Updated: March 20, 2026

requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
selenium==4.35.0
2-
pytest==8.4.2
1+
selenium==4.38.0
2+
pytest==9.0.1
33
pytest-html==4.1.1
4-
allure-pytest== 2.15.0
5-
pytest-cov== 7.0.0
4+
allure-pytest== 2.15.2
5+
pytest-cov== 7.0.0
6+
pytest-xdist == 3.8.0

test/allure-results/00472a54-7d78-4035-b25e-920edcb76a71-result.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/06a45867-706b-4247-8375-0b1023269c1e-container.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/0be9edeb-1f26-4014-8adc-cf2287428c89-attachment.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/0c904b7f-ac56-4cb8-aec2-ab34bcf0c01b-container.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/0ce3369e-b11f-4d3d-9430-7c2ba72a2805-result.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/12a1e7f3-8fd6-457c-b96b-64e3c2876eed-container.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/allure-results/19fcb4fd-dcdc-4e31-82b4-4ee85071fc19-container.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)