מסמך זה מגדיר את תוכנית הבדיקות המלאה עבור מערכת SauceDemo. הבדיקות מומשו בפריימוורק Playwright (Python) עם pytest, תוך שימוש בארכיטקטורת Page Object Model ושכבת WebFlows לתזמור פעולות מורכבות. כלל התוצאות מתועדות ב-Allure Report.
מבוא
הפרויקט בודק את saucedemo.com — אפליקציית ווב המדמה חנות אינטרנטית עם תהליכי התחברות, קטלוג מוצרים, עגלת קניות ותשלום. כל הטסטים ממוקמים בקובץ test_cases/test_saucedemo.py ומאורגנים ב-5 Classes לפי @allure.suite.
מטרות הבדיקה
- אימות תהליך ה-Login לסוגי משתמשים שונים
- אימות תצוגת מוצרים, כמות ומיון
- בדיקת פונקציונליות עגלת הקניות
- אימות תהליך ה-Checkout מקצה לקצה
- בדיקת ניווט ו-Logout מהאפליקציה
ארכיטקטורת הפריימוורק – Framework Architecture
שכבת Page Objects
- LoginPage — שדות login, כפתור, error
- InventoryPage — מוצרים, מיון, עגלה, logout
- CartPage — פריטים, remove, checkout
- CheckoutPage — step-one, overview, complete
שכבת WebFlows
- login_valid() — standard_user / secret_sauce
- add_item_to_cart(slug)
- go_to_cart() / proceed_to_checkout()
- fill_checkout_info(fn, ln, zip)
- logout() — burger menu → logout link
Fixtures ונתוני קנפיגורציה
- web_workflow — מכיל את WebFlows + page
- context — Playwright BrowserContext
- trace / video / screenshot — לפי data.xml
- capture_console_logs — autouse, כל טסט
דיווח ו-Markers
- @allure.suite — קיבוץ לפי מודול
- @allure.title — שם תיאורי לכל טסט
- @pytest.mark.smoke — 8 טסטים
- @pytest.mark.regression — 12 טסטים
3.0 · היקף הבדיקה – Test Scope
✅ נבדק
- Login — valid, locked, invalid, empty fields
- Products — count, title, sorting (3 אפשרויות)
- Cart — add, remove, badge count
- Checkout — validation, overview total, E2E flow
- Navigation — logout ← burger menu
🚫 לא נבדק
- בדיקות API / Backend
- בדיקות עומס / ביצועים
- בדיקות אבטחה
- Mobile / Responsive
- problem_user / performance_glitch_user
4.0 · גישת הבדיקה – Test Approach
מתודולוגיה
בדיקות Black-Box פונקציונליות באמצעות Playwright עם Chromium. כל Class מגדיר autouse fixture לחיבור והכנת מצב ראשוני. טסטי Smoke מריצים את הנתיב המוצלח הקריטי; Regression מכסה גבולות ונתיבים שליליים.
משתמש הבדיקה
- standard_user / secret_sauce — ראשי
- locked_out_user — בדיקת נעילה (negative)
- wrong_user / wrong_pass — credentials שגויים
- Empty username / Empty password — boundary tests
5.0 · סביבת הבדיקה – Test Environment
| Application URL | https://www.saucedemo.com |
| OS | Windows 11 Pro |
| Browser | Chromium (via Playwright) |
| Automation Framework | Playwright sync_api (Python) |
| Language | Python 3.12 |
| Test Runner | pytest 8.x |
| Reporting | Allure Report (@allure.suite / @allure.title) |
| Artifacts | Screenshots (on failure) · Traces (retain-on-failure) · Console logs |
| IDE | PyCharm |
| VCS | Git / GitHub |
6.0 · קריטריוני כניסה ויציאה – Entry / Exit Criteria
תנאי פתיחה
- האפליקציה נגישה ב-URL המוגדר
- Playwright מותקן וה-browser זמין
- כל ה-fixtures ב-conftest.py תקינים
- data.xml מוגדר עם base_url ו-browser
תנאי סגירה
- כל 20 הטסטים בוצעו
- 100% ממרקר Smoke עברו
- אחוז Pass כולל ≥ 80%
- דוח STR נכתב ואושר
7.0 · לוח זמנים – Schedule
| STP – Test Planning | Week 1 · Days 1–2 |
| STD + Framework Setup (POM / WebFlows) | Week 1 · Days 3–5 |
| Test Implementation (20 TCs) | Week 2 · Days 1–3 |
| Execution + Allure Reports | Week 2 · Days 4–5 |
| STR Writing & Sign-off | Week 3 · Day 1 |
8.0 · משאבים ותפקידים – Resources & Roles
| QA Engineer / Author | Gil Kalman |
| Framework Developer | Gil Kalman |
| Tools | PyCharm · Playwright · pytest · Allure · Git · GitHub |
כל מקרי הבדיקה שאובים מ-test_cases/test_saucedemo.py. הם מאורגנים ב-5 Classes עם @allure.suite ונחלקים ל-8 טסטי Smoke ו-12 טסטי Regression. הצעדים הינם קריאות ל-WebFlows ו-Page Objects ישירות מהקוד.
| TC ID | Allure Title / Function | Marker | Preconditions | Test Steps | Expected Result |
|---|---|---|---|---|---|
| TC-01-01 | Valid login navigates to products pagetest_valid_login | smoke | page navigated to base URL (SauceDemo) |
|
expect(page).to_have_url(".../inventory.html") |
| TC-01-02 | Locked out user sees error messagetest_locked_out_user | regression | page navigated to base URL |
|
expect(login_page.error_message).to_be_visible() |
| TC-01-03 | Invalid credentials shows error messagetest_invalid_credentials | regression | page navigated to base URL |
|
expect(login_page.error_message).to_be_visible() |
| TC-01-04 | Empty username shows error messagetest_empty_username | regression | page navigated to base URL |
|
expect(login_page.error_message).to_be_visible() |
| TC-01-05 | Empty password shows error messagetest_empty_password | regression | page navigated to base URL |
|
expect(login_page.error_message).to_be_visible() |
| TC ID | Allure Title / Function | Marker | Preconditions | Test Steps | Expected Result |
|---|---|---|---|---|---|
| TC-02-01 | Products page displays 6 itemstest_product_count | smoke | Logged in as standard_user → /inventory.html |
|
expect(inventory_items).to_have_count(6) |
| TC-02-02 | Products page title is 'Products'test_products_title | smoke | Logged in → /inventory.html |
|
expect(title).to_have_text("Products") |
| TC-02-03 | Sort by Name Z to Atest_sort_name_z_to_a | regression | Logged in → /inventory.html |
|
== "Test.allTheThings() T-Shirt (Red)" |
| TC-02-04 | Sort by Price low to hightest_sort_price_low_to_high | regression | Logged in → /inventory.html |
|
== "$7.99" |
| TC-02-05 | Sort by Price high to lowtest_sort_price_high_to_low | regression | Logged in → /inventory.html |
|
== "$49.99" |
| TC ID | Allure Title / Function | Marker | Preconditions | Test Steps | Expected Result |
|---|---|---|---|---|---|
| TC-03-01 | Cart badge shows 1 after adding one itemtest_cart_badge_after_add | smoke | Logged in → /inventory.html |
|
expect(cart_badge).to_have_text("1") |
| TC-03-02 | Cart badge shows 2 after adding two itemstest_cart_badge_two_items | regression | Logged in → /inventory.html |
|
expect(cart_badge).to_have_text("2") |
| TC-03-03 | Cart contains added itemtest_cart_contains_item | smoke | Logged in → /inventory.html |
|
expect(cart_items).to_have_count(1) expect(item_names.first).to_have_text("Sauce Labs Backpack") |
| TC-03-04 | Remove item from carttest_remove_item_from_cart | regression | Logged in → backpack in cart → /cart.html |
|
expect(cart_items).to_have_count(0) |
| TC-03-05 | Cart badge disappears after removing only itemtest_cart_badge_disappears_after_remove | regression | Logged in → /inventory.html |
|
expect(cart_badge).not_to_be_visible() |
| TC ID | Allure Title / Function | Marker | Preconditions | Test Steps | Expected Result |
|---|---|---|---|---|---|
| TC-04-01 | Missing first name shows errortest_checkout_missing_first_name | regression | At checkout step-one (login_and_add fixture) |
|
expect(error_message).to_be_visible() |
| TC-04-02 | Missing postal code shows errortest_checkout_missing_postal_code | regression | At checkout step-one |
|
expect(error_message).to_be_visible() |
| TC-04-03 | Checkout step two – overview shows correct item totaltest_checkout_overview_total | smoke | At checkout step-one (backpack = $29.99) |
|
expect(subtotal_label).to_contain_text("29.99") |
| TC-04-04 | E2E – complete purchase shows confirmationtest_complete_purchase | smoke | At checkout step-one |
|
expect(complete_header).to_have_text("Thank you for your order!") expect(page).to_have_url(".../checkout-complete.html") |
| TC ID | Allure Title / Function | Marker | Preconditions | Test Steps | Expected Result |
|---|---|---|---|---|---|
| TC-05-01 | Logout redirects to login pagetest_logout | smoke | Logged in → /inventory.html |
|
expect(page).to_have_url("https://www.saucedemo.com/") expect(login_button).to_be_visible() |
הבדיקות בוצעו ב-Chromium עם standard_user כמשתמש ראשי. כל 20 מקרי הבדיקה בוצעו בהצלחה. תאריך ביצוע: אפריל 2026.
תוצאות לפי חבילת בדיקה – Per Suite
תוצאות מפורטות – Detailed Execution Results
| TC ID | Allure Title | Suite | Marker | Status | Actual Result |
|---|---|---|---|---|---|
| TC-01-01 | Valid login navigates to products page | TS-01 | smoke | PASS | Redirected to /inventory.html ✓ |
| TC-01-02 | Locked out user sees error message | TS-01 | regression | PASS | Error message visible on login page ✓ |
| TC-01-03 | Invalid credentials shows error message | TS-01 | regression | PASS | Error message visible ✓ |
| TC-01-04 | Empty username shows error message | TS-01 | regression | PASS | Validation error triggered ✓ |
| TC-01-05 | Empty password shows error message | TS-01 | regression | PASS | Validation error triggered ✓ |
| TC-02-01 | Products page displays 6 items | TS-02 | smoke | PASS | inventory-item count = 6 ✓ |
| TC-02-02 | Products page title is 'Products' | TS-02 | smoke | PASS | title text = "Products" ✓ |
| TC-02-03 | Sort by Name Z to A | TS-02 | regression | PASS | First item = "Test.allTheThings() T-Shirt (Red)" ✓ |
| TC-02-04 | Sort by Price low to high | TS-02 | regression | PASS | First price = "$7.99" ✓ |
| TC-02-05 | Sort by Price high to low | TS-02 | regression | PASS | First price = "$49.99" ✓ |
| TC-03-01 | Cart badge shows 1 after adding one item | TS-03 | smoke | PASS | cart_badge text = "1" ✓ |
| TC-03-02 | Cart badge shows 2 after adding two items | TS-03 | regression | PASS | cart_badge text = "2" ✓ |
| TC-03-03 | Cart contains added item | TS-03 | smoke | PASS | count = 1; name = "Sauce Labs Backpack" ✓ |
| TC-03-04 | Remove item from cart | TS-03 | regression | PASS | cart_items count = 0 ✓ |
| TC-03-05 | Cart badge disappears after removing only item | TS-03 | regression | PASS | cart_badge not_to_be_visible() ✓ |
| TC-04-01 | Missing first name shows error | TS-04 | regression | PASS | Error message visible on step-one ✓ |
| TC-04-02 | Missing postal code shows error | TS-04 | regression | PASS | Error message visible on step-one ✓ |
| TC-04-03 | Overview shows correct item total | TS-04 | smoke | PASS | subtotal_label contains "29.99" ✓ |
| TC-04-04 | E2E – complete purchase shows confirmation | TS-04 | smoke | PASS | complete_header = "Thank you for your order!" · URL = /checkout-complete.html ✓ |
| TC-05-01 | Logout redirects to login page | TS-05 | smoke | PASS | URL = saucedemo.com/ · login_button visible ✓ |
יומן ליקויים – Defect Log
אין ליקויים פתוחים – No Defects Found
כלל 20 מקרי הבדיקה עברו בהצלחה. לא אותרו ליקויים פונקציונליים בסבב זה עבור standard_user. הסביבה הייתה יציבה לאורך כל ריצת הבדיקות.
📌 סיכום ומסקנות – Summary & Conclusions
- סבב הבדיקות הושלם בהצלחה מלאה — 20/20 PASS (100%), מעל קריטריון היציאה.
- כל 8 טסטי Smoke עברו — ניתן להמשיך לסביבת UAT.
- כל 12 טסטי Regression עברו — תהליכי גבול ו-negative מאומתים.
- ה-framework (Playwright + POM + WebFlows + Allure) פעל בצורה תקינה ויציבה.
- תשתית ה-conftest כוללת צילומי מסך אוטומטיים, Traces ו-Console logs לכל כשל עתידי.
- המלצה: מאשר שחרור. אין ממצאים חוסמים.
Report Version: 1.0 · Final