Forum Discussion

enriquebravo's avatar
enriquebravo
Contributor
2 years ago
Solved

Persistent Variables Default Value Programmatic Update

Hi,

 

I am using Persistent Project Variables to drive the URL in which the test will run. The variable is assigned a value from a keyword test. What is happening is that the script updates the Local value and not the Default.value. I am interested in updating the Default value because otherwise, the version control does not detect any changes in the file system and so no push operation can be performed.

 

Basically, what I am trying to do is to update multiple variables based on the value of one variable, but temporary variables do not persist the values, and persistent variables updated via automation are only updated in the local value. 

 

It was interesting to see that the version control system only detects changes when the Temporary Variable or Persistent Variable in the Default Value, value are updated.

 

Any ideas? Otherwise seems like the only option is to manually change the values.

 

Thanks in advance.

  • Note,

    • Variables created in the Temporary Variables section do not keep data between test runs. So, each time you start your test, these variables have their default values.
    • Variables created in the Persistent Variables section keep data after the test run. The data is saved to the .tcLS file. You can use these variables for further testing.

    I guess you need to check-in the .tcLS file

     

2 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Note,

    • Variables created in the Temporary Variables section do not keep data between test runs. So, each time you start your test, these variables have their default values.
    • Variables created in the Persistent Variables section keep data after the test run. The data is saved to the .tcLS file. You can use these variables for further testing.

    I guess you need to check-in the .tcLS file

     

    • enriquebravo's avatar
      enriquebravo
      Contributor

      Thanks for the suggestion!

       

      Removing the.tcLS files from the gitIgnore file solved the issue.

       

      Regards,