User Feedback - Postman Flows

Big Thanks for you amazing job!

If you guys will add the following things to the Flow it will revolutionize testing.

  1. Output from one flow as iput to another flows [M:M connect]
    For example I want to create flow for “order create” process
    And the use it output as input for “Ship order” flow

  2. DSL language (even yaml format would be enough)

  3. OpenTracing support (generation flows from OpenTracing traces)

With all those features testers would be able to use Model Based Testing with 0 effort!

If you have opensource repo for this particular project, I would like to participate.

And please add zoom out )

@ArseniyAntonov

  1. Reusable flows and using flows inside other flows is something in our near-term roadmap. It should be possible very soon.
  2. YAML format DSL is something surely we can explore. I will create a Github issue soon so that we can track if more users want this and priorities accordingly.
  3. Opentracking support might not be something we will support immediately, but once the DSL is out the community could build an OpenTracing to flow converter.

And finally zoom-in, zoom-out and reset view should be out in a few hours on postman-web. :grimacing:

2 Likes

@dom-techwriter The Send Request block already parses the JSON. The Parse JSON block should be used when you have additional JSON String within your response which are double JSON parsed. You should be able to use flows in the case without needing to use Parse JSON. Let me know if you still face any issues.

Hi @askmeagain

One of the ideas that we had was to have multiple Start blocks allow them to be grouped like Terminals are grouped.

Replaying your scenario
You would have 2 Starts under groups working and non-working and then each of them connects to their corresponding Create Variable Block which has their data defined. Then you click on the Start for the path you would like to execute.

Will this solve your use case?

1 Like

Is there a way to parse xml into json in the Request block?

Add custom javascript code to decode responses into a specific structure. The keys in the response object are dynamic, so the Variable block won’t work.

I am trying to retrive one value from the response using the flows.
I need only id value which is “test_user-1633546832-450360”.
Can anyone help me how I can achieve this.

{
“msgs”: [
{
“fromfull”: “noreply@",
“subject”: “VERIFY YOUR EMAIL”,
“from”: "
",
“origfrom”: "
******”,
“to”: “test_user”,
“id”: “test_user-1633546832-450360”,
“time”: 1633546832000,
“seconds_ago”: 2450
}
],
“domain”: “public”,
“to”: “test_user”
}

In the normal request I used this in the tests and it is working fine.
var data = JSON.parse(responseBody);
postman.setEnvironmentVariable(“message_id”, data.msgs[0].id);
But I am trying with flows and not able to get any idea how I can achieve this.

Hi folks.
Thank you very much for integrating flows.
Will it be possible to trigger one (all) flow(s) by API (e.g. by a cURL inside a Bamboo Task)? If yes, what will be the result if a (or all) flow(s) failed?
Thank you for your info!

Edit: @germanynick already asked it.

Hey @tanuj, welcome to the community!
In your custom code, would you pick the keys based on their position or some regex or something else?

Hey @ereddy068 !
Looks like your response is not in a valid JSON structure. Please validate it once here: JSON Formatter & Validator. I’m guessing that’s the issue. Let me know if I misunderstood :slight_smile:

I just tried to validate the json response and it is a valid one.
It is working fine in the normal postman request.
I am trying for the flows firsttime and trying to extract only one value from the response body.

{
   "msgs":[
      {
         "fromfull":"noreply@*********",
         "subject":"VERIFY YOUR EMAIL",
         "from":"*******",
         "origfrom":"********",
         "to":"test_user",
         "id":"test_user-1633546832-450360",
         "time":1633546832000,
         "seconds_ago":2450
      }
   ],
   "domain":"public",
   "to":"test_user"
}

Yeah, the one you sent here seems to be the valid JSON. I’ve tested it out. You can connect a “create variables” block to your request and extract the “id” from your response.

P.S: Noticed that the create variable block has some bugs where if you configured it for the first time, the data is not getting extracted. Please remove the configuration and reconfigure again to make it work for now.

Could you please explain how the variable is created and updated.
I am not able to extract the id value from it.


that’s strange. I’m able to get all the keys. Would you be able to check if the response is in the same format as you posted in the last screenshot?
tagging @iamsaswat for further help.

I am getting this in my postman tool in windows.
Not getting all keys.

Hi @ereddy068 , for some reason our schema inference engine is not able to figure-out the schema of elements inside the array.

  • One of the reason this happens when different elements within the array have different shapes. Could you confirm that all the array elements have the same schema? Or can you share the full msgs array with sensitive information hidden.
  • Or the msgs was empty when inference happened.

One way to circumvent is to save an Example to you Request you have selected. Flow’s will automatically read your example data and give you the inference.

Below is the response when I make a call in the postman request and also the image from the console.

{
    "msgs": [
        {
            "fromfull": "noreply@iot-********",
            "subject": "VERIFY YOUR EMAIL",
            "from": "********",
            "origfrom": "******** <noreply@iot-********>",
            "to": "********",
            "id": "********-1633615479-356320",
            "time": 1633615479000,
            "seconds_ago": 41
        }
    ],
    "domain": "public",
    "to": "********"
}

image

Now when I make a request in the flows
Below is the resposne.
In the flows I have got the response as a list and I am not able to fetch values from the list.
I have tried with foreach as well. It is giving the complete msgs as a response.
I am not getting any idea how I can retrive one value from the msgs list.

body:
  msgs:
    - fromfull: noreply@********
      subject: VERIFY YOUR EMAIL
      from: ********
      origfrom: ******** <noreply@********>
      to: ********
      id: ********-1633615479-356320
      time: 1633615479000
      seconds_ago: 269
  domain: public
  to: ********
headers:
  Date: 'Thu, 07 Oct 2021 14:09:08 GMT'
  Content-Type: application/json
  Transfer-Encoding: chunked
  Connection: keep-alive
  Set-Cookie: JSESSIONID=s4~node04p3yhnnbqgwtjqj43f24dqt01665691.node0;Path=/
  Expires: 'Thu, 01 Jan 1970 00:00:00 GMT'
  Access-Control-Allow-Origin: '*'
  CF-Cache-Status: DYNAMIC
  Expect-CT: >-
    max-age=604800,
    report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
  Report-To: >-
    {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ucDf2wwRv%2BwWW%2F52aWojRFjh9pz0F7LfzrzVaZVIULsSPdqx8qWKmDqRysR4IQfsBu%2BbtAjUKRPZ4L1u32D3aW5cYzMcNVslBjIjuPZoZLTwiAX4boqCxsID9ByoZffj"}],"group":"cf-nel","max_age":604800}
  NEL: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
  Server: cloudflare
  CF-RAY: 69a7b49a6ce5735b-CPH
  Content-Encoding: gzip
http:
  statusCode: 200
  statusMessage: OK
  responseTime: 190


Export as a python script… that could be a-ma-zing

So cool
I’d really love to parse XML, is that in the roadmap?

1 Like

This would solve most of the problems, i would also prefer a way to input simple data, like some input fields on the top left corner (next to the “multi start feature”), which can be referenced in the flow.

A usecase would be to have a “Fix User Data” flow, where the develop can just enter 1 or 2 user ids, and the flow does the rest. It doesnt make sense to somehow enter this data somewhere hidden in the flow, a simple window where you present the “user” with the needed information would be golden

Also just thinking loud: What is with a custom node with a code field where we can write our own code/logic for the node?