Skip to main content

Command Palette

Search for a command to run...

HTTP Status Codes

Published
2 min readView as Markdown
S

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.

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 return 200 OK.
    Example: Accessing a valid endpoint with proper credentials.

  • 201 Created:
    Test: Check that creating a resource (e.g., user or file upload) returns 201.
    Example: Creating a user via an API endpoint.

  • 204 No Content:
    Test: Verify updates or deletions that do not return a body respond with 204.
    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 with 304.

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.

More from this blog

AWS AI- PROMPT ENGINEERING For the AWS Certified AI Practitioner (AIF-C01) exam, prompt engineering is one of the most important topics. It is the process of writing effective instructions (prompts) to get the best response from a foundation model such as Amazon Nova, Anthropic Claude, Meta Llama, or AI21 models in Amazon Bedrock. What is Prompt Engineering? Definition: Prompt engineering is the practice of designing prompts that guide an AI model to produce accurate, relevant, and useful outputs.

Types of Prompting Zero-Shot Prompting No examples are given. Example: Translate "Good morning" into French. One-Shot Prompting Give one example. Example: Input: Apple → Fruit Now answer: Carrot →

Aug 3, 20262 min read

Souky@Technical

13 posts

Software Best Practices