Updating global variable value at runtime

Hello, i have a global variable glb_text = ‘XYZ’ and during the execution of a keyword, i want to update the value to glb_text = ‘ABC’. After the test execution, i check in the profile and the value is still ‘XYZ’.

Is there any means to overcome that issue?

No, because it’s not an issue.

Your profile contains the initial value. You can change it throughout the life time of your tests, but each new run, it will revert back to the original initial value.

The only way to evolve a value across different suite runs is to store that value externally some way… in a file or database, etc. and read it back in each time you restart a suite.

Thank you @Russ_Thomas

1 Like