API Testing: Click‑by‑Click Quickstart (JSONPlaceholder + httpbin)
Tags: api, guide, quickstart, rest, headers, body
This guide uses public APIs that are widely used for testing and learning:
- JSONPlaceholder: https://jsonplaceholder.typicode.com
- httpbin: https://httpbin.org
A) Create the project
1. Switch to API mode (header should indicate API).
2. Workspace Explorer → New Project
3. Mode = API, Name = Demo_API
B) Build a simple API suite (manual endpoints)
Create a suite named: “JSONPlaceholder Smoke”
Set Base URL (important)
- In the Run panel (or Suite settings), set Base URL:
https://jsonplaceholder.typicode.com
Add endpoints (examples)
1) GET /posts/1
- Method: GET
- Path: /posts/1
- Expect: HTTP 200
2) GET /comments?postId=1
- Method: GET
- Path: /comments
- Query Params: postId = 1
- Expect: HTTP 200
3) POST /posts (JSON body)
- Method: POST
- Path: /posts
- Headers: Content-Type = application/json
- Body:
{
"title": "wsq demo",
"body": "hello from WebSureQTool",
"userId": 1
}
- Expect: HTTP 201 (common for create)
Run the suite
- Click Run All
C) Auth header scenario (Bearer token) using httpbin
Base URL:
- https://httpbin.org
Endpoint:
- GET /bearer
Run it without auth
- Expected: 401 Unauthorized
Run it with Authorization header
- Header: Authorization = Bearer <YOUR_TOKEN>
- Expected: 200 OK
Notes on “trusted” outputs
- Public demo APIs can change. Treat example responses as illustrative.
- Your tool should always show:
- status code
- response headers
- response body (or error body)
Common fail cases
- “Base URL required”: you imported endpoints with relative paths. Set the Base URL.
- “401/403”: your auth header/token is missing or invalid.
- “415 Unsupported Media Type”: set Content-Type for JSON.
