HTTP Status Codes

When performing QA (Quality Assurance) testing for HTTPS status codes, the goal is to verify that the application behaves as expected and returns the correct HTTP status codes for various scenarios.
Following are the most common HTTP Status Codes that occur while Testing.
1xx - Informational
Typically, these are not directly tested in most applications.
2xx - Success
200 OK:
Test: Ensure successful GET, POST, PUT, or DELETE requests return200 OK
.
Example: Accessing a valid endpoint with proper credentials.201 Created:
Test: Check that creating a resource (e.g., user or file upload) returns201
.
Example: Creating a user via an API endpoint.204 No Content:
Test: Verify updates or deletions that do not return a body respond with204
.
Example: Deleting a resource successfully.
3xx - Redirection
301 Moved Permanently:
Test: Ensure old endpoints redirect to new ones with this status.
Example: Test HTTP to HTTPS redirection.302 Found / 307 Temporary Redirect:
Test: Confirm temporary redirections work as expected.
Example: Login forms redirecting back to the user dashboard.304 Not Modified:
Test: Validate caching mechanisms.
Example: A resource with no changes should respond with304
.
4xx - Client Errors
400 Bad Request:
Test: Send malformed requests or invalid parameters.
Example: Missing required fields in a POST request.401 Unauthorized:
Test: Access protected resources without authentication.
Example: API calls without valid tokens.403 Forbidden:
Test: Access restricted resources with valid but insufficient permissions.
Example: Admin-only pages accessed by regular users.404 Not Found:
Test: Access nonexistent resources or invalid URLs.
Example: Test broken links.429 Too Many Requests:
Test: Simulate rate-limit violations.
Example: Repeated API calls exceeding allowed thresholds.
5xx - Server Errors
500 Internal Server Error:
Test: Trigger unexpected server errors by inputting invalid data or causing edge cases.
Example: Submitting malformed JSON payloads.502 Bad Gateway:
Test: Ensure backend errors between servers are handled correctly.
Example: Server not responding to load balancer.503 Service Unavailable:
Test: Check server behavior during downtime or maintenance.
Example: Overload the server to simulate unavailability.504 Gateway Timeout:
Test: Simulate delayed server responses.
Example: Prolong backend processing times.
Subscribe to my newsletter
Read articles from Sowkhya directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Sowkhya
Sowkhya
Highly Enthusiastic and Motivated Software Engineer with Hands on Experience/Knowledge in Requirement Gathering ,Developing and Testing an application. Experience in automating, optimizing, streamlining deployment and release processes.