Forum Discussion
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.
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
Related Content
- 4 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 7 days ago