Verify Empty Payload Block Login to API
Status : failed
Start Time : 15-12-2024 08:45:11
End Time : 15-12-2024 08:45:13
Duration : 1.50 seconds
Title : Verify Empty Payload Block Login to API
Created By : arun-ramanan@netspective.in
Created At : 2024-12-15
Priority : High
Description
This test case validates that the API rejects a login attempt with an empty payload.
Pre-conditions:
- The API is running and accessible.
- User is not logged in.
Test Steps
-
Step 1: Send a POST request to the API's login endpoint with an empty payload (
{}
).- Request:
- URL:
https://localhost/api/login
- Method: POST
- Payload:
{}
- URL:
- Request:
-
Step 2: Verify the status code of the response.
-
Step 3: Check the response message for appropriate error handling (e.g., "Invalid input" or "Payload cannot be empty").
Expected Result
- The response status code should be
400 Bad Request
. - The response body should contain an error message indicating that the payload is empty, such as
"error": "Payload cannot be empty"
.
Actual Result
Actual Result
Verify the status code of the response is 400 | failed | 15-12-2024 08:45:13 | 15-12-2024 08:45:13 |
Check the response message for appropriate error handling (e.g., Invalid input or Payload cannot be empty) | failed | 15-12-2024 08:45:13 | 15-12-2024 08:45:13 |
Send a POST request to the API's login endpoint with an empty payload (`{}`). | passed | 15-12-2024 08:45:11 | 15-12-2024 08:45:13 |