Page 1 of 1

Refresh of Variable Values in Repository Used in Test Cases

Posted: Thu May 30, 2019 3:45 pm
by sstrand72
In a recording module, I am referencing a repo variable (e.g. $VariableFromRepo) that is defined to be equal to 10. When I created the recording module, the $VariableFromRepo was equal to 10 (used the method of "Copy Variable from Repository" in the drop down menu for Variables within the recording module). At a later date, I need to update the $VariableFromRepo from within the repository to be equal to 15. The behavior I was expecting was for all the recording modules that use $VariableFromRepo to update as well. However, they retain the value of when they were created. Is there a way to force a refresh in all the recording modules? Or a property that needs to be reset?

We are using these as a common place of defining CONSTANT values to be used everywhere in the test suite. If this is not the best place to do it, please advise.

Thanks!

Re: Refresh of Variable Values in Repository Used in Test Cases

Posted: Mon Jun 03, 2019 9:06 am
by odklizec
Hi,

In my opinion, you should use the data-driven approach, which is the most appropriate way of filling recording/code module variables. Values stored in recording module are good only for debugging purposes. But if you want to use variables in long-term run and at global scale, you should definitely connect them to data connector or testsuite/testcase/smartfolder parameters. If you have very few variables, which are repeatedly used in many modules and they all share the same value, you may use Global parameters, instead of creating a separated data connector file. I personally would use global parameters only for truly "global" variables and only very few of them (up to 10 global parameters).