Sebi
(Sebi)
October 27, 2020, 10:20am
5
Ok. It works after reimporting the data file. But there’s still a problem; it creates requests even when the agent_id is empty. Is it possible to set conditions on the requests (drop request is variable value if null/empty)?
E.g:
{
"url": "http://localhost:3000/users/",
"gadget_id": "",
"user_id": "9d788283-87a9-4c38-8d48-30ddc1604058"
},
Don’t make request for gadget_id like
www.url.com/gadgets/{{gadget_id} }
gadget_id is empty so don’t even make the request.
Something like this:
When I go to execute a request, I use logic within the Pre-request Script to determine IF I really want to execute this request or not based on environment variable settings. I don’t seem to be able to find a way of specifically terminating execution prior to the invocation of the actual API call and subsequent Tests scripts. In short, that is what I want to do, stop prior to the actual API call.
I tried using postman.setNextRequest(null) but it doesn’t stop execution at that time and still go…