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.
Press Run to load Postman
Next, we need to boot up the login app using the following steps:
Click the “+” icon to open a new terminal.
Enter the command below in the newly created terminal:
cd with-passport-app-educative && npm run dev
If desired, copy the URL below and paste it into a browser to view the application.
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 ...