Collection Variable as response from Mock Server

Hello!

I am trying to set a collection variable as a response from mock server but am unable to get the value.
Here is the collection variable

Here is the example body I am setting
image

And I am not sure what I am doing wrong, as the response is not loading the variable value
image

Thanks in advance for helping.

Hi @bbahadur,

Can you please check if you have saved the collection.

Collection Variables will not reflect unless you have saved the collection.

Hope this helps :slight_smile:

Hey @pranavdavar ,

Thanks for the response.
Yes, I have saved the collection, still the collection variable value is not reflected in response.
I tried working with a dynamic variable and it’s value is shown perfectly in the response.
Guess there’s some issue with the collection variable.

Ended up using Environment Variable to get my task done. Thanks to solutions provided here β†’ Mock Server - Using Variables in Example Response

1 Like