-
Notifications
You must be signed in to change notification settings - Fork 136
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
Incrementing an environment variable appears to have the environment file cached #1373
Comments
Thanks for reporting the bug, Will fix it asap. |
This bug is fixed now, please update to See all features released Please test and let me know your feedback. |
Also I think you should use |
Also, you should rearrange the code
let incrementCount = tc.getVar('incrementCount') || 0
if(incrementCount < 20)
{
incrementCount = incrementCount + 1
tc.setVar( 'incrementCount', incrementCount)
console.log(incrementCount)
// acting as if i didnt get the desired response so would like to retry
await tc.runRequest(<this request id>) // <<--------------
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Incrementing a variable within an environment file does not take effect until the request completes
To Reproduce
Assuming an environment variable in place 'incrementCount' set with a value of 0.
Create a new get request, add a new post execution code element that will loop the request 20 times, for example
Expected behavior
incrementCount should be incrementing and the console log should read similar to
1
2
3
4
**actual behaviour **
behaves like incoming environment is cached, console outputs
0
0
0
0
0
acts as if the final write to the environment isnt done until the request and code behind ends.
Platform:
tried free and trial
The text was updated successfully, but these errors were encountered: