My Postman flow looks like this:
- API call to create object
- Create durable with autogenerated id from last call (âdur_idâ)
- API call to retrieve created object with environment variable âenv_idâ overwritten to âdur_idâ via âAssign values to variablesâ.
The calls all work as expected.
The issue is the test for the retrieve call fails, because it compares the result to the original environment variable instead of the overwritten one.
How do I test against the durable variable set during the flow execution?
Hey @marco-brieden
Maybe I use a different word for the same thing but Iâm not sure what you mean by durable
Could you update your question with a visual example and the test code that is currently failing?
Hi @danny-dainton, thanks for your reply!
I know itâs an odd name, but itâs what Postman chooses to call them.
Go to âFlowsâ, create a new one and then you can set up something similar to the flow I described above.
Unfortunately I donât see a way to export a flow.
Here is step 1 and 2 in the overview:
Step 2: The durable to store the id:
Step 3: Overwriting the environment variable and sending the request:
The request itself succeeds, but the test attached to the request fails, because it doesnât use the new current value.
Ah, thatâs makes more sense now you updated the title and added the images.
I didnât think about it in the context of âFlowsââŠ
@samayverma Is there anything that you could suggest here?
It might also be worth taking a look at the discussions happening on the repo to see if there are any existing issues around durables?