A hands-on API Testing / QA Automation portfolio project that demonstrates end-to-end testing of e-commerce REST APIs (products, cart, and authentication) using Postman, with negative testing, E2E flow validation, load testing (k6), and structured bug reporting.
Built to showcase practical QA skills β test design, functional/negative/auth testing, E2E scripting, performance testing, and defect documentation β for QA Automation Engineer roles.
This project simulates a real QA engagement against a live e-commerce-style API surface (using public sandbox APIs β DummyJSON and FakeStoreAPI). It covers the full testing lifecycle a QA engineer would own:
- Designing and executing functional, validation, negative, and authentication test cases in Postman
- Chaining requests into an end-to-end (E2E) flow (browse β add to cart β validate)
- Load/performance testing the products endpoint with k6
- Logging and tracking defects with severity/priority in a Jira-style bug report
| Category | Tool / Tech | Purpose |
|---|---|---|
| API Testing | Postman | Manual + scripted request/response testing |
| Test Scripting | Postman Test Scripts (JavaScript / Chai) | Assertions (pm.test, pm.expect) |
| E2E Testing | Postman Collection Runner | Chained multi-request flows |
| Load/Performance | k6 | Simulating concurrent user load |
| Bug Tracking | Jira | Logging defects with ID/severity/priority |
| Version Control | Git / GitHub | Source control for test artifacts |
| APIs Under Test | DummyJSON, FakeStoreAPI | Public sandbox e-commerce APIs |
| IDE | VS Code | Project & script management |
E-commerce-API-Testing/
β
βββ collection/ # Core Postman collections
β βββ Ecommerce API Testing.postman_collection.json
β βββ Ecommerce API Testing.postman_collection - Copy.json
β
βββ e2e-tests/
β βββ E2E_FLOW.json # Chained end-to-end flow (products β cart)
β
βββ environment/
β βββ dev_environment.json # Postman environment (base URL, tokens, IDs)
β
βββ load-tests/
β βββ load-test.js # k6 load/performance test script
β
βββ test-data/
β βββ sample_data.json # Reusable test data/fixtures
β
βββ bug-report/
β βββ bugs.md # Documented defects (Jira-style)
β βββ image.png # Evidence/screenshot for a logged bug
β
βββ README.md
How the pieces fit together during a test run:
flowchart LR
ENV[("Postman Environment\ndev_environment.json")] --> COL
COL["Postman Collection\n(Functional / Negative / Auth)"] --> API1["DummyJSON API\n/products, /carts/add"]
COL --> API2["FakeStoreAPI\n/products (auth variants)"]
E2E["E2E Flow\nE2E_FLOW.json"] --> API1
LOAD["k6 Load Test\nload-test.js"] --> API1
API1 --> RES{{Response}}
API2 --> RES
RES -->|Assertions fail| BUG["Bug Report\nbugs.md (Jira-style)"]
RES -->|Assertions pass| PASS[["β
Test Passed"]]
| Test Case | Method | Endpoint | Type |
|---|---|---|---|
| Get all products | GET |
/products |
Functional |
| Pagination β negative limit | GET |
/products?limit=-1&skip=-1 |
Negative |
| Add product to cart | POST |
/carts/add |
Functional (E2E) |
| Add invalid product/quantity to cart | POST |
/carts/add (id: 99999, quantity: -1) |
Negative |
| Test Case | Method | Endpoint | Type |
|---|---|---|---|
| Get products with valid auth | GET |
/products |
Auth β Positive |
| Get products with no token | GET |
/products |
Auth β Negative |
| Get products with wrong token | GET |
/products |
Auth β Negative |
mindmap
root((API Testing))
Functional
Status code validation
Response structure checks
Validation
Data type / schema checks
Data availability
Authentication
Valid credentials
Missing token
Invalid token
Negative
Missing fields
Invalid inputs
Negative numeric values
E2E Flow
Get products
Add to cart
Chained assertions
Performance
k6 load simulation
Response time thresholds
| Type | What's Verified |
|---|---|
| Functional | Correct status codes (200, 400, etc.), expected response returned |
| Validation | Response schema/structure, data availability |
| Authentication | Token issuance, valid vs. missing vs. invalid token handling |
| Negative | Missing fields, invalid inputs, negative/edge-case values (e.g. limit=-1, quantity=-1) |
| E2E | Multi-step flow β fetch product β capture ID β add to cart β assert cart response |
| Load/Performance | Throughput and latency under ramping virtual-user load (k6) |
sequenceDiagram
participant Tester as QA Tester (Postman)
participant API as Auth API (FakeStoreAPI)
participant Env as Postman Environment
Tester->>API: POST /auth/login (credentials)
API-->>Tester: 200 OK + auth token
Tester->>Env: Store token as environment variable
Tester->>API: GET /products (Authorization: Bearer {{token}})
API-->>Tester: 200 OK (authorized response)
Note over Tester,API: Negative paths also tested
Tester->>API: GET /products (no token)
API-->>Tester: 401 Unauthorized
Tester->>API: GET /products (invalid token)
API-->>Tester: 401/403 Unauthorized
flowchart TD
A["1. GET /products"] -->|"Assert: status 200"| B["Capture product_id\n(pm.environment.set)"]
B --> C["2. POST /carts/add\n{ userId, productId, quantity }"]
C -->|"Assert: status in [200, 201]"| D["3. Negative case:\ninvalid id + negative quantity"]
D -->|"Assert failure behavior"| E["Log defect if API misbehaves"]
This flow validates that data captured from one request (a real product_id) can be correctly reused in a downstream request β a core pattern for testing stateful, multi-step user journeys like checkout.
pm.test("Status is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Products exist", function () {
let jsonData = pm.response.json();
pm.expect(jsonData.length).to.be.above(0);
});From the E2E flow β capturing a value for reuse downstream:
let jsonData = pm.response.json();
let productId = jsonData.products[0].id;
pm.environment.set("product_id", productId);Built with k6 to validate the /products endpoint under increasing concurrent load.
graph LR
A["10 users\n0β10s ramp-up"] --> B["50 users\n10β30s"] --> C["100 users\n30β50s peak"] --> D["0 users\n50β60s ramp-down"]
Pass/Fail thresholds:
| Threshold | Requirement |
|---|---|
http_req_duration |
95% of requests must complete in < 500ms |
http_req_failed |
Failure rate must stay < 1% |
Run it locally:
k6 run load-tests/load-test.jsBugs are logged in Jira-style format in bug-report/bugs.md, including ID, severity, priority, steps to reproduce, and expected vs. actual result β with a supporting screenshot (bug-report/image.png).
Example logged defect:
| Field | Detail |
|---|---|
| Jira ID | KAN-1 |
| Title | Negative limit parameter not validated |
| API | GET /products?limit=-1 |
| Severity / Priority | Medium / Medium |
| Expected | 400 Bad Request |
| Actual | 200 OK (successful response) |
| Status | Open |
flowchart LR
T["Test Execution"] -->|Failure found| R["Reproduce & Isolate"]
R --> D["Document: ID, Severity,\nSteps, Expected vs Actual"]
D --> J["Log in Jira"]
D --> M["Mirror in bugs.md"]
J --> F["Track to Resolution"]
-
Import into Postman
- Import
collection/Ecommerce API Testing.postman_collection.json - Import
environment/dev_environment.jsonand select it as the active environment - Import
e2e-tests/E2E_FLOW.jsonfor the chained end-to-end run
- Import
-
Run via Collection Runner (UI) or Newman (CLI):
npm install -g newman newman run "collection/Ecommerce API Testing.postman_collection.json" -e environment/dev_environment.json -
Run the load test:
k6 run load-tests/load-test.js
- Designing functional, negative, validation, and authentication test cases for REST APIs
- Writing Postman test scripts with
pm.test/pm.expectassertions - Chaining requests and passing data between steps for E2E scenarios
- Introducing basic performance testing with k6 (ramping load, latency/error thresholds)
- Structuring a QA project repo (collections, environments, test data, load tests, bug reports)
- Documenting defects in a clear, Jira-style, reproducible format
- Expand API coverage to Users and Orders endpoints
- Automate the full suite via Newman + GitHub Actions (CI/CD)
- Add JSON Schema validation for response contracts
- Parameterize test data via
test-data/sample_data.json(currently a placeholder) - Populate
environment/dev_environment.jsonwith sample (non-secret) variables for reviewers - Add HTML test reports (Newman HTML reporter)
Aayush Gadag β API Testing | Postman | k6 | Bug Tracking