GET Requests
Practice the following GET request scenarios.
List Retrieval
- Fetch all users.
- Fetch all products.
Resource by ID
- Fetch a user by ID.
- Fetch a product by ID.
Pagination
Validate paginated responses.
Filtering
Validate filtered datasets.
Sorting
Validate sorting functionality.
Empty Dataset Validation
Validate responses when no records are returned.
Unauthorized Access
Validate unauthorized access scenarios.
Query Parameters
Practice using:
limitskip
Path Parameters
Validate requests using path parameters.
Category-Based Retrieval
Fetch products by category.
Empty Product Response
Validate responses for empty product categories.
POST Requests
Practice creating resources using POST requests.
Resource Creation
- Create a new user.
- Create a new resource.
Nested JSON
Create resources using nested JSON payloads.
Duplicate Resource Validation
Validate duplicate creation handling.
Mandatory Field Validation
Verify mandatory-field validation.
Default Field Validation
Validate automatically assigned default field values.
Product & User Creation
Validate:
- Product creation response.
- User creation response.
Duplicate Product Validation
Practice duplicate product creation scenarios from FakeStore Sprint-2 and Sprint-3.
PUT / PATCH Requests
Practice update operations.
Full Update (PUT)
Update an entire resource.
Partial Update (PATCH)
Update only selected fields.
Validate Unchanged Fields
Ensure fields not included in the update remain unchanged.
Validate PUT Idempotency
Execute the same PUT request multiple times and verify that the resource remains in the same final state.
Product Update
Update a product price.
Validate:
- Updated product details.
- Updated response data.
DELETE Requests
Practice delete operations.
Delete a Resource
Delete a user or product.
Soft Delete Validation
Validate soft delete behavior.
Hard Delete Validation
Validate permanent deletion.
Deleted Resource Validation
Verify that accessing a deleted resource behaves as expected.
HTTP Method Validation
Validate correct HTTP method behavior for every endpoint.
Correct HTTP Method Usage
Ensure each endpoint accepts the intended HTTP method.
PUT Idempotency
Verify that repeated identical PUT requests produce the same final state.
Unsupported HTTP Methods
Validate that unsupported methods return:
- 405 — Method Not Allowed
Status Code Validation
Verify appropriate status codes for:
- GET
- POST
- PUT
- PATCH
- DELETE
Request Data Handling
Practice handling different request payload scenarios.
Dynamic Request Payloads
Create payloads dynamically.
Random Test Data
Generate random values for test execution.
Nested JSON Payloads
Build requests containing nested JSON structures.
Array Payloads
Handle JSON arrays within requests.
Optional Fields
Validate requests with optional data.
Large Payloads
Validate APIs using large request bodies.
Invalid Content Type
Send requests with incorrect Content-Type headers.
Validate content-type mismatch handling.
Invalid Payloads
Submit invalid payloads and verify API responses.
Special Characters
Validate handling of special-character inputs.
Payload Schema Validation
Verify payload structure against the expected schema.
Reusable Payload Files
Maintain reusable JSON payload files.
Payload Versioning
Maintain multiple payload versions where required.
Request Creation Techniques
Practice building request payloads using:
- HashMap
- POJO Classes
- JSON Files
- String Payloads
Also practice:
- Dynamic Payload Generation
- Reusable Payload Utilities
These approaches improve code maintainability and test-data reuse.
Demo-API Mapping
HTTP Methods Practice
Use ReqRes to practice:
- GET All Users
- GET Single User
- POST Create
- PUT Update
- PATCH Update
- DELETE
- Unsupported Methods (405)
- PUT Idempotency
Request Data Handling
Use DummyJSON to practice:
- Query Parameters
- Path Parameters
- Nested JSON
- Large Payloads
- Content-Type Validation
- Special Characters
Product CRUD
Use FakeStore API to practice:
- Fetch All Products
- Fetch Product by ID
- Fetch Products by Category
- Pagination
- Create Product
- Update Product
- Delete Product
- Validate Deleted Resource
FAQs
What CRUD Operations Should You Practice?
Practice:
GET
- List
- By ID
- Pagination
- Filtering
- Sorting
POST
- Create
- Nested JSON
- Duplicate Resources
- Mandatory Fields
PUT / PATCH
- Full Update
- Partial Update
- Idempotency
DELETE
- Soft Delete
- Hard Delete
- Deleted Resource Validation
How Do You Validate PUT Idempotency?
Send the same PUT request multiple times.
Verify that repeated executions leave the resource in the same final state.
What Should an Unsupported HTTP Method Return?
The endpoint should return:
405 — Method Not Allowed
What Are the Common Ways to Build Request Payloads?
Practice using:
- HashMap
- POJO Classes
- JSON Files
- String Payloads
Support these with:
- Dynamic Payload Generation
- Reusable Payload Utilities
Which Request Data Edge Cases Should Be Tested?
Validate:
- Nested JSON
- Array Payloads
- Optional Fields
- Large Payloads
- Invalid Content Types
- Special Characters
- Payload Schema Validation