setVar inside tests from requests that is run from another request's (parent request) pre-run results in the parent request's getVar getting outdated value #1550
Describe the bug
setVar inside tests from requests that is run from another request's (parent request) pre-run results in the parent request's getVar getting outdated value. For example:
Run request A
Request A's pre-run gets called
Request A's pre-run call await tc.runRequest(request B)
Request B gets called
Request B's test scripts get called
Request B's test scripts contains tc.setVar("existing-key", "updated-value");
Request A's pre-run gets "old-value" instead of "updated-value"
Expected behavior
getVar should return the updated value instead of the old value of the requested variable after being updated from a child-request's test functions.
Platform:
OS: Windows 11
vscode version: v1.89.1
node version: v20.8.0
extension version: v2.23.9
Are you using the free version/paid version/trial:
free version
Describe the bug setVar inside tests from requests that is run from another request's (parent request) pre-run results in the parent request's getVar getting outdated value. For example:
To Reproduce
Expected behavior getVar should return the updated value instead of the old value of the requested variable after being updated from a child-request's test functions.
Platform:
Are you using the free version/paid version/trial: free version