Intro to Postman | Part 3: Write API Tests

preview_player
Показать описание
How to write your first API tests with Postman.

---------------------

Fork the Postman Collection
---------------------
If you want to import the Postman collection used in this tutorial, open this link in your browser and click on Fork.


Troubleshooting
---------------
e.g. Postman tests error: ReferenceError: Hello is not defined

When writing JavaScript code, make sure that you surround Strings with single or double-quotes.
Рекомендации по теме
Комментарии
Автор

Simply Superb walkthrough. every bit of the problems faced by regular developers is taken care here. I really like your advanced thinking. Thank you so much.

sathishyadav
Автор

I have been writing JS for so long but I didn't know Number overrides toString() to take a radix 🤯 12:54
It's true, you learn something new everyday day!

Monis
Автор

I'm a total beginner at this. What keeps coming to mind is, would one need to copy, save and store these strings somewhere for later use, as they begin automation career? It seems a lot for an absolute beginner to remember.

divertingmirrors
Автор

Hi, thanks for the information. So, the video covers changing the request body with a random string every time. If I have to replace my request body with a set of fixed strings (say an array of fixed set of values) instead of random strings, how can I do that?

ramyamohan
Автор

I need help. The test "Repository name created" of mine failed and ReferenceError is "replaceAll is not defined"

ThuyPham-rcld
Автор

Hi, could anybody help me with this error "AssertionError: expected undefined to deeply equal" I just can not get rid of it.

TurskoBalkanskiRecepti
Автор

Great video! For those using the thick app v 7.2.2, you won't be able to perform the pm.collectionVariables function. You must use the web app for this.

mildmelon
Автор

I will probably find out the answer before anyone replies (I have to do this as a school assignment) I am getting this

Repository name created | TypeError: Cannot read properties of undefined (reading 'replaceAll')


I've checked an rechecked and my syntax is exactly the same. I think I've made a mistake by trying to fix it and created several repositories in github, I only need one, so I'd like to delete the ones I don't need to avoid confusion.

thesnare
Автор

how to read data in Test script assertion from the request body, to make assertions on data posted through the post method

krishna.n.chaturvedi
Автор

So is there a difference between status code 200 and 201, or is every request made after the initial one going to be a 201 request?

ianoduor
Автор

Thank you for the videos, I am getting an error:
Repository name created | TypeError: is not a function

Any thoughts on the replaceALL?

IzorShade