Relative Content

Tag Archive for postman

Is it possible in a Postman function to pass an ‘enum’ How would I define it.?

I have this Postman scenario. What I’d like to do is create an enum or the equivalent for the two or three schemas I look for in response bodies (i.e. success, fault, etc.) So far, I have one success and two failure schemas. My Java background is trying to refactor this into a ‘enum’ if that’s possible. I’m trying to avoid just “knowing” what schemas can be expected

How to store functions in Postman Collection Variables

I have some duplicate code I want to refactor and store in a postman collection variable. This function code is only duplicated once in my postman unit tests but I don’t want even one duplication. So, I’m trying to store it in a collection variable and execute it however many times I need it.