Verify if Missing "Password" Details Block Login to API
Status : passed
Start Time : 15-12-2024 08:45:11
End Time : 15-12-2024 08:45:13
Duration : 1.50 seconds
Title : Verify if Missing "Password" Details Block Login to API
Created By : arun-ramanan@netspective.in
Created At : 2024-12-15
Priority : High
Description
This test case verifies that if the "password" detail is missing from the request, the API should block the login attempt.
Pre-conditions:
- The API is up and running.
- The API endpoint for login is known and accessible.
- Valid user credentials (username) are available.
Test Steps:
-
Step 1: Send a login request to the API with the "username" field populated but the "password" field missing.
- Request:
- Method: POST
- Endpoint:
/api/v1/login
- Body:
{ "username": "testuser", "password": "" }
- Request:
-
Step 2: Check if the login attempt is blocked, and an appropriate error message is returned (e.g., "Password is required").
Expected Result:
- The API should reject the login attempt with an error response, indicating that the "password" field is required.
- Response:
- HTTP Status Code:
400 Bad Request
- Response Body:
{ "error": "Password is required" }
- HTTP Status Code:
Actual Result
Check if the login attempt is blocked, and an appropriate error message is returned (e.g., Password is required) | passed | 15-12-2024 08:45:13 | 15-12-2024 08:45:13 |
Send a login request to the API with the username field populated but the password field missing. | passed | 15-12-2024 08:45:11 | 15-12-2024 08:45:13 |