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

tc.getVar(...) returns a different value than the value previously set with tc.setVar(...) #1562

Open
checkerix opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@checkerix
Copy link

Describe the bug

  • If a variable is defined twice (with the same name) in an environment, TC writes to the first variable but reads from the last variable.

To Reproduce

  • variable "variable1" is defined twice in the Local Env

image

  • in an inline script of a request, a value is set for this variable:
    tc.setVar("variable1", "correct_value", "local");
  • in a subsequent request, the value of {{variable1}} should be used

Observed behavior

  • {{variable1}} contains "wrong_value"

Expected behavior

  • {{variable1}} should contain "correct_value"

Platform:

  • OS: Windows 10
  • vscode version: 1.90.1
  • node version: 20.9.0
  • extension version: v2.24.0

Are you using the free version/paid version/trial:

  • paid version
@checkerix checkerix added the bug Something isn't working label Jun 19, 2024
@rangav
Copy link
Collaborator

rangav commented Jun 19, 2024

@checkerix Thanks for reporting the bug.

can you please confirm your subscription using the below form
https://www.thunderclient.com/contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants