07 - Postman Testing

In this module, we'll quickly test our routes with Postman. We want to run 8 tests between the user and authtest controllers:

  1. Create a new user.

  2. Get a new token.

  3. Set up the headers with the proper token.

  4. Create an item with a specific user.

  5. Get all items for a specific user.

  6. Get a single item for a specific user.

  7. Update an item for a specific user.

  8. Delete an item for a specific user.

After each step, check the relevant table in your database to make sure that everything worked properly. There are screenshots below to show you how each request should look, but try to do them by yourself first.

Screenshots fot Tests:

Test your Endpoints: 1. Create a new user.

screenshot
  1. Get a new token.

screenshot
  1. Set up the headers with the proper token. Just copy and paste the token you just got. And our application is returning json.

screenshot
  1. Create an item with a specific user authtest/create.

screenshot
  1. Get all items for a specific user authtest/getall. We added a few items.

screenshot
  1. Get a single item for a specific user authtest/id.

screenshot
  1. Update an item for a specific user authtest/update/id. If you have more than one item, the updated one will move to the bottom of the list.

before update
screenshot
after update

Had to get the quote right obviously. 8. Delete an item for a specific user authtest/delete/id.

before delete
screenshot
after delete

It's like the Gungans never existed.

Last updated