SYSTEM ONLINE · api.test.lab
v1.0.0 QA
API TESTING PORTFOLIO

בדיקות {API}
בלי פשרות.

פרויקט פורטפוליו המדגים סוויטה מקיפה של בדיקות API אוטומטיות על שני APIs שונים: JSONPlaceholder (CRUD בסיסי) ו-DummyJSON (E-commerce מלא עם JWT auth). 65 אסרשנים על פני 16 endpoints, כולל ולידציית סכמה, שרשור בקשות, חיפוש, סינון וטסטים שליליים. בנוי עם Postman ו-Newman, מוכן לאינטגרציה ב-CI/CD.

// APIs · JSONPlaceholder + DummyJSON // Tools · Postman + Newman // Tests · 65 assertions // Coverage · 16 endpoints
//

What This Demonstrates

API Testing Fundamentals

Validating HTTP responses, status codes, headers, and payloads against expected behavior

Schema & Contract Testing

Ensuring API responses match defined data structures using JSON Schema validation

CRUD Operations

Full lifecycle coverage: Create, Read, Update, Delete - the foundation of every application

Authentication Flows

Testing JWT token generation, validation, and structure - critical for secure APIs

Negative & Edge Cases

Verifying graceful handling of errors, invalid inputs, and 404 scenarios

Test Automation Ready

Built with Postman + Newman for CI/CD integration - runs in any pipeline

01 //

Endpoints Under Test

GET /posts

שליפת רשימת כל הפוסטים במערכת

GET /posts/{id}

שליפת פוסט בודד לפי מזהה

POST /posts

יצירת פוסט חדש עם payload

PUT /posts/{id}

עדכון מלא של פוסט קיים

PATCH /posts/{id}

עדכון חלקי של שדה בפוסט

DELETE /posts/{id}

מחיקת פוסט מהמערכת

GET /users/{id}/posts

שליפת פוסטים לפי משתמש (chained)

GET /posts/{id}/comments

שליפת תגובות לפוסט מסוים

02 //

Latest Test Run

~/qa-portfolio · newman run jsonplaceholder.postman_collection.json
Total
28
Passed
28
Failed
0
Avg Time
187ms
בדיקה Endpoint Status Time Result
שליפת כל הפוסטים מחזירה מערך GET /posts 200 OK 142ms PASS
פוסט בודד תואם לסכמה GET /posts/1 200 OK 98ms PASS
יצירת פוסט מחזירה 201 POST /posts 201 Created 312ms PASS
עדכון מלא משמר את ה-id PUT /posts/1 200 OK 204ms PASS
עדכון חלקי - title בלבד PATCH /posts/1 200 OK 156ms PASS
מחיקת פוסט מחזירה תגובה ריקה DELETE /posts/1 200 OK 128ms PASS
פוסט לא קיים מחזיר 404 GET /posts/9999 404 NotFound 87ms PASS
תגובות שייכות לפוסט הנכון GET /posts/1/comments 200 OK 176ms PASS
03 //

Endpoints Under Test

GET /products?limit=10

שליפת מוצרים עם pagination

GET /products/{id}

שליפת מוצר בודד עם schema validation

GET /products/search?q=phone

חיפוש מוצרים לפי מילת מפתח

GET /products/category/smartphones

סינון לפי קטגוריה

POST /products/add

יצירת מוצר חדש

PUT /products/{id}

עדכון מלא של מוצר

DELETE /products/{id}

מחיקת מוצר (soft delete)

POST /auth/login

אימות JWT והנפקת token

04 //

Latest Test Run

~/qa-portfolio · newman run dummyjson.postman_collection.json
Total
37
Passed
37
Failed
0
Avg Time
191ms
בדיקה Endpoint Status Time Result
שליפת מוצרים עם pagination תקינה GET /products 200 OK 156ms PASS
מוצר בודד תואם לסכמה GET /products/1 200 OK 98ms PASS
חיפוש מחזיר תוצאות רלוונטיות GET /products/search 200 OK 142ms PASS
סינון קטגוריה - כל הפריטים תואמים GET /products/category 200 OK 128ms PASS
יצירת מוצר חדש מחזירה 201 POST /products/add 201 Created 287ms PASS
עדכון מוצר משמר את ה-ID PUT /products/1 200 OK 198ms PASS
מחיקה מחזירה isDeleted: true DELETE /products/1 200 OK 176ms PASS
JWT login מחזיר accessToken תקני POST /auth/login 200 OK 342ms PASS
05 //

Testing Techniques

[ pm.test() ]

Status Code Assertions

בדיקה שכל endpoint מחזיר את ה-status code הצפוי - 200, 201, 204, 404 בהתאם לתרחיש.

[ schema ]

JSON Schema Validation

שימוש ב-Ajv לאימות שמבנה התגובה תואם לסכמה המוגדרת מראש - שדות חובה, סוגי נתונים, פורמטים.

[ env ]

Environment Variables

ניהול סביבות מרובות (dev, staging, prod) עם משתנים דינמיים שמועברים בין בקשות.

[ chain ]

Chained Requests

שמירת ערכים מתגובה אחת והעברתם לבקשה הבאה - לדוגמה, שליפת postId ושימוש בו לבקשת תגובות.

[ data ]

Data-Driven Testing

הרצת אותה בקשה עם מספר סטים של נתונים מקובץ CSV/JSON לכיסוי מקרי קצה.

[ ci ]

CI/CD Integration

הרצה אוטומטית של ה-collection דרך Newman ב-GitHub Actions עם דוח HTML לכל commit.

06 //

Artifacts & Downloads

07 //

Run It Yourself

bash · qa-portfolio
# Install Newman with HTML reporter
$ npm install -g newman newman-reporter-htmlextra

# Clone the repo
$ git clone https://github.com/liranr2024/QA-API-Portfolio.git
$ cd QA-API-Portfolio

# Run the tests with HTML report
$ newman run jsonplaceholder.postman_collection.json \
  -r htmlextra,cli \
  --reporter-htmlextra-export ./reports/index.html

# Run the second collection (DummyJSON)
$ newman run dummyjson.postman_collection.json \
  -r htmlextra,cli \
  --reporter-htmlextra-export ./reports/dummyjson-report.html

┌─────────────────────────┬──────────┬──────────┐
│ │ executed │ failed │
├─────────────────────────┼──────────┼──────────┤
│ iterations │ 2 │ 0 │
│ requests │ 16 │ 0 │
│ test-scripts │ 32 │ 0 │
│ prerequest-scripts │ 0 │ 0 │
│ assertions │ 65 │ 0 │
└─────────────────────────┴──────────┴──────────┘
✓ Reports generated → ./reports/