Supporting resources for the 2020 Postman Galaxy Tour bit.ly/postman-galaxy-workshop
In this section we’re going to create a workspace, import a collection, add a test, and run a collection.
In the Postman app, create a personal or team workspace to organize your workshop output.
Postman collections let you organize groups of requests together with associated elements such as tests and documentation. You can create your own and import others.
We’ll import a few collections as we work through the topics. Having these in your Postman app will give you loads more requests to play around with after the session.
Get customer
to open it. Take a minute to look at the parts of the request with data entered (highlighted in green). Check out the collection variables to see where the URL components are coming from (open the collection menu and select Edit > Variables).PATCH
Add customer
request and check out the data it’s sending in the Params, Authorization, and Body. Remember the collection variables included the token
value. Send the request.Let’s add some test JavaScript code to the request.
Status code: Code is 200
from the list.Get customers
request (first in the folder) and in the Tests tab, add the same status code 200 test, but this time edit the test to fail, e.g. by testing for a 400 response code instead of 200. Save and Send the request again, and observe the test results, noticing the difference in the failed message.You can run all of the requests in a collection or folder using the collection runner.
Your request tests need to be saved to appear in the collection runner so remember to hit Save in the requests.
Postman Echo
collection.In this section we tried out:
Shout out any questions you have on what we covered in this section around collections, variables, tests, or the collection runner.
Check out the Postman docs for more on these topics:
See also:
Next up: Final Countdown