Forum Discussion
Hi Sriguda
If I understand you correctly, it sound like you need something like this:
KeywordTests.IncrementValues.Variables.Name_Num = KeywordTests.IncrementValues.Variables.Name_Num + 1
Does this solve your problem?
Regards
Stephen.
- joseph_michaud10 years agoModerator
Use a Persistent Variable, not a Temporary Variable.
- sriguda10 years agoFrequent Contributor
I am using Set Variable Value statement function as shown in the attatchment.
In the log statements, I am displaying updated values of variables.
I see the variables being updated with new values when executing the code but it doesn't finally save the value in the varables that are defined in variables section of keyward test .
I used the staement you have given in Run Code Snippet. I don't see the values being updated while executing the code itself.
- joseph_michaud10 years agoModerator
You are using a variable local to the test. The variable goes away when the test is done. If you want the value to persist between test runs then use a persistent project variable. In the following image, I increment a test-local variable, a temporary project-local variable, and a persistent project-local variable and print out their values. Their initial values are 0, 10, and 100 respectively. After the first run of the test, the incremented values are 1, 11, and 101. After the second run, the incremented values are 1, 11, and 102. Only the persistent project variable will save the value between test runs.
For more info, see the article on Variable Collections
- sriguda10 years agoFrequent Contributor
I will try that Thanks.
Related Content
- 2 months ago
- 4 years ago
Recent Discussions
- 2 days ago