Refresh of Variable Values in Repository Used in Test Cases

Ask general questions here.
sstrand72
Posts: 6
Joined: Thu May 30, 2019 3:38 pm

Refresh of Variable Values in Repository Used in Test Cases

Post by sstrand72 » Thu May 30, 2019 3:45 pm

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!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Jun 03, 2019 9:06 am

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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration