Search⌘ K
AI Features

Testing the Login Endpoint

Explore testing login endpoints with Postman by creating user accounts, using collection variables for reusable data, sending POST requests, and verifying responses through test cases. Understand how to automate API validation for login functionality with hands-on examples.

Starting the application

Let's create a new request to test the login endpoint. Execute the application below to start the Postman app:

Press Run to load Postman
Postman and login applications

Next, we need to boot up the login app using the following steps:

  1. Click the “+” icon to open a new terminal.

  2. Enter the command below in the newly created terminal:

cd with-passport-app-educative && npm run dev
  1. If desired, copy the URL below and paste it into a browser to view the application.

Shell
{{EDUCATIVE_LIVE_VM_URL}}:3000

Creating reusable variables

We need an active account before we can test the login endpoint. So first, we’ll create a new user using the sign-up endpoint and store the username and password for the new user as collection variables. Collection variables are global variables that can ...