Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTo not working #18

Closed
kattiegrab opened this issue Apr 21, 2021 · 6 comments
Closed

setTo not working #18

kattiegrab opened this issue Apr 21, 2021 · 6 comments

Comments

@kattiegrab
Copy link

I just found this tool today and was playing with it. It is really cool! Thanks!

I have a problem with setting variable from the response or I'm doing it wrong.
Test is failing for setTo. I even tried few options.
It would be nice if you could add setTo to docs.

Also I noticed that when I add 4 tests in test results I can see only 3, like the first one is ignored.

Screenshot 2021-04-21 at 15 39 32

@rangav
Copy link
Collaborator

rangav commented Apr 21, 2021

Hi @kattiegrab, setting variable from tests won’t show up in test results, as it’s not a test.

it will only show up in test results when there is an error in parsing the json query.

from your screenshot, looks the variables are not saved in the environment or the env not set default or casing is wrong.

when the variable name matches your variable in environment it will turn green color.

Let me know if this helps, I will update the documentation.

@rangav
Copy link
Collaborator

rangav commented Apr 21, 2021

And did you select drop down set env variable option?

@kattiegrab
Copy link
Author

Ok, got it. If variable set it will not show in tests tab, but still I think that saving is not working.
Yes I used set env variable . I opened another tab to make a request with this variable and it didn't turn green when I tried to use it, so looks like not saved? Shouldn't it be added to env variables tab after running request with that set env variable? I think it is like that in postman, it would be nice to have it there, so I could check if it is saved.

@rangav
Copy link
Collaborator

rangav commented Apr 21, 2021

it will set an existing variable in environment with the response content, so the variable name needs to be in env before.

not exactly sure how postman works here.

@kattiegrab
Copy link
Author

ok, I added a variable to my env without value, and you are right it worked!
Thank you very much for help.
And thanks for nice tool! 👍

@rangav
Copy link
Collaborator

rangav commented Apr 21, 2021

No problem, great to know you like the tool. Please leave a rating or review in the marketplace, will be useful for new users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants