Postman Flows: 5 Example Flows

In my earlier blog posts, I’ve taken a high level look at the Flows beta feature, and delved a bit deeper into what each of the blocks that make up flows actually do.

However, I think when we’re learning, itโ€™s good to have examples we can refer to – that’s always the shortcut I use to get inspired anyway! So here are some working examples I created to help get those creative juices flowing. Note these are all basic flows that may form part of a larger flow should you wish to do something more advanced.

All of my flows use the Restful Booker API, written and maintained by the amazing Mark Winteringham.

Flow #1: Passing Variables Between Requests

In this instance, we create a new booking, and pass the created booking ID to a request to GET the information about that ID. This is done via the the “assign values to variables” link within a request without the need to use the now deprecated Assign Variables/Create Variables blocks.

Video showing use of “Assign values to variables” link to define and pass variables

Flow #2: Looping data

If you want to loop through a response and apply a rule to it then here is an example. Here I take the ID’s from a GET all request, loop through them and for each of the ID’s in the request I output to a terminal if the booking id is greater than 100.

Joyce Lin has also done a video here showing another fantastic use of loops.

Video showing an example for each loop using Postman Flows

Flow #3: Take Inputs From Multiple Sources

This example shows how you can take requests running against two different environments from two different collections and perform a check on them both to output to a terminal.

Video showing outputs from two API requests flow into the same check block in Postman Flows

Flow #4: Passing Data Between Requests

In this flow, I post a request to generate an Auth token, which I then pass in as a variable to be picked up by the POST requests Auth to successfully create a booking.

*New* from version 9.5.0, you can use the Create Durables block to complete this task. By adding the token as a durable type, this value can be persisted and used across multiple requests.

Video showing data being passed through a Postman Flow

Flow #5: Generating a Test Summary Report

My faveflow! Takes tests run as part of 3 different requests and outputs the results to a single Test Summary Block.

I hope these will help you to see how Flows might be useful to you in your testing endeavors. Watch this space for news of a fun live stream using these flows with Postman themselves – exciting huh!

Bye for now ๐Ÿ‘‹

One thought on “Postman Flows: 5 Example Flows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: