Verify Successful Login to the 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 Successful Login to the API

Created By : arun-ramanan@netspective.in

Created At : 2024-12-15

Priority : High

Description

To verify that a user can successfully log in to the API using valid credentials.

Pre-Conditions:

  • The API is up and running.
  • The user has valid login credentials (username and password).
  • API authentication endpoint is accessible.

Test Steps:

  1. Step 1: Send a POST request to the login API endpoint with valid credentials (username and password).
    • Endpoint: POST /api/login
    • Request Body:
      {
        "username": "validUser",
        "password": "validPassword123"
      }
      
  2. Step 2: Verify that the request returns a 200 HTTP status code indicating success.
  3. Step 3: Verify that the response contains a valid authentication token in the response body.
    • The token should be a non-empty string.

Expected Result:

  • HTTP Status Code: 200 OK
  • Response Body:
    • The response should contain a success message or an authentication token.
    • The authentication token should be in the correct format (e.g., JWT).
    • Example response: { "message": "Login successful", "token": "<token>" }

Actual Result

Verify that the request returns a 200 HTTP status code indicating success. passed 15-12-2024 08:45:13 15-12-2024 08:45:13
Verify that the response contains a valid authentication token in the response body passed 15-12-2024 08:45:13 15-12-2024 08:45:13
Send a POST request to the login API endpoint with valid credentials (username and password) passed 15-12-2024 08:45:11 15-12-2024 08:45:13