Verify if server connection is refused, it should throw an error.
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 server connection is refused, it should throw an error.
Created By : arun-ramanan@netspective.in
Created At : 2024-12-15
Priority : High
Description
This test case ensures that when the server connection is refused, the application or client properly handles the scenario by throwing an appropriate error message.
Pre-Conditions:
- The server endpoint should be temporarily set to reject connections (e.g., through firewall rules or server configurations).
- Test environment with necessary tools (e.g., Postman or playwright scripts) must be configured.
Test Steps:
- Step 1: Send a request (GET/POST/PUT depending on the API) to the target endpoint.
- Step 2: Capture the JSON response from the API.
- Step 3: Compare the response body against the schema defined in the IG using a schema validation tool.
- Step 4: Verify that all required fields are present and adhere to the expected data types and formats.
Expected Result:
- The response body conforms to the schema specified in the IG, including:
- Required fields are present.
- Data types and formats match schema definitions.
- No additional or unexpected fields are included unless allowed by the schema.
Actual Result
Observe and record the response from the client/application. | passed | 15-12-2024 08:45:13 | 15-12-2024 08:45:13 |
Verify if the error code and message align with the expected format (e.g., `503 Service Unavailable` or `Connection Refused`). | passed | 15-12-2024 08:45:13 | 15-12-2024 08:45:13 |
Send a request to the API endpoint using a REST client like Postman or playwright script. | passed | 15-12-2024 08:45:11 | 15-12-2024 08:45:13 |