Intro to Postman | Part 4: Advanced API Tests

preview_player
Показать описание
Learn how to write more advanced 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.

Рекомендации по теме
Комментарии
Автор

For the labels, I would define an array of my labels in the pre-script area, pass it to the post request, and then iterate over it in the test. Of course, this relies on the API itself preserving the order in which you present the labels. I imagine that you'd find out pretty quickly if that were not the case.

edgreenberg
Автор

can I test more than 2 kinds of responses per script??, lets say I want to test 200 and 404 responses to work propertly in the same endpoint

mark-nzxc
Автор

When testing for the labels, my tests passed without including the key for the array. I think your capital "B" in bug was actually the only thing triggering the error - in which case I'm still a little confused on when the array keys are needed. but overall this has been very helpful

JustinLieberthal
Автор

I tried following the exact lesson but my labels got dropped. Probably I need to regenerate my bearer token.

markmariq